Compare commits
1,134 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f011ce2cb9 | ||
|
|
fe8dc36f90 | ||
|
|
db6f1e3306 | ||
|
|
d30a8672c3 | ||
|
|
afc9a7e10b | ||
|
|
a8a07b77f8 | ||
|
|
98be0df6a5 | ||
|
|
b2b14fe9b7 | ||
|
|
481ba5aa3e | ||
|
|
8ddbd3167b | ||
|
|
65d8f9fcef | ||
|
|
7b8d2925dd | ||
|
|
c78b4686a1 | ||
|
|
e76b2b76f5 | ||
|
|
2a634aea05 | ||
|
|
7bfbbf3cb7 | ||
|
|
aec20b21a5 | ||
|
|
ebeae9d084 | ||
|
|
31804c2adc | ||
|
|
c31c14cdfb | ||
|
|
879e4bb14d | ||
|
|
6575ac8d39 | ||
|
|
1af53541bf | ||
|
|
2a87b74bfe | ||
|
|
792504f978 | ||
|
|
7b04273736 | ||
|
|
30118e265d | ||
|
|
770c8bda73 | ||
|
|
16f4378fed | ||
|
|
80c02f16e5 | ||
|
|
b643a3f8ab | ||
|
|
8145f2a7e2 | ||
|
|
25638d3f80 | ||
|
|
3318a40ab1 | ||
|
|
ba062e1b89 | ||
|
|
3ee5bec244 | ||
|
|
ae0f62ed80 | ||
|
|
64bec138e1 | ||
|
|
1105a5be3a | ||
|
|
815fae961f | ||
|
|
8c1fbc3751 | ||
|
|
ad8992e9e0 | ||
|
|
41f1c30372 | ||
|
|
720a6f4cad | ||
|
|
48669462d0 | ||
|
|
66f4ccbe5d | ||
|
|
508e59c091 | ||
|
|
93bb5d777e | ||
|
|
e3814f27dd | ||
|
|
2f70b10471 | ||
|
|
e2524f6abb | ||
|
|
4985f114a3 | ||
|
|
791f70629c | ||
|
|
8160e529e2 | ||
|
|
45ad11e5be | ||
|
|
e031567fac | ||
|
|
e29d2e460b | ||
|
|
fbf3a8b07a | ||
|
|
dde75099f2 | ||
|
|
64ffc4f61b | ||
|
|
50bf9a570b | ||
|
|
b30e998e65 | ||
|
|
c230fad427 | ||
|
|
6fe19dbb88 | ||
|
|
8060e3ee87 | ||
|
|
b50186e9f3 | ||
|
|
4ba7cd90d6 | ||
|
|
f57d4d4dbc | ||
|
|
5c076e1c53 | ||
|
|
67d6455fa5 | ||
|
|
15ceed791f | ||
|
|
f55d088d44 | ||
|
|
07d0879700 | ||
|
|
2e1ff21938 | ||
|
|
0971ac7c4f | ||
|
|
0e8b50c9b0 | ||
|
|
b7f593d99e | ||
|
|
6acb5f9bc7 | ||
|
|
9f05c7dad5 | ||
|
|
6c47624e92 | ||
|
|
2683577b7a | ||
|
|
ed94eda798 | ||
|
|
620b46650a | ||
|
|
7202e2b8df | ||
|
|
1cefc09118 | ||
|
|
b841afdb5c | ||
|
|
401651e26c | ||
|
|
66d96ef4b6 | ||
|
|
c33a78cdd4 | ||
|
|
18383549d6 | ||
|
|
6869a49bc3 | ||
|
|
1874425448 | ||
|
|
de291d1d0f | ||
|
|
e90255bf7e | ||
|
|
676b2b579d | ||
|
|
f6c818b21d | ||
|
|
66a0bbf578 | ||
|
|
1f1fbfbfa8 | ||
|
|
d9dd319232 | ||
|
|
edaefbce48 | ||
|
|
75843bf45a | ||
|
|
1e29ab6592 | ||
|
|
a2cb6fe025 | ||
|
|
2e69baa4f5 | ||
|
|
009aef9f1b | ||
|
|
9e8916e111 | ||
|
|
b94ad1e4de | ||
|
|
2cec2a1186 | ||
|
|
6f777cd227 | ||
|
|
2db3d80e6c | ||
|
|
f367f0ada3 | ||
|
|
3a0b98ef4b | ||
|
|
d86765e535 | ||
|
|
846759b324 | ||
|
|
e92b601620 | ||
|
|
cf61c80588 | ||
|
|
a92a006fd9 | ||
|
|
f16a241b13 | ||
|
|
f7b0dca2cb | ||
|
|
bfcc30ab86 | ||
|
|
d29d9ad5ac | ||
|
|
b55ea7fd5e | ||
|
|
e9de49255b | ||
|
|
8e43e10f4e | ||
|
|
7ee30db078 | ||
|
|
9afe76796d | ||
|
|
08d202e824 | ||
|
|
700a4cf95c | ||
|
|
2487a08062 | ||
|
|
57b291fe66 | ||
|
|
6e6e7f528d | ||
|
|
a7e4ddb8ca | ||
|
|
f5f9c23c5f | ||
|
|
49ad2f9c1d | ||
|
|
1c4ebcbe8a | ||
|
|
24838672f0 | ||
|
|
d0decf40df | ||
|
|
b6068afc3e | ||
|
|
e59a9f833f | ||
|
|
5eda2f1365 | ||
|
|
01bd258e10 | ||
|
|
b3e839c1f8 | ||
|
|
e9b959ed8e | ||
|
|
d5b645d3ab | ||
|
|
65d4cf2be4 | ||
|
|
6e9b7ffd59 | ||
|
|
138d8c4268 | ||
|
|
f5a1baac2f | ||
|
|
34d424f89d | ||
|
|
544414cc03 | ||
|
|
c31c7c60da | ||
|
|
8492b69d33 | ||
|
|
84b0364b5d | ||
|
|
3da60153c0 | ||
|
|
4fdc15ef7f | ||
|
|
74e10eef63 | ||
|
|
88acbd47db | ||
|
|
14c00d3325 | ||
|
|
7b2c4242ad | ||
|
|
d00af325c6 | ||
|
|
bb68848f4a | ||
|
|
69d0627af3 | ||
|
|
8dd72c2630 | ||
|
|
2a26f35607 | ||
|
|
d2e1893762 | ||
|
|
00f51edd5b | ||
|
|
9f00c67682 | ||
|
|
f0ea617acb | ||
|
|
48015c2bdc | ||
|
|
3c7e551a99 | ||
|
|
8e1c2702f6 | ||
|
|
a17bf41305 | ||
|
|
e3502d00fc | ||
|
|
00bd60cfda | ||
|
|
247116d320 | ||
|
|
44c67274f0 | ||
|
|
bbf66078ea | ||
|
|
b633bd4c2e | ||
|
|
a87d114210 | ||
|
|
7942a9053d | ||
|
|
d44123b26e | ||
|
|
8270b38ecf | ||
|
|
b6a0810e70 | ||
|
|
5e08e864e7 | ||
|
|
44e1d257ec | ||
|
|
57894b73b7 | ||
|
|
a8e05ed6fe | ||
|
|
9a78c19fb8 | ||
|
|
40938ef366 | ||
|
|
a713e377bb | ||
|
|
fae2dfd9b1 | ||
|
|
d129ca02f6 | ||
|
|
8a81e8da21 | ||
|
|
6c8ad3b83f | ||
|
|
d771081005 | ||
|
|
609f6bc889 | ||
|
|
151111bde2 | ||
|
|
8d8c4cf308 | ||
|
|
d912655b5a | ||
|
|
c4994bc1ab | ||
|
|
09ef995719 | ||
|
|
035265df10 | ||
|
|
7a5d2e693b | ||
|
|
aa091e00ef | ||
|
|
fe4dd9d63f | ||
|
|
d68d90a144 | ||
|
|
75bf7f24b8 | ||
|
|
3482e2c114 | ||
|
|
7de55917c9 | ||
|
|
5922676bb1 | ||
|
|
9a8531bfd6 | ||
|
|
238222df8e | ||
|
|
dffc9a21ea | ||
|
|
6cd17da797 | ||
|
|
10269a2c32 | ||
|
|
3ab2d7b8c3 | ||
|
|
51dad59dc7 | ||
|
|
ec45601aa1 | ||
|
|
9dd8f98e73 | ||
|
|
a0566f9928 | ||
|
|
7eae54e157 | ||
|
|
81f264913e | ||
|
|
f10f4f70d4 | ||
|
|
5902ca2e66 | ||
|
|
0b6bafdd44 | ||
|
|
673a7d1bcc | ||
|
|
5d05c840bf | ||
|
|
e3539a09a8 | ||
|
|
ef45b5a924 | ||
|
|
cab3b37b78 | ||
|
|
b166a72ccf | ||
|
|
e37426c8c4 | ||
|
|
8ec6934396 | ||
|
|
6f872f484c | ||
|
|
304a265840 | ||
|
|
e6f0d69532 | ||
|
|
420cc076b3 | ||
|
|
f16324eb57 | ||
|
|
17e3d0da85 | ||
|
|
48a1b539a4 | ||
|
|
116a691516 | ||
|
|
d4760309b7 | ||
|
|
d454f8a12c | ||
|
|
6848e692ce | ||
|
|
c22e33a6c8 | ||
|
|
e9f082e83c | ||
|
|
f62ba98e88 | ||
|
|
9ef344629a | ||
|
|
794104582e | ||
|
|
dc5ef0b998 | ||
|
|
ae0e33ff72 | ||
|
|
c7385c45c4 | ||
|
|
b731b70fb2 | ||
|
|
09810443bf | ||
|
|
fa59041a97 | ||
|
|
f2cecb5697 | ||
|
|
f3d69f65d1 | ||
|
|
7d364bde65 | ||
|
|
0b5d8a1dec | ||
|
|
f43d92fab4 | ||
|
|
d82b8dbd8d | ||
|
|
da39716cc9 | ||
|
|
b6f38556bd | ||
|
|
7eb5694e17 | ||
|
|
b385e0c3ed | ||
|
|
0d0981309e | ||
|
|
1783db758c | ||
|
|
c0a4142c42 | ||
|
|
db796e14d0 | ||
|
|
ebaf95ca1a | ||
|
|
f549793a5c | ||
|
|
a208d34ede | ||
|
|
af2972255d | ||
|
|
df30f37512 | ||
|
|
590abafc54 | ||
|
|
b66f8a789a | ||
|
|
90be657119 | ||
|
|
23445c7fee | ||
|
|
c1f78498e6 | ||
|
|
23d1e497d8 | ||
|
|
3e88ef1c54 | ||
|
|
97da5d1574 | ||
|
|
6f46c1fab5 | ||
|
|
0589d438b3 | ||
|
|
85a3a7fb31 | ||
|
|
902b1ec786 | ||
|
|
3595badad6 | ||
|
|
e3df0766c3 | ||
|
|
928fa00609 | ||
|
|
542adc0452 | ||
|
|
596f8347e2 | ||
|
|
801efd40f3 | ||
|
|
f957a6f42d | ||
|
|
c0d6e44acc | ||
|
|
f1c7c78694 | ||
|
|
7109418dbe | ||
|
|
20f8953cb4 | ||
|
|
3800537912 | ||
|
|
cbf60dce54 | ||
|
|
2c2398db4f | ||
|
|
0c8a5401d9 | ||
|
|
ed7b92d5d7 | ||
|
|
77559ac639 | ||
|
|
d9c43275a0 | ||
|
|
306395a65f | ||
|
|
e13ce9212a | ||
|
|
5805ea4e01 | ||
|
|
6e8f2a6d61 | ||
|
|
e93b79399a | ||
|
|
5e778d0f1b | ||
|
|
cceea0af84 | ||
|
|
923d007ab9 | ||
|
|
21b5e6f05a | ||
|
|
7888982223 | ||
|
|
68157d645e | ||
|
|
b3f5de9999 | ||
|
|
8e221bfb97 | ||
|
|
952f9f0bda | ||
|
|
c27dceaaab | ||
|
|
85a5641368 | ||
|
|
0f1b57dc94 | ||
|
|
ddae00b6c4 | ||
|
|
48f8b3865d | ||
|
|
b926ac5def | ||
|
|
c057f74ce3 | ||
|
|
ad023b3cb5 | ||
|
|
6545eb21f5 | ||
|
|
23a1c436e3 | ||
|
|
82335c4614 | ||
|
|
c1f05a0624 | ||
|
|
2c83593868 | ||
|
|
f592efca98 | ||
|
|
93ea992d35 | ||
|
|
eca2d3cd6d | ||
|
|
5f80e31958 | ||
|
|
c8f5fa07fe | ||
|
|
c85ce95458 | ||
|
|
5825092e76 | ||
|
|
ad58b05c54 | ||
|
|
143ae88746 | ||
|
|
9de9075f4f | ||
|
|
cc9b6766a2 | ||
|
|
42ae5c406f | ||
|
|
03312ecc18 | ||
|
|
ae67df9d8b | ||
|
|
595133f9c8 | ||
|
|
81d7107279 | ||
|
|
f05552fc86 | ||
|
|
442bcd9d54 | ||
|
|
8cb9b6d197 | ||
|
|
7542b1c726 | ||
|
|
adf13f83e9 | ||
|
|
f65c15ec95 | ||
|
|
18924d8ce0 | ||
|
|
7e2fd5d14b | ||
|
|
ba6726449f | ||
|
|
8e8e8b044b | ||
|
|
a445a69fac | ||
|
|
4b5a6f760f | ||
|
|
1d3063a823 | ||
|
|
c1f1b62957 | ||
|
|
fd2abb11f5 | ||
|
|
71cd11a1c3 | ||
|
|
d03ba5bb65 | ||
|
|
bc3a572c5a | ||
|
|
2ef1ba00c7 | ||
|
|
2b69cc925f | ||
|
|
e50456ec72 | ||
|
|
81dc2bba10 | ||
|
|
46986a6d0d | ||
|
|
56d3f53bef | ||
|
|
2b455b5acd | ||
|
|
42d7f881d5 | ||
|
|
cecd566782 | ||
|
|
5a80d6418b | ||
|
|
8d6761b93d | ||
|
|
b2ddb6c1cd | ||
|
|
17a4a02354 | ||
|
|
4fd1c23ae3 | ||
|
|
8eb96fc200 | ||
|
|
26e45be107 | ||
|
|
ea4968f5f3 | ||
|
|
3bb2bf375e | ||
|
|
c4225d063d | ||
|
|
adac79f08b | ||
|
|
74dc26aa71 | ||
|
|
862e1a14b2 | ||
|
|
4bfd1759d4 | ||
|
|
50e6f9690b | ||
|
|
5d3285e41d | ||
|
|
94571574b4 | ||
|
|
f94046f4a2 | ||
|
|
9dd46ce92f | ||
|
|
0f0124e54c | ||
|
|
d7684d00e3 | ||
|
|
c104fa61ad | ||
|
|
6ec7cd56a3 | ||
|
|
9b4a43be49 | ||
|
|
047d42c704 | ||
|
|
c9a260df4b | ||
|
|
fc47ed069e | ||
|
|
0512a3f98f | ||
|
|
3bc3257c8b | ||
|
|
ef05a106c3 | ||
|
|
6ad57fe3f4 | ||
|
|
055e5e97b6 | ||
|
|
26be28d120 | ||
|
|
2b0c31fb02 | ||
|
|
98a0d2ba6f | ||
|
|
dab522fe31 | ||
|
|
bba3918943 | ||
|
|
82155ceeda | ||
|
|
13878d27cd | ||
|
|
595c70c32f | ||
|
|
ea5dd4f257 | ||
|
|
e14378b126 | ||
|
|
5d753e281a | ||
|
|
8aa06c9bc9 | ||
|
|
accbee8ae8 | ||
|
|
eed7193f32 | ||
|
|
6efe441b76 | ||
|
|
45604383c1 | ||
|
|
adf3d712d5 | ||
|
|
2dcb2a855a | ||
|
|
640a428c9b | ||
|
|
000a323245 | ||
|
|
6f98147602 | ||
|
|
0c5809474b | ||
|
|
2a788ba618 | ||
|
|
fa3bbed001 | ||
|
|
998084a7fe | ||
|
|
958394f5ec | ||
|
|
c2c04ddd51 | ||
|
|
b1ab2a0260 | ||
|
|
b3a3a29363 | ||
|
|
b2982dccc5 | ||
|
|
442a0ca932 | ||
|
|
99c656e2a5 | ||
|
|
b49109923f | ||
|
|
de23ffa760 | ||
|
|
ccf8ddf75b | ||
|
|
e3b24c2204 | ||
|
|
c06cec65df | ||
|
|
6ef7460a47 | ||
|
|
0cb14ebf35 | ||
|
|
fab79738ac | ||
|
|
cf905e4661 | ||
|
|
77be0fc1a7 | ||
|
|
f1b3580d57 | ||
|
|
8b1f0d192a | ||
|
|
00f0ea88cf | ||
|
|
4b1986f917 | ||
|
|
21786216f2 | ||
|
|
1067faec16 | ||
|
|
2e1ed4a881 | ||
|
|
cfe00ac969 | ||
|
|
d6afa13b44 | ||
|
|
d981750c46 | ||
|
|
a3e1ea3b97 | ||
|
|
deefa35087 | ||
|
|
61f479b682 | ||
|
|
e360a53087 | ||
|
|
c1f507f87a | ||
|
|
16421e85e7 | ||
|
|
fda4e800ca | ||
|
|
080dafd0e5 | ||
|
|
3c50d09dda | ||
|
|
c0be87af80 | ||
|
|
58fb1c705c | ||
|
|
a2f110d3b9 | ||
|
|
44f5f62618 | ||
|
|
69abc806ec | ||
|
|
258995d03c | ||
|
|
120ace2cf9 | ||
|
|
9fd4705cf6 | ||
|
|
734e086327 | ||
|
|
855ad2d587 | ||
|
|
d3fb0b38b7 | ||
|
|
32fb36f97a | ||
|
|
a8be4c2326 | ||
|
|
945f9bffd9 | ||
|
|
e2121ae09a | ||
|
|
40bbb49487 | ||
|
|
e8a8e3c63e | ||
|
|
c453a7ca2b | ||
|
|
8b261892b8 | ||
|
|
36fdd023e0 | ||
|
|
632105b470 | ||
|
|
3798c8718c | ||
|
|
11042fdbaa | ||
|
|
70e12fad1e | ||
|
|
8b83ec73fa | ||
|
|
b0a0454f35 | ||
|
|
1c66507f80 | ||
|
|
e0799d7dcf | ||
|
|
11a7187cf8 | ||
|
|
3c58feee51 | ||
|
|
66cdf3f52f | ||
|
|
dd123896b4 | ||
|
|
b4026126de | ||
|
|
0a4573591e | ||
|
|
905f660ab2 | ||
|
|
eb2a982b94 | ||
|
|
610fc659e8 | ||
|
|
a7263b23e0 | ||
|
|
2a58c0102b | ||
|
|
fcfc951330 | ||
|
|
5d9855256a | ||
|
|
75937124c2 | ||
|
|
861e26665d | ||
|
|
8550948818 | ||
|
|
c8ecf9fea6 | ||
|
|
8f34f94da3 | ||
|
|
7c606aeda2 | ||
|
|
0f29c21f6e | ||
|
|
f8482e4394 | ||
|
|
719b8f40e3 | ||
|
|
03f4a7b083 | ||
|
|
c9dd530e71 | ||
|
|
dae317b831 | ||
|
|
f5a70fbbc4 | ||
|
|
732183f1df | ||
|
|
8d1d395737 | ||
|
|
4b0ed850fc | ||
|
|
e96cb16b14 | ||
|
|
00f696e3c7 | ||
|
|
efad1c8b8c | ||
|
|
079e6beb2d | ||
|
|
cc695f88bd | ||
|
|
287fd9d649 | ||
|
|
3c31d96eed | ||
|
|
280d68ca34 | ||
|
|
8cb71269c6 | ||
|
|
8c29de6075 | ||
|
|
f81fc0390a | ||
|
|
bd26ec914f | ||
|
|
a1d4eb3d86 | ||
|
|
811e37c378 | ||
|
|
9386dd0452 | ||
|
|
5d4af8f96b | ||
|
|
1155542ecc | ||
|
|
4ebad6745f | ||
|
|
44998fd471 | ||
|
|
59c882566b | ||
|
|
34529760f4 | ||
|
|
93bd129cfb | ||
|
|
8a628bf832 | ||
|
|
f8e6845c81 | ||
|
|
143e81278c | ||
|
|
c662028d3d | ||
|
|
0fd98c95ca | ||
|
|
4475f30d7a | ||
|
|
8994866ef2 | ||
|
|
ae2019a4da | ||
|
|
13a6cba842 | ||
|
|
702cd168e1 | ||
|
|
4f4abdb2be | ||
|
|
a54d0181bd | ||
|
|
fac9507d3e | ||
|
|
a7e1ccf127 | ||
|
|
845679929a | ||
|
|
a544dac959 | ||
|
|
6b6527e74b | ||
|
|
82e9d14601 | ||
|
|
4551b2421c | ||
|
|
fd8b33616f | ||
|
|
c89f03fe39 | ||
|
|
c4ba328270 | ||
|
|
10b81cd436 | ||
|
|
279fb02429 | ||
|
|
9c7d055f3d | ||
|
|
f3bcaf31a8 | ||
|
|
6c3258cc03 | ||
|
|
16c3baa454 | ||
|
|
494828092b | ||
|
|
dc661c9e65 | ||
|
|
9c7755b080 | ||
|
|
a51b488ca0 | ||
|
|
b66595efa5 | ||
|
|
f2cce0a1b5 | ||
|
|
1af49e5713 | ||
|
|
6f92863aa0 | ||
|
|
6a87db2791 | ||
|
|
da8c292b69 | ||
|
|
4a2bfc9239 | ||
|
|
e9d1dc38e2 | ||
|
|
810207dfe4 | ||
|
|
a3cf9b0a3c | ||
|
|
3e0b9e52de | ||
|
|
4f72f1d368 | ||
|
|
f0181b7545 | ||
|
|
70d4b7c6ad | ||
|
|
6d379db301 | ||
|
|
7e4a01a4b9 | ||
|
|
b57192c596 | ||
|
|
d9940e55a4 | ||
|
|
776b41613d | ||
|
|
4587eec6cb | ||
|
|
bcad6d0392 | ||
|
|
a24e8ed281 | ||
|
|
67f0db5a2b | ||
|
|
f98566eebd | ||
|
|
3ac4080bfe | ||
|
|
7e667036d5 | ||
|
|
99cbdef40c | ||
|
|
64a35df0c1 | ||
|
|
1caaffba59 | ||
|
|
f4f48519ec | ||
|
|
4c79d1e8cd | ||
|
|
36b7f922b2 | ||
|
|
ece91be2e6 | ||
|
|
42e52dec9c | ||
|
|
44b71a0ff2 | ||
|
|
b6343a7674 | ||
|
|
5985c015b2 | ||
|
|
adb9268807 | ||
|
|
e4eaf410af | ||
|
|
cfeea7ec04 | ||
|
|
bcb6a2eb75 | ||
|
|
aa305dc5ae | ||
|
|
f7fd9277f4 | ||
|
|
4351b2e513 | ||
|
|
cc7d8dd138 | ||
|
|
1f1f82d582 | ||
|
|
7a3e7b6f86 | ||
|
|
1ed2877743 | ||
|
|
1af0e9f4fe | ||
|
|
ba00068ce1 | ||
|
|
814b80f423 | ||
|
|
9e6762eeb0 | ||
|
|
394cdb357d | ||
|
|
9b02c46c03 | ||
|
|
ecb060f85c | ||
|
|
1d05357e26 | ||
|
|
d8f3b9629a | ||
|
|
92b893c532 | ||
|
|
6d18229268 | ||
|
|
40f5c3ce0e | ||
|
|
6849ba0864 | ||
|
|
c406547057 | ||
|
|
d96649862f | ||
|
|
0029d0ef7e | ||
|
|
9787519352 | ||
|
|
949f6b5255 | ||
|
|
85715f3fc3 | ||
|
|
09840da111 | ||
|
|
3468d8f78e | ||
|
|
af6514a1e8 | ||
|
|
2734efb6b7 | ||
|
|
d3b630e168 | ||
|
|
cebdd1f4dc | ||
|
|
45edcc54a6 | ||
|
|
ed10989ff2 | ||
|
|
0d0cb0753e | ||
|
|
3e66025bbb | ||
|
|
3f0291dfe4 | ||
|
|
7771798cf2 | ||
|
|
05d011ccfa | ||
|
|
c350f418c7 | ||
|
|
db35d78b27 | ||
|
|
a9424b314e | ||
|
|
50db2f3b2e | ||
|
|
4204a86b97 | ||
|
|
914398bbf3 | ||
|
|
afd176ffaa | ||
|
|
5c7d93abed | ||
|
|
58d43d6de9 | ||
|
|
803a270840 | ||
|
|
7f42b68c29 | ||
|
|
937b2cfc6d | ||
|
|
d4318366f1 | ||
|
|
42d887ff86 | ||
|
|
ce42ea6eeb | ||
|
|
22b7485419 | ||
|
|
0229e5413b | ||
|
|
26d2bd6a7c | ||
|
|
8974ff4abd | ||
|
|
39d61bdc05 | ||
|
|
bdaed6a95a | ||
|
|
86b7d6e25c | ||
|
|
ee8d6262dc | ||
|
|
02e4fa2b96 | ||
|
|
94d8426d1c | ||
|
|
a6955f9fed | ||
|
|
3df02f9681 | ||
|
|
8252145146 | ||
|
|
621275639b | ||
|
|
b4d1a3a4b6 | ||
|
|
e76fffc617 | ||
|
|
f5f2b23a70 | ||
|
|
edf5b58da8 | ||
|
|
1c6fad9841 | ||
|
|
f02876e6c9 | ||
|
|
8fb6037362 | ||
|
|
a29f511f6d | ||
|
|
d36b2398b8 | ||
|
|
079e105618 | ||
|
|
885386fdba | ||
|
|
0220d7d176 | ||
|
|
9edc8a3834 | ||
|
|
ec7b01c24f | ||
|
|
52c2a2cd0d | ||
|
|
1079b1066c | ||
|
|
dadd07ccd7 | ||
|
|
91030433ce | ||
|
|
47aa718978 | ||
|
|
f31d910755 | ||
|
|
e635023cdb | ||
|
|
abf841fbd3 | ||
|
|
a8ae0680f2 | ||
|
|
ce1cadcacf | ||
|
|
276f260f65 | ||
|
|
934f291fd9 | ||
|
|
f7cb52d382 | ||
|
|
e12197e282 | ||
|
|
3bc0d023c8 | ||
|
|
783c146766 | ||
|
|
ff7f570599 | ||
|
|
c21497ec1a | ||
|
|
6cefd33cd0 | ||
|
|
ca0e17a45e | ||
|
|
c9aef92cab | ||
|
|
5e0550446c | ||
|
|
0989462639 | ||
|
|
43e499a4fa | ||
|
|
dd8b0fcfe4 | ||
|
|
71d279c040 | ||
|
|
090e4a6525 | ||
|
|
16913eedce | ||
|
|
5a8efeb9df | ||
|
|
bd3efd2a0f | ||
|
|
d2e204f3df | ||
|
|
968d376c5d | ||
|
|
178f81aa70 | ||
|
|
655219636b | ||
|
|
7013bd760e | ||
|
|
2a4ee1675d | ||
|
|
41b6f14acb | ||
|
|
23c1b92073 | ||
|
|
2ef14fcc12 | ||
|
|
a623a57d06 | ||
|
|
92dcb7ae3a | ||
|
|
66ff085861 | ||
|
|
c7f6b49e1e | ||
|
|
90bdf74053 | ||
|
|
729d68b703 | ||
|
|
257e0cdf18 | ||
|
|
5371e403ff | ||
|
|
a029d217c2 | ||
|
|
50f915572d | ||
|
|
60f46e4ea6 | ||
|
|
17b0474ec7 | ||
|
|
7a6c33e90b | ||
|
|
1f2696e9e7 | ||
|
|
e9b0f3e4ae | ||
|
|
5b0606009d | ||
|
|
4cd7a240d8 | ||
|
|
c7945787c5 | ||
|
|
62fd909705 | ||
|
|
7a439f4d21 | ||
|
|
5944cc8d99 | ||
|
|
a7d09741c2 | ||
|
|
bd8239b1cd | ||
|
|
a1524b78b6 | ||
|
|
22eab45ac9 | ||
|
|
b9811b773a | ||
|
|
42e83525db | ||
|
|
07b25e9686 | ||
|
|
ec0d05f858 | ||
|
|
31a4f12f4c | ||
|
|
363ecb3461 | ||
|
|
ff03bd56ff | ||
|
|
631f296b18 | ||
|
|
7c6595c926 | ||
|
|
38bef241a9 | ||
|
|
b0e9403d48 | ||
|
|
720c76980d | ||
|
|
b7f36fec39 | ||
|
|
a82deb1de2 | ||
|
|
78ab6c87ea | ||
|
|
77a1654ad5 | ||
|
|
800fb4613c | ||
|
|
76fa112490 | ||
|
|
8e1e25a631 | ||
|
|
d094064ffe | ||
|
|
26750d345c | ||
|
|
4f1a11b61f | ||
|
|
5100b62bdc | ||
|
|
97de7750ee | ||
|
|
cc7a2018b5 | ||
|
|
e733c2b11b | ||
|
|
4a638ed634 | ||
|
|
ae942fd5da | ||
|
|
bea4934c04 | ||
|
|
af870d2e32 | ||
|
|
65022ffef6 | ||
|
|
e7f280f745 | ||
|
|
d75bd8367d | ||
|
|
5c9afb798e | ||
|
|
83f8447c95 | ||
|
|
ef35dc4cd4 | ||
|
|
8f1bb6ffe0 | ||
|
|
3ad81fcdaa | ||
|
|
e71b215f0b | ||
|
|
c86a509af1 | ||
|
|
0568190e8b | ||
|
|
4c8660413a | ||
|
|
ce09bd623b | ||
|
|
eb9b436390 | ||
|
|
a3b0314c58 | ||
|
|
51dd97bebc | ||
|
|
24fcb55072 | ||
|
|
646850ee7b | ||
|
|
9a3db9de9c | ||
|
|
7fab5c03a9 | ||
|
|
4b3b56acd7 | ||
|
|
87c6729430 | ||
|
|
ba54f0956e | ||
|
|
e8e8da9efd | ||
|
|
897dd874a3 | ||
|
|
8419414b80 | ||
|
|
349bdc2bc5 | ||
|
|
04180e1f1d | ||
|
|
3c7f55855b | ||
|
|
24cbdd8dfa | ||
|
|
83533ddc5d | ||
|
|
e75b82fdf6 | ||
|
|
42516e6f86 | ||
|
|
54618cdad9 | ||
|
|
740137e51a | ||
|
|
a43eafaae4 | ||
|
|
1a10971865 | ||
|
|
f2c59b613b | ||
|
|
16ccce72d8 | ||
|
|
9257cd1783 | ||
|
|
15b0e9aa2b | ||
|
|
6b8d262b40 | ||
|
|
673c0d2675 | ||
|
|
ec252fae3f | ||
|
|
1508831725 | ||
|
|
829ffd3dfd | ||
|
|
bebede17c0 | ||
|
|
79f837715f | ||
|
|
ebe20bd63f | ||
|
|
5f21b20e72 | ||
|
|
4caa8e8ab3 | ||
|
|
254d365d5c | ||
|
|
4adb686fc1 | ||
|
|
7f4e85f650 | ||
|
|
73fea93181 | ||
|
|
2f8381e712 | ||
|
|
51cbe9d49e | ||
|
|
940b90e80a | ||
|
|
288a53369f | ||
|
|
7633675d11 | ||
|
|
846c9a151f | ||
|
|
44af047030 | ||
|
|
5222609f31 | ||
|
|
866c76ff1f | ||
|
|
fa87b811ad | ||
|
|
492ac5c64c | ||
|
|
169d0f8147 | ||
|
|
eabb9d37a7 | ||
|
|
6ad03f2a79 | ||
|
|
10bb31b434 | ||
|
|
4787f1eb0f | ||
|
|
62234b4f86 | ||
|
|
199b8b3bae | ||
|
|
51d9d503cd | ||
|
|
41bd89393e | ||
|
|
805824d4b6 | ||
|
|
6320bfa4fa | ||
|
|
2bd1bab4bb | ||
|
|
88fd0c6e0b | ||
|
|
3e0af488ee | ||
|
|
9eddff5940 | ||
|
|
31db130bbd | ||
|
|
26a17dbdb1 | ||
|
|
1b754f3098 | ||
|
|
dedc78b3fe | ||
|
|
16579322f1 | ||
|
|
8048bd0c3b | ||
|
|
bf4b2c7660 | ||
|
|
3525b77d69 | ||
|
|
fccfafe71f | ||
|
|
c41f0dc385 | ||
|
|
4229fa0082 | ||
|
|
2a225be9c7 | ||
|
|
f8a12b7577 | ||
|
|
ae44c27bb0 | ||
|
|
aa47ffd895 | ||
|
|
0c0a5c128d | ||
|
|
80c2ebe626 | ||
|
|
b476759ed0 | ||
|
|
67cb84debb | ||
|
|
5a86f845c2 | ||
|
|
6974551674 | ||
|
|
b8436f6b1e | ||
|
|
75b44379d3 | ||
|
|
562bb8a822 | ||
|
|
b47f82c498 | ||
|
|
40ccd1fe1f | ||
|
|
1217b7df39 | ||
|
|
551f6b9c72 | ||
|
|
c06110168c | ||
|
|
f92262928a | ||
|
|
09e087f0bd | ||
|
|
87ea5d920c | ||
|
|
cd7dac40f7 | ||
|
|
5ce6221efa | ||
|
|
2559ae50f0 | ||
|
|
3edeee197a | ||
|
|
42f9176669 | ||
|
|
149646c766 | ||
|
|
b315368a1b | ||
|
|
cbf12bc3a0 | ||
|
|
067b49c738 | ||
|
|
95e6f790de | ||
|
|
be5bd91e72 | ||
|
|
b25a7e510c | ||
|
|
a2cc5bd09b | ||
|
|
ae435c55fc | ||
|
|
64663cdb4e | ||
|
|
3ef0527eaf | ||
|
|
9fbf8b778b | ||
|
|
d1fa959960 | ||
|
|
f9daf01879 | ||
|
|
63cacc4411 | ||
|
|
6daa2edea5 | ||
|
|
6fb0e698ee | ||
|
|
e5348268a6 | ||
|
|
19f7b20dd0 | ||
|
|
00208f2db1 | ||
|
|
0ba776e27a | ||
|
|
6fc086e9f9 | ||
|
|
f1bc92a2dd | ||
|
|
cb48464859 | ||
|
|
823eec81c2 | ||
|
|
f024b0d884 | ||
|
|
94a402db7b | ||
|
|
8f4246a522 | ||
|
|
94ce2814e9 | ||
|
|
ee0ab65aaf | ||
|
|
c436fcd2aa | ||
|
|
cfcd31973d | ||
|
|
145fe577d2 | ||
|
|
5c0d39b9dc | ||
|
|
e0a5ca517f | ||
|
|
990f057b8d | ||
|
|
589c40a6d6 | ||
|
|
36a73c0ecd | ||
|
|
60122d3709 | ||
|
|
7638112ea8 | ||
|
|
dc1eef279e | ||
|
|
28000755c2 | ||
|
|
b9bf521a93 | ||
|
|
a44c2b9792 | ||
|
|
a326f0ff29 | ||
|
|
d27d6958c0 | ||
|
|
7b2903ad21 | ||
|
|
2774fd8af7 | ||
|
|
d552e6eba8 | ||
|
|
c25215106c | ||
|
|
653261e047 | ||
|
|
a2f3e249bc | ||
|
|
268bf7735b | ||
|
|
6914f21603 | ||
|
|
e5e44b6465 | ||
|
|
d53f699751 | ||
|
|
3c36d44472 | ||
|
|
2593f9fccc | ||
|
|
4e6d901bf8 | ||
|
|
e1d1a0cbd1 | ||
|
|
df834e5bb1 | ||
|
|
42d98f91c4 | ||
|
|
49ac670cfc | ||
|
|
20e226bc66 | ||
|
|
f05cca8aae | ||
|
|
74e87b6728 | ||
|
|
3cc4a66f2e | ||
|
|
b9d61bcdba | ||
|
|
e0fc2c6517 | ||
|
|
4dd52c3996 | ||
|
|
d39b10d9ae | ||
|
|
5a06e6f135 | ||
|
|
662800956b | ||
|
|
0576d04403 | ||
|
|
35a5bad950 | ||
|
|
af8bf30d06 | ||
|
|
7b9a4707ce | ||
|
|
2bdba4680c | ||
|
|
7b9ec90b4d | ||
|
|
4c7979877a | ||
|
|
18d65457dc | ||
|
|
0fb81692e3 | ||
|
|
465649d73e | ||
|
|
23672770ea | ||
|
|
9a969935cc | ||
|
|
d686c68707 | ||
|
|
aedea32f13 | ||
|
|
2d24d300d8 | ||
|
|
6bd528978c | ||
|
|
1162a844bd | ||
|
|
c130273ee0 | ||
|
|
9a19bd26d2 | ||
|
|
2b21d79f54 | ||
|
|
8ea5127ccb | ||
|
|
533cdcd07b | ||
|
|
5cbfffc005 | ||
|
|
26a48c4ed3 | ||
|
|
0cf8145d78 | ||
|
|
1cdc799701 | ||
|
|
da8e819955 | ||
|
|
9f2f97de73 | ||
|
|
1b27bad2b2 | ||
|
|
66adabc96d | ||
|
|
c21de7bd81 | ||
|
|
d26c712a99 | ||
|
|
5dc1ac791d | ||
|
|
1b4e140044 | ||
|
|
9e7369e4ae | ||
|
|
f3a1585e6e | ||
|
|
ee9e1f6155 | ||
|
|
5ce8d05a08 | ||
|
|
f098bb9f3a | ||
|
|
34a06b8de4 | ||
|
|
630a4062ff | ||
|
|
114bca41a2 | ||
|
|
efe8019eda | ||
|
|
09876a4386 | ||
|
|
d4f911f5b3 | ||
|
|
a644063830 | ||
|
|
6c8c9c6391 | ||
|
|
1920130fc9 | ||
|
|
ee7b4826c0 | ||
|
|
6a2df2daa4 | ||
|
|
1fe7baf787 | ||
|
|
f4668398e2 | ||
|
|
4f51600e20 | ||
|
|
505ba23a9d | ||
|
|
e42133e8e7 | ||
|
|
078408b8c2 | ||
|
|
3267accc9f | ||
|
|
8bde4b3800 | ||
|
|
f7afa613cf | ||
|
|
e5042dc193 | ||
|
|
cb7d3e95a2 | ||
|
|
c62c36a64d | ||
|
|
28d0c480b1 | ||
|
|
95c7699ae3 | ||
|
|
e2056540d5 | ||
|
|
bac154b896 | ||
|
|
be1073e772 | ||
|
|
5cc46f2f13 | ||
|
|
975edd5647 | ||
|
|
d351f6a015 | ||
|
|
1a5de6c46c | ||
|
|
e507660124 | ||
|
|
4090ef81ef | ||
|
|
f1bbc25546 | ||
|
|
7431ae12a4 | ||
|
|
1c4ee915c0 | ||
|
|
693ae6d6c4 | ||
|
|
83db573031 | ||
|
|
c737f90c1d | ||
|
|
154831efcf | ||
|
|
56560943df | ||
|
|
01df78dfd8 | ||
|
|
2963909063 | ||
|
|
82d1d82755 | ||
|
|
e64209b4d3 | ||
|
|
72235a6530 | ||
|
|
bc4aa5ca94 | ||
|
|
c5b700a311 | ||
|
|
9ee7d00d11 | ||
|
|
4c6e35634c | ||
|
|
27530522a8 | ||
|
|
b812f04d24 | ||
|
|
ee00f28629 | ||
|
|
9a662a134c | ||
|
|
d1ee964327 | ||
|
|
7373ecb1c0 | ||
|
|
174a3c2760 | ||
|
|
b1f7791a72 | ||
|
|
09cb758d9e | ||
|
|
499d42a6f4 | ||
|
|
86d0f6715e | ||
|
|
54b69c3595 | ||
|
|
928e0b2795 | ||
|
|
e323cd90f7 | ||
|
|
1439464358 | ||
|
|
88146cf500 | ||
|
|
5ce7c94536 | ||
|
|
33f7ff2b4d | ||
|
|
e34105a749 | ||
|
|
6b70a1362c | ||
|
|
d699a3abed | ||
|
|
cf90354ff9 | ||
|
|
83cf37f609 | ||
|
|
4cca85f525 | ||
|
|
ef7eb0fca4 | ||
|
|
cdde96f3a4 | ||
|
|
ab40ddbb2f | ||
|
|
e0c46d6761 | ||
|
|
0eb8d670c2 | ||
|
|
13b61ca7e5 | ||
|
|
7fc3d5137f | ||
|
|
a103f6bb83 | ||
|
|
ef291779fd | ||
|
|
59d42297fd | ||
|
|
5c6eb8b913 | ||
|
|
4ace08b64b | ||
|
|
569d1ab60e | ||
|
|
4284ae6cc6 | ||
|
|
89167fa56e | ||
|
|
fc05931696 | ||
|
|
1b6337d8b4 | ||
|
|
d8a192b5e1 | ||
|
|
f1327b5a5f | ||
|
|
e47b49f86d | ||
|
|
00918cb847 | ||
|
|
ccd189d30c | ||
|
|
e39bfefde9 | ||
|
|
24a9445906 | ||
|
|
b2bf4f18cc | ||
|
|
1a40cc79df | ||
|
|
009b6a8e9a | ||
|
|
bf8a60db4c | ||
|
|
cf6e5f1668 | ||
|
|
1a698a7e95 | ||
|
|
0f33e1d3d8 | ||
|
|
ab918abc1e | ||
|
|
471486732b | ||
|
|
ca1533509e |
1241 changed files with 40735 additions and 33384 deletions
156
CMakeLists.txt
156
CMakeLists.txt
|
|
@ -1,13 +1,41 @@
|
||||||
include(icecc.cmake) # this must be the first line!
|
include(cmake/Macros/icecc.cmake) # this must be the first line!
|
||||||
|
|
||||||
project(pysidebindings)
|
project(pysidebindings)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
|
||||||
|
${CMAKE_MODULE_PATH})
|
||||||
|
find_package(Shiboken 1.1.1 REQUIRED)
|
||||||
|
find_package(Qt4 4.5.0 REQUIRED)
|
||||||
|
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
|
||||||
|
include(FindQt4Extra)
|
||||||
|
|
||||||
if(CMAKE_HOST_UNIX)
|
set(XVFB_EXEC "")
|
||||||
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0)
|
option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping windows on the screen." FALSE)
|
||||||
|
if(USE_XVFB)
|
||||||
|
find_program(XVFB_RUN NAMES xvfb-run)
|
||||||
|
if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
|
||||||
|
set(XVFB_EXEC ${XVFB_RUN} -a)
|
||||||
|
message(STATUS "Using xvfb-run to perform QtGui tests.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_TESTS "Build tests." TRUE)
|
||||||
|
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
|
||||||
|
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
|
||||||
|
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
|
||||||
|
if(CMAKE_HOST_APPLE)
|
||||||
|
set(ALTERNATIVE_QT_INCLUDE_DIR "" CACHE PATH "The Alternative value to QT_INCLUDE_DIR. Necessary to fix bug on cmake 2.8 MACOS users")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
|
||||||
|
else()
|
||||||
|
if(CMAKE_HOST_UNIX AND NOT CYGWIN)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing")
|
||||||
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
|
option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0)
|
||||||
if(ENABLE_GCC_OPTIMIZATION)
|
if(ENABLE_GCC_OPTIMIZATION)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Os -Wl,-O1")
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -Os -Wl,-O1")
|
||||||
|
|
@ -20,35 +48,34 @@ if(CMAKE_HOST_UNIX)
|
||||||
if (NOT QT_INCLUDE_DIR)
|
if (NOT QT_INCLUDE_DIR)
|
||||||
set(QT_INCLUDE_DIR "/Library/Frameworks")
|
set(QT_INCLUDE_DIR "/Library/Frameworks")
|
||||||
endif()
|
endif()
|
||||||
|
if(ALTERNATIVE_QT_INCLUDE_DIR)
|
||||||
|
set(QT_INCLUDE_DIR ${ALTERNATIVE_QT_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
string(REPLACE " " ":" QT_INCLUDE_DIR ${QT_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(AVOID_PROTECTED_HACK "Avoid protected hack on generated bindings." FALSE)
|
|
||||||
if(AVOID_PROTECTED_HACK OR WIN32)
|
|
||||||
add_definitions(-DAVOID_PROTECTED_HACK)
|
|
||||||
message(STATUS "Avoiding protected hack!")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(PythonLibs REQUIRED)
|
|
||||||
find_package(PythonInterp REQUIRED)
|
|
||||||
find_package(Shiboken REQUIRED)
|
|
||||||
find_package(Qt4 4.5.0 REQUIRED)
|
|
||||||
|
|
||||||
set(BINDING_NAME PySide)
|
set(BINDING_NAME PySide)
|
||||||
set(BINDING_API_MAJOR_VERSION "0")
|
set(BINDING_API_MAJOR_VERSION "1")
|
||||||
set(BINDING_API_MINOR_VERSION "3")
|
set(BINDING_API_MINOR_VERSION "1")
|
||||||
set(BINDING_API_MICRO_VERSION "2")
|
set(BINDING_API_MICRO_VERSION "1")
|
||||||
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}")
|
set(BINDING_API_RELEASE_LEVEL "final") # alpha, beta, rc, or final
|
||||||
|
set(BINDING_API_SERIAL 1) # leave as 0 when release level is final
|
||||||
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
|
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version" FORCE)
|
||||||
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
|
if (BINDING_API_RELEASE_LEVEL STREQUAL "final")
|
||||||
|
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
|
||||||
if (NOT CMAKE_BUILD_TYPE)
|
CACHE STRING "PySide version [full]" FORCE)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
else()
|
||||||
|
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}~${BINDING_API_RELEASE_LEVEL}${BINDING_API_SERIAL}"
|
||||||
|
CACHE STRING "PySide version [full]" FORCE)
|
||||||
|
endif()
|
||||||
|
set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
|
||||||
|
if(ENABLE_VERSION_SUFFIX)
|
||||||
|
set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
@ -57,43 +84,41 @@ if (${QTVERSION} VERSION_LESS 4.5.0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configure OS support
|
# Configure OS support
|
||||||
|
set(ENABLE_X11 "0")
|
||||||
|
set(ENABLE_MAC "0")
|
||||||
|
set(ENABLE_WIN "0")
|
||||||
|
set(ENABLE_SIMULATOR "0")
|
||||||
if(Q_WS_X11)
|
if(Q_WS_X11)
|
||||||
set(ENABLE_X11 "1")
|
set(ENABLE_X11 "1")
|
||||||
set(ENABLE_MAC "0")
|
|
||||||
set(ENABLE_WIN "0")
|
|
||||||
if(Q_WS_MAEMO_5)
|
if(Q_WS_MAEMO_5)
|
||||||
set(AUTO_OS "MAEMO 5")
|
set(AUTO_OS "maemo")
|
||||||
else()
|
else()
|
||||||
set(AUTO_OS "X11")
|
set(AUTO_OS "x11")
|
||||||
endif()
|
endif()
|
||||||
elseif(Q_WS_MAC)
|
elseif(Q_WS_MAC)
|
||||||
set(ENABLE_X11 "0")
|
|
||||||
set(ENABLE_MAC "1")
|
set(ENABLE_MAC "1")
|
||||||
set(ENABLE_WIN "0")
|
set(AUTO_OS "mac")
|
||||||
set(AUTO_OS "MAC")
|
|
||||||
elseif(Q_WS_WIN)
|
elseif(Q_WS_WIN)
|
||||||
set(ENABLE_X11 "0")
|
|
||||||
set(ENABLE_MAC "0")
|
|
||||||
set(ENABLE_WIN "1")
|
set(ENABLE_WIN "1")
|
||||||
set(AUTO_OS "WIN")
|
set(AUTO_OS "win")
|
||||||
|
elseif(Q_WS_SIMULATOR)
|
||||||
|
set(ENABLE_SIMULATOR "1")
|
||||||
|
set(AUTO_OS "simulator")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "OS not supported")
|
message(FATAL_ERROR "OS not supported")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Detected OS: ${AUTO_OS}")
|
message(STATUS "Detected OS: ${AUTO_OS}")
|
||||||
|
|
||||||
# Define supported Qt Version
|
if (WIN32)
|
||||||
if(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
|
set(PATH_SEP "\;")
|
||||||
set(SUPPORTED_QT_VERSION 4.7)
|
|
||||||
else()
|
else()
|
||||||
set(SUPPORTED_QT_VERSION 4.6)
|
set(PATH_SEP ":")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Define supported Qt Version
|
||||||
|
set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
|
||||||
|
|
||||||
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
|
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
|
||||||
find_program(GENERATOR generatorrunner REQUIRED)
|
|
||||||
|
|
||||||
if (NOT GENERATOR)
|
|
||||||
message(FATAL_ERROR "You need to specify GENERATOR variable (-DGENERATOR=value)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# uninstall target
|
# uninstall target
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake"
|
||||||
|
|
@ -103,7 +128,7 @@ add_custom_target(uninstall "${CMAKE_COMMAND}"
|
||||||
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||||
|
|
||||||
|
|
||||||
set(ARCHIVE_NAME pyside-qt${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}+${BINDING_API_VERSION})
|
set(ARCHIVE_NAME pyside-qt${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}+${BINDING_API_VERSION_FULL})
|
||||||
add_custom_target(dist
|
add_custom_target(dist
|
||||||
COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" &&
|
COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" &&
|
||||||
git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" &&
|
git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" &&
|
||||||
|
|
@ -113,21 +138,42 @@ add_custom_target(dist
|
||||||
echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n"
|
echo "Source package created at ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.bz2.\n"
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
|
|
||||||
execute_process(
|
if (NOT SITE_PACKAGE)
|
||||||
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; \\
|
execute_process(
|
||||||
print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}')"
|
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "from distutils import sysconfig; \\
|
||||||
|
print(sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||||
OUTPUT_VARIABLE SITE_PACKAGE
|
OUTPUT_VARIABLE SITE_PACKAGE
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if (NOT SITE_PACKAGE)
|
if (NOT SITE_PACKAGE)
|
||||||
message(FATAL_ERROR "Could not detect Python module installation directory.")
|
message(FATAL_ERROR "Could not detect Python module installation directory.")
|
||||||
|
elseif (APPLE)
|
||||||
|
message(STATUS "!!! The generated bindings will be installed on ${SITE_PACKAGE}, is it right!?")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(GENERATOR_EXTRA_FLAGS --generatorSet=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic)
|
set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero)
|
||||||
|
if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
|
||||||
enable_testing()
|
message(STATUS "PySide will be generated avoiding the protected hack!")
|
||||||
|
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
|
||||||
|
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||||
|
else()
|
||||||
|
message(STATUS "PySide will be generated using the protected hack!")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libpyside)
|
add_subdirectory(libpyside)
|
||||||
|
if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
|
||||||
|
add_subdirectory(plugins)
|
||||||
|
endif()
|
||||||
# project directories
|
# project directories
|
||||||
add_subdirectory(${BINDING_NAME})
|
add_subdirectory(PySide)
|
||||||
add_subdirectory(tests)
|
if (BUILD_TESTS)
|
||||||
add_subdirectory(doc)
|
enable_testing()
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
find_program(DOT_EXEC dot)
|
||||||
|
if (QT_SRC_DIR AND DOT_EXEC)
|
||||||
|
add_subdirectory(doc)
|
||||||
|
else ()
|
||||||
|
message(STATUS "QT_SRC_DIR variable not set or graphviz not found, apidoc generation targets disabled.")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1,83 +1,13 @@
|
||||||
project(pyside)
|
project(pyside)
|
||||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
|
|
||||||
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}")
|
|
||||||
|
|
||||||
macro(execute_generator module sources typesystem_path)
|
include(PySideModules)
|
||||||
add_custom_command(OUTPUT ${${sources}}
|
|
||||||
COMMAND ${GENERATOR} ${GENERATOR_EXTRA_FLAGS}
|
|
||||||
${CMAKE_BINARY_DIR}/PySide/global.h
|
|
||||||
--include-paths=${pyside_SOURCE_DIR}:${QT_INCLUDE_DIR}
|
|
||||||
--typesystem-paths=${pyside_SOURCE_DIR}:${typesystem_path}
|
|
||||||
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${module}.xml
|
|
||||||
--api-version=${SUPPORTED_QT_VERSION}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
COMMENT "Running generator for ${module}..."
|
|
||||||
)
|
|
||||||
endmacro(execute_generator)
|
|
||||||
|
|
||||||
# Configure include based on platform
|
# Configure include based on platform
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/global.h" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h" @ONLY)
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
|
||||||
# Only add subdirectory if the associated Qt module is found.
|
"${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
|
||||||
macro(HAS_QT_MODULE var name)
|
|
||||||
if (DISABLE_${name})
|
|
||||||
message(STATUS "Generation of ${name} disabled.")
|
|
||||||
else()
|
|
||||||
if (${var})
|
|
||||||
add_subdirectory(${name})
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/${name}/${name}${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_MODULE_SUFFIX}"
|
|
||||||
"${CMAKE_BINARY_DIR}/PySide/${name}${CMAKE_SHARED_MODULE_SUFFIX}")
|
|
||||||
else()
|
|
||||||
message(STATUS "${name} NOT found. ${name} support disabled.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endmacro(HAS_QT_MODULE)
|
|
||||||
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
|
|
||||||
"${CMAKE_BINARY_DIR}/PySide/__init__.py")
|
|
||||||
# Try to find QtMultimedia
|
|
||||||
# TODO: Remove this hack when cmake support QtMultimedia module
|
|
||||||
if (NOT QT_QTMULTIMEDIA_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
|
|
||||||
find_path(QT_QTMULTIMEDIA_INCLUDE_DIR QtMultimedia
|
|
||||||
PATHS ${QT_HEADERS_DIR}/QtMultimedia
|
|
||||||
${QT_LIBRARY_DIR}/QtMultimedia.framework/Headers
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
find_library(QT_QTMULTIMEDIA_LIBRARY QtMultimedia PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
|
||||||
if (QT_QTMULTIMEDIA_INCLUDE_DIR AND QT_QTMULTIMEDIA_LIBRARY)
|
|
||||||
set(QT_QTMULTIMEDIA_FOUND ON)
|
|
||||||
endif()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Try to find QtMaemo5 - it has to be done before QtGui to enable some QtMaemo5 flags
|
|
||||||
# TODO: Remove this hack when cmake support QtMaemo5 module
|
|
||||||
if (NOT QT_QTMAEMO5_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
|
|
||||||
find_path(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
|
|
||||||
PATHS ${QT_HEADERS_DIR}/QtMaemo5
|
|
||||||
${QT_LIBRARY_DIR}/QtMaemo5.framework/Headers
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
find_library(QT_QTMAEMO5_LIBRARY QtMaemo5 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
|
||||||
if (QT_QTMAEMO5_INCLUDE_DIR AND QT_QTMAEMO5_LIBRARY)
|
|
||||||
set(QT_QTMAEMO5_FOUND ON)
|
|
||||||
set(Q_WS_MAEMO_5 ON)
|
|
||||||
endif()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Try to find QtDeclarative
|
|
||||||
# TODO: Remove this hack when cmake support QtDeclarative module
|
|
||||||
if (NOT QT_QTDECLARATIVE_FOUND AND ${QTVERSION} VERSION_GREATER 4.6.0)
|
|
||||||
find_path(QT_QTDECLARATIVE_INCLUDE_DIR QtDeclarative
|
|
||||||
PATHS ${QT_HEADERS_DIR}/QtDeclarative
|
|
||||||
${QT_LIBRARY_DIR}/QtDeclarative.framework/Headers
|
|
||||||
NO_DEFAULT_PATH)
|
|
||||||
find_library(QT_QTDECLARATIVE_LIBRARY QtDeclarative PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
|
||||||
if (QT_QTDECLARATIVE_INCLUDE_DIR AND QT_QTDECLARATIVE_LIBRARY)
|
|
||||||
set(QT_QTDECLARATIVE_FOUND ON)
|
|
||||||
endif()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
HAS_QT_MODULE(QT_QTCORE_FOUND QtCore)
|
HAS_QT_MODULE(QT_QTCORE_FOUND QtCore)
|
||||||
HAS_QT_MODULE(QT_QTGUI_FOUND QtGui)
|
HAS_QT_MODULE(QT_QTGUI_FOUND QtGui)
|
||||||
|
|
@ -88,7 +18,9 @@ HAS_QT_MODULE(QT_QTXML_FOUND QtXml)
|
||||||
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
|
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
|
||||||
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
|
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
|
||||||
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
|
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
|
||||||
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
|
if(QT_QTDESIGNER_FOUND)
|
||||||
|
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
|
||||||
|
endif()
|
||||||
HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
|
HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
|
||||||
HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns)
|
HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns)
|
||||||
HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5)
|
HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5)
|
||||||
|
|
@ -97,3 +29,12 @@ HAS_QT_MODULE(QT_QTSCRIPTTOOLS_FOUND QtScriptTools)
|
||||||
HAS_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia)
|
HAS_QT_MODULE(QT_QTMULTIMEDIA_FOUND QtMultimedia)
|
||||||
HAS_QT_MODULE(QT_PHONON_FOUND phonon)
|
HAS_QT_MODULE(QT_PHONON_FOUND phonon)
|
||||||
HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
|
HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
|
||||||
|
|
||||||
|
# install
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
|
||||||
|
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
|
||||||
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
|
||||||
|
DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h
|
||||||
|
DESTINATION include/${BINDING_NAME}${pyside_SUFFIX})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
project(QtCore)
|
project(QtCore)
|
||||||
|
|
||||||
|
set(QtCore_gluecode "${CMAKE_CURRENT_SOURCE_DIR}/glue/qeasingcurve_glue.cpp")
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
||||||
set (QtCore_46_SRC )
|
set (QtCore_46_SRC )
|
||||||
else()
|
else()
|
||||||
|
|
@ -34,7 +36,14 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_WIN)
|
||||||
|
set(SPECIFIC_OS_FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/msg_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/point_wrapper.cpp
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(SPECIFIC_OS_FILES "")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(QtCore_SRC
|
set(QtCore_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qabstracteventdispatcher_wrapper.cpp
|
||||||
|
|
@ -49,7 +58,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbitarray_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbuffer_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbuffer_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearray_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearray_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearraymatcher_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qbytearraymatcher_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qchar_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qchildevent_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qchildevent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcoreapplication_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcoreapplication_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcryptographichash_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qcryptographichash_wrapper.cpp
|
||||||
|
|
@ -61,7 +69,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdiriterator_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdynamicpropertychangeevent_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qdynamicpropertychangeevent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qevent_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qevent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qeventloop_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qeventloop_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/qfactoryinterface_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfactoryinterface_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfile_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfile_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfileinfo_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfileinfo_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfilesystemwatcher_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfilesystemwatcher_wrapper.cpp
|
||||||
|
|
@ -69,8 +77,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qfsfileengine_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericargument_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericargument_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericreturnargument_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qgenericreturnargument_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qiodevice_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qiodevice_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlatin1char_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlatin1string_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlibraryinfo_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlibraryinfo_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qline_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qline_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlinef_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qlinef_wrapper.cpp
|
||||||
|
|
@ -86,6 +92,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmutex_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmutexlocker_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qmutexlocker_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qobject_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qobject_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpersistentmodelindex_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpersistentmodelindex_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpluginloader_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpoint_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpoint_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpointf_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qpointf_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qprocess_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qprocess_wrapper.cpp
|
||||||
|
|
@ -95,16 +102,13 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrect_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrectf_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrectf_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qregexp_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qregexp_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qresource_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qresource_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qrunnable_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsemaphore_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsemaphore_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsettings_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsettings_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsignalmapper_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsignalmapper_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsize_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsize_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsizef_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsizef_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsocketnotifier_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsocketnotifier_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstring_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstringlist_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstringmatcher_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qstringref_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsysinfo_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsysinfo_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemlocale_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemlocale_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemsemaphore_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qsystemsemaphore_wrapper.cpp
|
||||||
|
|
@ -120,6 +124,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextencoder_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstream_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstream_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstreammanipulator_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtextstreammanipulator_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qthread_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qthread_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qthreadpool_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtime_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtime_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimeline_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimeline_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimer_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimer_wrapper.cpp
|
||||||
|
|
@ -127,7 +132,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtimerevent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtranslator_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qtranslator_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qurl_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qurl_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/quuid_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/quuid_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qvariant_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwaitcondition_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwaitcondition_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwritelocker_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qwritelocker_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamattribute_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamattribute_wrapper.cpp
|
||||||
|
|
@ -140,28 +144,30 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamreader_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamwriter_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/qxmlstreamwriter_wrapper.cpp
|
||||||
${QtCore_46_SRC}
|
${QtCore_46_SRC}
|
||||||
${QtCore_47_SRC}
|
${QtCore_47_SRC}
|
||||||
|
${SPECIFIC_OS_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(core QtCore_SRC "${CMAKE_CURRENT_BINARY_DIR}")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_core.xml.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_core.xml" @ONLY)
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtCore_typesystem_path "${QtCore_SOURCE_DIR}")
|
||||||
|
|
||||||
|
set(QtCore_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/
|
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtCore/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR})
|
||||||
)
|
set(QtCore_libraries pyside
|
||||||
add_library(QtCore MODULE ${QtCore_SRC})
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
set_property(TARGET QtCore PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtCore
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY})
|
||||||
)
|
|
||||||
|
|
||||||
# install
|
create_pyside_module(QtCore
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtCore${CMAKE_DEBUG_POSTFIX}.so
|
QtCore_include_dirs
|
||||||
DESTINATION ${SITE_PACKAGE}/${BINDING_NAME})
|
QtCore_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/pyside_qtcore_python.h
|
""
|
||||||
DESTINATION include/PySide/QtCore/)
|
QtCore_typesystem_path
|
||||||
|
QtCore_SRC
|
||||||
|
QtCore_gluecode
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_core.xml)
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ static Py_ssize_t SbkQByteArray_segcountproc(PyObject* self, Py_ssize_t* lenp)
|
||||||
|
|
||||||
static Py_ssize_t SbkQByteArray_readbufferproc(PyObject* self, Py_ssize_t segment, void** ptrptr)
|
static Py_ssize_t SbkQByteArray_readbufferproc(PyObject* self, Py_ssize_t segment, void** ptrptr)
|
||||||
{
|
{
|
||||||
if (segment || Shiboken::cppObjectIsInvalid(self))
|
if (segment || !Shiboken::Object::isValid(self))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
QByteArray* cppSelf = Converter<QByteArray*>::toCpp(self);
|
QByteArray* cppSelf = %CONVERTTOCPP[QByteArray*](self);
|
||||||
*ptrptr = reinterpret_cast<void*>(cppSelf->data());
|
*ptrptr = reinterpret_cast<void*>(cppSelf->data());
|
||||||
return cppSelf->size();
|
return cppSelf->size();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,43 +2,23 @@
|
||||||
static int QCoreApplicationArgCount;
|
static int QCoreApplicationArgCount;
|
||||||
static char** QCoreApplicationArgValues;
|
static char** QCoreApplicationArgValues;
|
||||||
|
|
||||||
/**
|
void QCoreApplication_constructor(PyObject* self, PyObject* args, QCoreApplicationWrapper** cptr)
|
||||||
* Called at QtCore module exit
|
|
||||||
*/
|
|
||||||
void DeleteQCoreApplicationAtExit() {
|
|
||||||
if (QCoreApplication::instance()) {
|
|
||||||
delete QCoreApplication::instance();
|
|
||||||
for (int i = 0; i < QCoreApplicationArgCount; ++i)
|
|
||||||
delete[] QCoreApplicationArgValues[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int SbkQCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
|
|
||||||
{
|
{
|
||||||
if (QCoreApplication::instance()) {
|
if (QCoreApplication::instance()) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, "A QCoreApplication instance already exists.");
|
PyErr_SetString(PyExc_RuntimeError, "A QCoreApplication instance already exists.");
|
||||||
return -1;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numArgs = PyTuple_GET_SIZE(args);
|
int numArgs = PyTuple_GET_SIZE(args);
|
||||||
if (numArgs != 1) {
|
if (numArgs != 1
|
||||||
|
|| !Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
|
||||||
PyErr_BadArgument();
|
PyErr_BadArgument();
|
||||||
return -1;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PySequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
|
*cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
|
||||||
PyErr_BadArgument();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void* cptr = new QCoreApplication(QCoreApplicationArgCount, QCoreApplicationArgValues);
|
|
||||||
Shiboken::setCppPointer(reinterpret_cast<SbkBaseWrapper*>(self),
|
|
||||||
Shiboken::SbkType<QCoreApplication>(),
|
|
||||||
cptr);
|
|
||||||
SbkBaseWrapper_setValidCppObject(self, 1);
|
|
||||||
Shiboken::BindingManager::instance().registerWrapper(reinterpret_cast<SbkBaseWrapper*>(self), cptr);
|
|
||||||
|
|
||||||
|
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
|
||||||
|
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
|
||||||
Py_INCREF(self);
|
Py_INCREF(self);
|
||||||
Py_AtExit(DeleteQCoreApplicationAtExit);
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
120
PySide/QtCore/glue/qeasingcurve_glue.cpp
Normal file
120
PySide/QtCore/glue/qeasingcurve_glue.cpp
Normal file
|
|
@ -0,0 +1,120 @@
|
||||||
|
#include <Python.h>
|
||||||
|
#include <shiboken.h>
|
||||||
|
#include <pysideweakref.h>
|
||||||
|
#include <QEasingCurve>
|
||||||
|
|
||||||
|
#include "glue/qeasingcurve_glue.h"
|
||||||
|
|
||||||
|
#define __ECF_ATT_NAME__ "__ecf__"
|
||||||
|
#define MAX_CUSTOM_FUNCTIONS 10
|
||||||
|
|
||||||
|
static void deleteData(void* data);
|
||||||
|
|
||||||
|
struct CustomFunctionsData
|
||||||
|
{
|
||||||
|
static CustomFunctionsData m_list[MAX_CUSTOM_FUNCTIONS];
|
||||||
|
|
||||||
|
PySideEasingCurveFunctor* m_obj;
|
||||||
|
QEasingCurve::EasingFunction m_func;
|
||||||
|
};
|
||||||
|
|
||||||
|
CustomFunctionsData CustomFunctionsData::m_list[MAX_CUSTOM_FUNCTIONS];
|
||||||
|
|
||||||
|
template<int N>
|
||||||
|
struct CustomFunctions
|
||||||
|
{
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
CustomFunctionsData data;
|
||||||
|
data.m_obj = 0;
|
||||||
|
data.m_func = &CustomFunctions<N>::callback;
|
||||||
|
CustomFunctionsData::m_list[N] = data;
|
||||||
|
|
||||||
|
CustomFunctions<N-1>::init();
|
||||||
|
}
|
||||||
|
|
||||||
|
static qreal callback(qreal v)
|
||||||
|
{
|
||||||
|
return (*CustomFunctionsData::m_list[N].m_obj)(v);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct CustomFunctions<0>
|
||||||
|
{
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
CustomFunctionsData data;
|
||||||
|
data.m_obj = 0;
|
||||||
|
data.m_func = &CustomFunctions<0>::callback;
|
||||||
|
CustomFunctionsData::m_list[0] = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static qreal callback(qreal v)
|
||||||
|
{
|
||||||
|
return (*CustomFunctionsData::m_list[0].m_obj)(v);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void deleteData(void* data)
|
||||||
|
{
|
||||||
|
delete (PySideEasingCurveFunctor*)(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PySideEasingCurveFunctor::init()
|
||||||
|
{
|
||||||
|
CustomFunctions<MAX_CUSTOM_FUNCTIONS-1>::init();
|
||||||
|
}
|
||||||
|
|
||||||
|
QEasingCurve::EasingFunction PySideEasingCurveFunctor::createCustomFuntion(PyObject* parent, PyObject* pyFunc)
|
||||||
|
{
|
||||||
|
for(int i=0; i < MAX_CUSTOM_FUNCTIONS; i++) {
|
||||||
|
CustomFunctionsData& data = CustomFunctionsData::m_list[i];
|
||||||
|
if (data.m_obj == 0) {
|
||||||
|
data.m_obj = new PySideEasingCurveFunctor(i, parent, pyFunc);
|
||||||
|
return data.m_func;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//PyErr_Format(PyExc_RuntimeError, "PySide only supports %d custom functions simultaneously.", MAX_CUSTOM_FUNCTIONS);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideEasingCurveFunctor::~PySideEasingCurveFunctor()
|
||||||
|
{
|
||||||
|
|
||||||
|
CustomFunctionsData::m_list[m_index].m_obj = 0;
|
||||||
|
PyObject_SetAttrString(m_parent, __ECF_ATT_NAME__, Py_None);
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal PySideEasingCurveFunctor::operator()(qreal progress)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
PyObject* args = Py_BuildValue("(f)", progress);
|
||||||
|
PyObject* result = PyObject_CallObject(m_func, args);
|
||||||
|
qreal cppResult = 0.0;
|
||||||
|
if (result) {
|
||||||
|
Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter<qreal>(), result, &cppResult);
|
||||||
|
Py_DECREF(result);
|
||||||
|
}
|
||||||
|
Py_DECREF(args);
|
||||||
|
return cppResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* PySideEasingCurveFunctor::callable()
|
||||||
|
{
|
||||||
|
Py_INCREF(m_func);
|
||||||
|
return m_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* PySideEasingCurveFunctor::callable(PyObject* parent)
|
||||||
|
{
|
||||||
|
return PyObject_GetAttrString(parent, __ECF_ATT_NAME__);
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideEasingCurveFunctor::PySideEasingCurveFunctor(int index, PyObject* parent, PyObject* pyFunc)
|
||||||
|
: m_parent(parent), m_func(pyFunc), m_index(index)
|
||||||
|
{
|
||||||
|
PyObject_SetAttrString(m_parent, __ECF_ATT_NAME__, m_func);
|
||||||
|
PySide::WeakRef::create(m_parent, deleteData, this);
|
||||||
|
}
|
||||||
|
|
||||||
27
PySide/QtCore/glue/qeasingcurve_glue.h
Normal file
27
PySide/QtCore/glue/qeasingcurve_glue.h
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#ifndef __QEASINGCURVE_GLUE__
|
||||||
|
#define __QEASINGCURVE_GLUE__
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
#include <QEasingCurve>
|
||||||
|
|
||||||
|
class PySideEasingCurveFunctor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void init();
|
||||||
|
static QEasingCurve::EasingFunction createCustomFuntion(PyObject* parent, PyObject* pyFunc);
|
||||||
|
|
||||||
|
qreal operator()(qreal progress);
|
||||||
|
|
||||||
|
PyObject* callable(); //Return New reference
|
||||||
|
static PyObject* callable(PyObject* parent); //Return New reference
|
||||||
|
|
||||||
|
~PySideEasingCurveFunctor();
|
||||||
|
private:
|
||||||
|
PyObject* m_parent;
|
||||||
|
PyObject* m_func;
|
||||||
|
int m_index;
|
||||||
|
|
||||||
|
PySideEasingCurveFunctor(int index, PyObject* parent, PyObject *pyFunc);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,23 +1,46 @@
|
||||||
static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self)
|
static bool isDecorator(PyObject* method, PyObject* self)
|
||||||
{
|
{
|
||||||
|
Shiboken::AutoDecRef methodName(PyObject_GetAttrString(method, "__name__"));
|
||||||
|
if (!PyObject_HasAttr(self, methodName))
|
||||||
|
return true;
|
||||||
|
Shiboken::AutoDecRef otherMethod(PyObject_GetAttr(self, methodName));
|
||||||
|
return reinterpret_cast<PyMethodObject*>(otherMethod.object())->im_func != \
|
||||||
|
reinterpret_cast<PyMethodObject*>(method)->im_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool getReceiver(QObject *source, const char* signal, PyObject* callback, QObject** receiver, PyObject** self, QByteArray* callbackSig)
|
||||||
|
{
|
||||||
|
bool forceGlobalReceiver = false;
|
||||||
if (PyMethod_Check(callback)) {
|
if (PyMethod_Check(callback)) {
|
||||||
*self = PyMethod_GET_SELF(callback);
|
*self = PyMethod_GET_SELF(callback);
|
||||||
if (SbkQObject_Check(*self))
|
if (%CHECKTYPE[QObject*](*self))
|
||||||
*receiver = Converter<QObject*>::toCpp(*self);
|
*receiver = %CONVERTTOCPP[QObject*](*self);
|
||||||
|
forceGlobalReceiver = isDecorator(callback, *self);
|
||||||
} else if (PyCFunction_Check(callback)) {
|
} else if (PyCFunction_Check(callback)) {
|
||||||
*self = PyCFunction_GET_SELF(callback);
|
*self = PyCFunction_GET_SELF(callback);
|
||||||
if (*self && SbkQObject_Check(*self))
|
if (*self && %CHECKTYPE[QObject*](*self))
|
||||||
*receiver = Converter<QObject*>::toCpp(*self);
|
*receiver = %CONVERTTOCPP[QObject*](*self);
|
||||||
} else if (PyCallable_Check(callback)) {
|
} else if (PyCallable_Check(callback)) {
|
||||||
// Ok, just a callable object
|
// Ok, just a callable object
|
||||||
*receiver = 0;
|
*receiver = 0;
|
||||||
*self = 0;
|
*self = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool usingGlobalReceiver = !*receiver;
|
bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
|
||||||
|
|
||||||
|
// Check if this callback is a overwrite of a non-virtual Qt slot.
|
||||||
|
if (!usingGlobalReceiver && receiver && self) {
|
||||||
|
*callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toAscii();
|
||||||
|
const QMetaObject* metaObject = (*receiver)->metaObject();
|
||||||
|
int slotIndex = metaObject->indexOfSlot(callbackSig->constData());
|
||||||
|
if (slotIndex != -1 && slotIndex < metaObject->methodOffset() && PyMethod_Check(callback))
|
||||||
|
usingGlobalReceiver = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (usingGlobalReceiver) {
|
if (usingGlobalReceiver) {
|
||||||
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
||||||
*receiver = signalManager.globalReceiver();
|
*receiver = signalManager.globalReceiver(source, callback);
|
||||||
|
*callbackSig = PySide::Signal::getCallbackSignature(signal, *receiver, callback, usingGlobalReceiver).toAscii();
|
||||||
}
|
}
|
||||||
|
|
||||||
return usingGlobalReceiver;
|
return usingGlobalReceiver;
|
||||||
|
|
@ -25,13 +48,17 @@ static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self)
|
||||||
|
|
||||||
static bool qobjectConnect(QObject* source, const char* signal, QObject* receiver, const char* slot, Qt::ConnectionType type)
|
static bool qobjectConnect(QObject* source, const char* signal, QObject* receiver, const char* slot, Qt::ConnectionType type)
|
||||||
{
|
{
|
||||||
if (!PySide::checkSignal(signal))
|
if (!signal || !slot)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!PySide::Signal::checkQtSignal(signal))
|
||||||
return false;
|
return false;
|
||||||
signal++;
|
signal++;
|
||||||
|
|
||||||
PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal);
|
if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
|
||||||
|
return false;
|
||||||
|
|
||||||
bool isSignal = PySide::isSignal(slot);
|
bool isSignal = PySide::Signal::isQtSignal(slot);
|
||||||
slot++;
|
slot++;
|
||||||
PySide::SignalManager::registerMetaMethod(receiver, slot, isSignal ? QMetaMethod::Signal : QMetaMethod::Slot);
|
PySide::SignalManager::registerMetaMethod(receiver, slot, isSignal ? QMetaMethod::Signal : QMetaMethod::Slot);
|
||||||
return QObject::connect(source, signal - 1, receiver, slot - 1, type);
|
return QObject::connect(source, signal - 1, receiver, slot - 1, type);
|
||||||
|
|
@ -39,58 +66,73 @@ static bool qobjectConnect(QObject* source, const char* signal, QObject* receive
|
||||||
|
|
||||||
static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject* callback, Qt::ConnectionType type)
|
static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject* callback, Qt::ConnectionType type)
|
||||||
{
|
{
|
||||||
if (!PySide::checkSignal(signal))
|
if (!signal || !PySide::Signal::checkQtSignal(signal))
|
||||||
return false;
|
return false;
|
||||||
signal++;
|
signal++;
|
||||||
|
|
||||||
PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal);
|
int signalIndex = PySide::SignalManager::registerMetaMethodGetIndex(source, signal, QMetaMethod::Signal);
|
||||||
int signalIndex = source->metaObject()->indexOfMethod(signal);
|
if (signalIndex == -1)
|
||||||
|
return false;
|
||||||
|
|
||||||
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
||||||
|
|
||||||
// Extract receiver from callback
|
// Extract receiver from callback
|
||||||
QObject* receiver = 0;
|
QObject* receiver = 0;
|
||||||
PyObject* self = 0;
|
PyObject* self = 0;
|
||||||
bool usingGlobalReceiver = getReceiver(callback, &receiver, &self);
|
QByteArray callbackSig;
|
||||||
|
bool usingGlobalReceiver = getReceiver(source, signal, callback, &receiver, &self, &callbackSig);
|
||||||
if (receiver == 0 && self == 0)
|
if (receiver == 0 && self == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const QMetaObject* metaObject = receiver->metaObject();
|
const QMetaObject* metaObject = receiver->metaObject();
|
||||||
const QByteArray callbackSig = PySide::getCallbackSignature(signal, callback, usingGlobalReceiver).toAscii();
|
|
||||||
const char* slot = callbackSig.constData();
|
const char* slot = callbackSig.constData();
|
||||||
int slotIndex = metaObject->indexOfSlot(slot);
|
int slotIndex = metaObject->indexOfSlot(slot);
|
||||||
|
|
||||||
if (slotIndex == -1) {
|
if (slotIndex == -1) {
|
||||||
if (!usingGlobalReceiver && self && !((SbkBaseWrapper*)self)->containsCppWrapper) {
|
if (!usingGlobalReceiver && self && !Shiboken::Object::hasCppWrapper((SbkObject*)self)) {
|
||||||
qWarning() << "You can't add dynamic slots on an object originated from C++.";
|
qWarning() << "You can't add dynamic slots on an object originated from C++.";
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (usingGlobalReceiver) {
|
|
||||||
signalManager.addGlobalSlot(slot, callback);
|
if (usingGlobalReceiver)
|
||||||
} else {
|
slotIndex = signalManager.globalReceiverSlotIndex(receiver, slot);
|
||||||
PySide::SignalManager::registerMetaMethod(receiver, slot, QMetaMethod::Slot);
|
else
|
||||||
|
slotIndex = PySide::SignalManager::registerMetaMethodGetIndex(receiver, slot, QMetaMethod::Slot);
|
||||||
|
|
||||||
|
if (slotIndex == -1) {
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
slotIndex = metaObject->indexOfSlot(slot);
|
|
||||||
}
|
}
|
||||||
if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) {
|
if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) {
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.notifyGlobalReceiver(receiver);
|
||||||
#ifndef AVOID_PROTECTED_HACK
|
#ifndef AVOID_PROTECTED_HACK
|
||||||
source->connectNotify(signal);
|
source->connectNotify(signal - 1);
|
||||||
#else
|
#else
|
||||||
// Need to cast to QObjectWrapper* and call the public version of
|
// Need to cast to QObjectWrapper* and call the public version of
|
||||||
// connectNotify when avoiding the protected hack.
|
// connectNotify when avoiding the protected hack.
|
||||||
reinterpret_cast<QObjectWrapper*>(source)->connectNotify(signal);
|
reinterpret_cast<QObjectWrapper*>(source)->connectNotify(signal - 1);
|
||||||
#endif
|
#endif
|
||||||
if (usingGlobalReceiver)
|
|
||||||
signalManager.globalReceiverConnectNotify(source, slotIndex);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool qobjectDisconnectCallback(QObject* source, const char* signal, PyObject* callback)
|
static bool qobjectDisconnectCallback(QObject* source, const char* signal, PyObject* callback)
|
||||||
{
|
{
|
||||||
if (!PySide::checkSignal(signal))
|
if (!PySide::Signal::checkQtSignal(signal))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
||||||
|
|
@ -98,20 +140,28 @@ static bool qobjectDisconnectCallback(QObject* source, const char* signal, PyObj
|
||||||
// Extract receiver from callback
|
// Extract receiver from callback
|
||||||
QObject* receiver = 0;
|
QObject* receiver = 0;
|
||||||
PyObject* self = 0;
|
PyObject* self = 0;
|
||||||
bool usingGlobalReceiver = getReceiver(callback, &receiver, &self);
|
QByteArray callbackSig;
|
||||||
|
bool usingGlobalReceiver = getReceiver(NULL, signal, callback, &receiver, &self, &callbackSig);
|
||||||
if (receiver == 0 && self == 0)
|
if (receiver == 0 && self == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const QMetaObject* metaObject = receiver->metaObject();
|
const QMetaObject* metaObject = receiver->metaObject();
|
||||||
const QByteArray callbackSig = PySide::getCallbackSignature(signal, callback, usingGlobalReceiver).toAscii();
|
int signalIndex = source->metaObject()->indexOfSignal(++signal);
|
||||||
QByteArray qtSlotName(callbackSig);
|
int slotIndex = -1;
|
||||||
qtSlotName = qtSlotName.prepend('1');
|
|
||||||
|
|
||||||
if (QObject::disconnect(source, signal, receiver, qtSlotName.constData())) {
|
slotIndex = metaObject->indexOfSlot(callbackSig);
|
||||||
if (usingGlobalReceiver) {
|
|
||||||
int slotIndex = metaObject->indexOfSlot(callbackSig.constData());
|
if (QMetaObject::disconnectOne(source, signalIndex, receiver, slotIndex)) {
|
||||||
signalManager.globalReceiverDisconnectNotify(source, slotIndex);
|
if (usingGlobalReceiver)
|
||||||
}
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
|
#ifndef AVOID_PROTECTED_HACK
|
||||||
|
source->disconnectNotify(callbackSig);
|
||||||
|
#else
|
||||||
|
// Need to cast to QObjectWrapper* and call the public version of
|
||||||
|
// connectNotify when avoiding the protected hack.
|
||||||
|
reinterpret_cast<QObjectWrapper*>(source)->disconnectNotify(callbackSig);
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,23 @@ static QObject* _findChildHelper(const QObject* parent, const QString& name, PyT
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _findChildrenHelper(const QObject* parent, const QString& name, PyTypeObject* desiredType, PyObject* result)
|
static inline bool _findChildrenComparator(const QObject*& child, const QRegExp& name)
|
||||||
{
|
{
|
||||||
foreach(QObject* child, parent->children()) {
|
return name.indexIn(child->objectName()) != -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool _findChildrenComparator(const QObject*& child, const QString& name)
|
||||||
|
{
|
||||||
|
return name.isNull() || name == child->objectName();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
static void _findChildrenHelper(const QObject* parent, const T& name, PyTypeObject* desiredType, PyObject* result)
|
||||||
|
{
|
||||||
|
foreach(const QObject* child, parent->children()) {
|
||||||
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject*](child));
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject*](child));
|
||||||
if (PyType_IsSubtype(pyChild->ob_type, desiredType)
|
if (PyType_IsSubtype(pyChild->ob_type, desiredType) && _findChildrenComparator(child, name))
|
||||||
&& (name.isNull() || name == child->objectName())) {
|
|
||||||
PyList_Append(result, pyChild);
|
PyList_Append(result, pyChild);
|
||||||
}
|
|
||||||
_findChildrenHelper(child, name, desiredType, result);
|
_findChildrenHelper(child, name, desiredType, result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
|
|
||||||
#if PY_VERSION_HEX < 0x03000000
|
|
||||||
|
|
||||||
// QByteArray buffer protocol functions
|
|
||||||
// see: http://www.python.org/dev/peps/pep-3118/
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
static Py_ssize_t SbkQString_segcountproc(PyObject* self, Py_ssize_t* lenp)
|
|
||||||
{
|
|
||||||
if (lenp)
|
|
||||||
*lenp = self->ob_type->tp_as_sequence->sq_length(self);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Py_ssize_t SbkQString_readbufferproc(PyObject* self, Py_ssize_t segment, char** ptrptr)
|
|
||||||
{
|
|
||||||
if (segment || Shiboken::cppObjectIsInvalid(self))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
QString* cppSelf = Converter<QString*>::toCpp(self);
|
|
||||||
QByteArray decodedData = cppSelf->toLocal8Bit();
|
|
||||||
Shiboken::AutoDecRef decodedString(PyString_FromStringAndSize(decodedData.constData(), decodedData.size()));
|
|
||||||
|
|
||||||
// delete __encodedStr attr if it exists
|
|
||||||
Shiboken::AutoDecRef attrName(PyString_FromStringAndSize("__encodedStr", sizeof("__encodedStr")-1));
|
|
||||||
if (PyObject_HasAttr(self, attrName))
|
|
||||||
PyObject_DelAttr(self, attrName);
|
|
||||||
PyObject_SetAttr(self, attrName, decodedString);
|
|
||||||
*ptrptr = PyString_AS_STRING(decodedString.object());
|
|
||||||
return decodedData.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
PyBufferProcs SbkQStringBufferProc = {
|
|
||||||
/*bf_getreadbuffer*/ 0,
|
|
||||||
/*bf_getwritebuffer*/ 0,
|
|
||||||
/*bf_getsegcount*/ &SbkQString_segcountproc,
|
|
||||||
/*bf_getcharbuffer*/ &SbkQString_readbufferproc
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
static long QStringCustomHashFunction(const QString& str)
|
|
||||||
{
|
|
||||||
QByteArray data = str.toUtf8();
|
|
||||||
Shiboken::AutoDecRef unicodeObj(PyUnicode_DecodeUTF8(data.constData(), data.length(), 0));
|
|
||||||
return unicodeObj->ob_type->tp_hash(unicodeObj);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template <>
|
|
||||||
struct Converter<QBool> : public ValueTypeConverter<QBool>
|
|
||||||
{
|
|
||||||
using ValueTypeConverter<QBool>::toPython;
|
|
||||||
|
|
||||||
static PyObject* toPython(const QBool& cppobj)
|
|
||||||
{
|
|
||||||
return PyBool_FromLong((bool) cppobj);
|
|
||||||
}
|
|
||||||
static QBool toCpp(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
return QBool(pyobj == Py_True);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
inline bool Shiboken::Converter<QChar >::isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return PyObject_TypeCheck(pyObj, SbkType<QChar>())
|
|
||||||
|| SbkPySide_QtCore_QChar_SpecialCharacter_Check(pyObj)
|
|
||||||
|| SbkQLatin1Char_Check(pyObj)
|
|
||||||
|| (PyString_Check(pyObj) && (PyString_Size(pyObj) == 1))
|
|
||||||
|| PyInt_Check(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QChar Shiboken::Converter<QChar >::toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
if (!Shiboken_TypeCheck(pyObj, QChar)) {
|
|
||||||
if (SbkPySide_QtCore_QChar_SpecialCharacter_Check(pyObj))
|
|
||||||
return QChar(Shiboken::Converter<QChar::SpecialCharacter >::toCpp(pyObj));
|
|
||||||
else if (SbkQLatin1Char_Check(pyObj))
|
|
||||||
return QChar(Shiboken::Converter<QLatin1Char >::toCpp(pyObj));
|
|
||||||
else if (PyString_Check(pyObj) && PyString_Size(pyObj) == 1)
|
|
||||||
return QChar(Shiboken::Converter<char >::toCpp(pyObj));
|
|
||||||
else if (PyInt_Check(pyObj))
|
|
||||||
return QChar(Shiboken::Converter<int >::toCpp(pyObj));
|
|
||||||
}
|
|
||||||
return *Converter<QChar*>::toCpp(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline PyObject* Converter<QChar>::toPython(const QChar& cppObj)
|
|
||||||
{
|
|
||||||
return ValueTypeConverter<QChar>::toPython(cppObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename KT, typename VT>
|
|
||||||
struct Converter<QHash<KT, VT> > : QtDictConverter<QHash<KT, VT> > {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename T>
|
|
||||||
struct Converter<QList<T> > : StdListConverter<QList<T> > {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename KT, typename VT>
|
|
||||||
struct Converter<QMap<KT, VT> > : QtDictConverter<QMap<KT, VT> > {
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename KT, typename VT>
|
|
||||||
struct Converter<QMultiMap<KT, VT> > : QtMultiMapConverter<QMap<KT, VT> > {
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename FT, typename ST>
|
|
||||||
struct Converter<QPair<FT, ST> > : StdPairConverter<QPair<FT, ST> > {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename T>
|
|
||||||
struct Converter<QSet<T> > : QSequenceConverter<QSet<T> > {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
inline bool Converter<QString>::isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QString>());
|
|
||||||
return PyString_Check(pyObj)
|
|
||||||
|| PyObject_TypeCheck(pyObj, SbkType<QString>())
|
|
||||||
|| PyUnicode_Check(pyObj)
|
|
||||||
|| SbkQByteArray_Check(pyObj)
|
|
||||||
|| SbkQLatin1String_Check(pyObj)
|
|
||||||
|| pyObj == Py_None
|
|
||||||
#if PY_VERSION_HEX < 0x03000000
|
|
||||||
|| (pyObj->ob_type->tp_as_buffer
|
|
||||||
&& PyType_HasFeature(pyObj->ob_type, Py_TPFLAGS_HAVE_GETCHARBUFFER)
|
|
||||||
&& pyObj->ob_type->tp_as_buffer->bf_getcharbuffer)
|
|
||||||
#endif
|
|
||||||
|| SbkQChar_Check(pyObj)
|
|
||||||
|| (shiboType->ext_isconvertible && shiboType->ext_isconvertible(pyObj));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QString Converter<QString>::toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QString>());
|
|
||||||
if (SbkQChar_Check(pyObj)) {
|
|
||||||
return QString(Converter< QChar >::toCpp(pyObj));
|
|
||||||
} else if (SbkQByteArray_Check(pyObj)) {
|
|
||||||
return QString(Converter< QByteArray >::toCpp(pyObj));
|
|
||||||
} else if (SbkQLatin1String_Check(pyObj)) {
|
|
||||||
return QString(Converter< QLatin1String >::toCpp(pyObj));
|
|
||||||
} else if (PyUnicode_Check(pyObj)) {
|
|
||||||
Py_UNICODE* unicode = PyUnicode_AS_UNICODE(pyObj);
|
|
||||||
#if defined(Py_UNICODE_WIDE)
|
|
||||||
// cast as Py_UNICODE can be a different type
|
|
||||||
return QString::fromUcs4(reinterpret_cast<const uint*>(unicode));
|
|
||||||
#else
|
|
||||||
return QString::fromUtf16(unicode, PyUnicode_GET_SIZE(pyObj));
|
|
||||||
#endif
|
|
||||||
} else if (PyString_Check(pyObj)) {
|
|
||||||
return QString(Converter< char * >::toCpp(pyObj));
|
|
||||||
} else if (pyObj == Py_None) {
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
#if PY_VERSION_HEX < 0x03000000
|
|
||||||
// Support for buffer objects on QString constructor
|
|
||||||
else if (pyObj->ob_type->tp_as_buffer
|
|
||||||
&& PyType_HasFeature(pyObj->ob_type, Py_TPFLAGS_HAVE_GETCHARBUFFER)
|
|
||||||
&& pyObj->ob_type->tp_as_buffer->bf_getcharbuffer) {
|
|
||||||
QByteArray data;
|
|
||||||
PyBufferProcs* bufferProcs = pyObj->ob_type->tp_as_buffer;
|
|
||||||
int segments = bufferProcs->bf_getsegcount(pyObj, 0);
|
|
||||||
for (int i = 0; i < segments; ++i) {
|
|
||||||
char* segmentData;
|
|
||||||
int length = bufferProcs->bf_getcharbuffer(pyObj, i, &segmentData);
|
|
||||||
if (length == -1)
|
|
||||||
break;
|
|
||||||
data.append(segmentData, length);
|
|
||||||
}
|
|
||||||
return QString(data);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
else if (shiboType->ext_isconvertible && shiboType->ext_tocpp && shiboType->ext_isconvertible(pyObj)) {
|
|
||||||
QString* cptr = reinterpret_cast<QString*>(shiboType->ext_tocpp(pyObj));
|
|
||||||
std::auto_ptr<QString> cptr_auto_ptr(cptr);
|
|
||||||
return *cptr;
|
|
||||||
}
|
|
||||||
return *Converter<QString*>::toCpp(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline PyObject* Converter<QString>::toPython(const QString& cppObj)
|
|
||||||
{
|
|
||||||
return ValueTypeConverter<QString>::toPython(cppObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
namespace Shiboken
|
|
||||||
{
|
|
||||||
inline bool Converter<QStringList>::isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return StdListConverter<QStringList>::isConvertible(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QStringList Converter<QStringList>::toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return StdListConverter<QStringList>::toCpp(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline PyObject* Converter<QStringList>::toPython(const QStringList& cppObj)
|
|
||||||
{
|
|
||||||
return ValueTypeConverter<QStringList>::toPython(cppObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
// We use this thin wrapper instead of the plain PyObject pointer to avoid conflicts with specializations of T*
|
|
||||||
// in QVariant.
|
|
||||||
struct PyQt_PyObject
|
|
||||||
{
|
|
||||||
PyObject* m_me;
|
|
||||||
PyQt_PyObject(PyObject* me) : m_me(me) {}
|
|
||||||
PyQt_PyObject() : m_me(Py_None) {}
|
|
||||||
operator PyObject*() { return m_me; }
|
|
||||||
};
|
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(PyQt_PyObject)
|
|
||||||
|
|
||||||
namespace Shiboken {
|
|
||||||
|
|
||||||
// all types are convertible to QVariant
|
|
||||||
inline bool Converter<QVariant>::isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QVariant Converter<QVariant>::toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
if (SbkQVariant_Check(pyObj))
|
|
||||||
return *Converter<QVariant*>::toCpp(pyObj);
|
|
||||||
|
|
||||||
// Primitive types
|
|
||||||
if (PyBool_Check(pyObj)) {
|
|
||||||
// QVariant(bool)
|
|
||||||
return QVariant(Shiboken::Converter<bool>::toCpp(pyObj));
|
|
||||||
} else if (PyString_CheckExact(pyObj)) {
|
|
||||||
// QVariant(const char*)
|
|
||||||
return QVariant(Shiboken::Converter<const char *>::toCpp(pyObj));
|
|
||||||
} else if (PyFloat_CheckExact(pyObj)) {
|
|
||||||
// QVariant(double)
|
|
||||||
return QVariant(Shiboken::Converter<double>::toCpp(pyObj));
|
|
||||||
} else if (PyInt_CheckExact(pyObj)) {
|
|
||||||
// QVariant(int)
|
|
||||||
return QVariant(Shiboken::Converter<int>::toCpp(pyObj));
|
|
||||||
} else if (PyLong_CheckExact(pyObj)) {
|
|
||||||
// QVariant(qlonglong)
|
|
||||||
return QVariant(Shiboken::Converter<qlonglong>::toCpp(pyObj));
|
|
||||||
} else if (Shiboken::isShibokenEnum(pyObj)) {
|
|
||||||
// QVariant(enum)
|
|
||||||
return QVariant(Shiboken::Converter<int>::toCpp(pyObj));
|
|
||||||
} else if (!Shiboken::isShibokenType(pyObj) || Shiboken::isUserType(pyObj)) {
|
|
||||||
// QVariant(User class)
|
|
||||||
Py_INCREF(pyObj);
|
|
||||||
return QVariant::fromValue<PyQt_PyObject>(pyObj);
|
|
||||||
} else {
|
|
||||||
// a class supported by QVariant?
|
|
||||||
const char* typeName = pyObj->ob_type->tp_name;
|
|
||||||
// check if the name starts with PySide.
|
|
||||||
if (!strncmp("PySide.", typeName, 7)) {
|
|
||||||
// get the type name
|
|
||||||
const char* lastDot = typeName;
|
|
||||||
for (int i = 8; typeName[i]; ++i) {
|
|
||||||
if (typeName[i] == '.')
|
|
||||||
lastDot = &typeName[i];
|
|
||||||
}
|
|
||||||
lastDot++;
|
|
||||||
uint typeCode = QMetaType::type(lastDot);
|
|
||||||
if (!typeCode) {// Try with star at end, for QObject*, QWidget* and QAbstractKinectScroller*
|
|
||||||
QString typeName(lastDot);
|
|
||||||
typeName += '*';
|
|
||||||
typeCode = QMetaType::type(typeName.toAscii());
|
|
||||||
}
|
|
||||||
if (typeCode)
|
|
||||||
return QVariant(typeCode, reinterpret_cast<SbkBaseWrapper*>(pyObj)->cptr[0]);
|
|
||||||
}
|
|
||||||
// Is a shiboken type not known by Qt
|
|
||||||
Py_INCREF(pyObj);
|
|
||||||
return QVariant::fromValue<PyQt_PyObject>(pyObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline PyObject* Converter<QVariant>::toPython(const QVariant& cppObj)
|
|
||||||
{
|
|
||||||
return ValueTypeConverter<QVariant>::toPython(cppObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename T>
|
|
||||||
struct Converter<QVector<T> > : StdListConverter<QVector<T> > {};
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
24
PySide/QtCore/typesystem_core.xml.in
Normal file
24
PySide/QtCore/typesystem_core.xml.in
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtCore">
|
||||||
|
<load-typesystem name="typesystem_core_@AUTO_OS@.xml" generate="yes"/>
|
||||||
|
<load-typesystem name="typesystem_core_common.xml" generate="yes"/>
|
||||||
|
</typesystem>
|
||||||
4097
PySide/QtCore/typesystem_core_common.xml
Normal file
4097
PySide/QtCore/typesystem_core_common.xml
Normal file
File diff suppressed because it is too large
Load diff
23
PySide/QtCore/typesystem_core_mac.xml
Normal file
23
PySide/QtCore/typesystem_core_mac.xml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtCore">
|
||||||
|
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject" />
|
||||||
|
</typesystem>
|
||||||
26
PySide/QtCore/typesystem_core_maemo.xml
Normal file
26
PySide/QtCore/typesystem_core_maemo.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtCore">
|
||||||
|
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
|
||||||
|
<!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
|
||||||
|
<include file-name="QTextDocument" location="global"/>
|
||||||
|
</primitive-type>
|
||||||
|
</typesystem>
|
||||||
57
PySide/QtCore/typesystem_core_win.xml
Normal file
57
PySide/QtCore/typesystem_core_win.xml
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtCore">
|
||||||
|
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject" />
|
||||||
|
<primitive-type name="HWND">
|
||||||
|
<conversion-rule>
|
||||||
|
<native-to-target>
|
||||||
|
#ifdef IS_PY3K
|
||||||
|
return PyCapsule_New(%in, 0, 0);
|
||||||
|
#else
|
||||||
|
return PyCObject_FromVoidPtr(%in, 0);
|
||||||
|
#endif
|
||||||
|
</native-to-target>
|
||||||
|
<target-to-native>
|
||||||
|
<add-conversion type="PyNone">
|
||||||
|
%out = 0;
|
||||||
|
</add-conversion>
|
||||||
|
<add-conversion check="checkPyCapsuleOrPyCObject(%in)" type="PyObject">
|
||||||
|
#ifdef IS_PY3K
|
||||||
|
%out = (%OUTTYPE)PyCapsule_GetPointer(%in, 0);
|
||||||
|
#else
|
||||||
|
%out = (%OUTTYPE)PyCObject_AsVoidPtr(%in);
|
||||||
|
#endif
|
||||||
|
</add-conversion>
|
||||||
|
</target-to-native>
|
||||||
|
</conversion-rule>
|
||||||
|
</primitive-type>
|
||||||
|
<inject-code class="native" position="beginning">
|
||||||
|
<insert-template name="checkPyCapsuleOrPyCObject_func"/>
|
||||||
|
</inject-code>
|
||||||
|
<value-type name="POINT">
|
||||||
|
<include file-name="wtypes.h" location="global"/>
|
||||||
|
</value-type>
|
||||||
|
<value-type name="MSG">
|
||||||
|
<include file-name="wtypes.h" location="global"/>
|
||||||
|
</value-type>
|
||||||
|
<suppress-warning text="class 'MSG' inherits from unknown base class 'tagMSG'"/>
|
||||||
|
<suppress-warning text="class not found for setup inheritance 'tagMSG'"/>
|
||||||
|
</typesystem>
|
||||||
26
PySide/QtCore/typesystem_core_x11.xml
Normal file
26
PySide/QtCore/typesystem_core_x11.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtCore">
|
||||||
|
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
|
||||||
|
<!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
|
||||||
|
<include file-name="QTextDocument" location="global"/>
|
||||||
|
</primitive-type>
|
||||||
|
</typesystem>
|
||||||
|
|
@ -1,11 +1,14 @@
|
||||||
project(QtDeclarative)
|
project(QtDeclarative)
|
||||||
|
|
||||||
|
set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp")
|
||||||
|
|
||||||
set(QtDeclarative_SRC
|
set(QtDeclarative_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecomponent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativecontext_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeengine_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeengine_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeerror_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeerror_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeexpression_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeexpression_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeextensioninterface_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeextensionplugin_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeextensionplugin_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeimageprovider_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeimageprovider_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeitem_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeitem_wrapper.cpp
|
||||||
|
|
@ -20,25 +23,23 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qdeclarativeview_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qtdeclarative_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/qtdeclarative_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(declarative QtDeclarative_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtDeclarative_SOURCE_DIR}:${QtNetwork_SOURCE_DIR}:${QtNetwork_BINARY_DIR}")
|
set(QtDeclarative_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtDeclarative_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_QTNETWORK_INCLUDE_DIR}
|
${QT_QTNETWORK_INCLUDE_DIR}
|
||||||
${QT_QTDECLARATIVE_INCLUDE_DIR}
|
${QT_QTDECLARATIVE_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtNetwork_BINARY_DIR}/PySide/QtNetwork/
|
${QtNetwork_BINARY_DIR}/PySide/QtNetwork/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative)
|
||||||
add_library(QtDeclarative MODULE ${QtDeclarative_SRC})
|
|
||||||
set_target_properties(QtDeclarative PROPERTIES PREFIX "")
|
set(QtDeclarative_libraries pyside
|
||||||
target_link_libraries(QtDeclarative
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTNETWORK_LIBRARY}
|
${QT_QTNETWORK_LIBRARY}
|
||||||
|
|
@ -48,12 +49,14 @@ target_link_libraries(QtDeclarative
|
||||||
${QT_QTXMLPATTERNS_LIBRARY}
|
${QT_QTXMLPATTERNS_LIBRARY}
|
||||||
${QT_QTOPENGL_LIBRARY}
|
${QT_QTOPENGL_LIBRARY}
|
||||||
${QT_QTDECLARATIVE_LIBRARY})
|
${QT_QTDECLARATIVE_LIBRARY})
|
||||||
add_dependencies(QtDeclarative QtGui)
|
|
||||||
add_dependencies(QtDeclarative QtNetwork)
|
|
||||||
|
|
||||||
# install
|
set(QtDeclarative_deps QtGui QtNetwork)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtDeclarative${CMAKE_DEBUG_POSTFIX}.so
|
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
create_pyside_module(QtDeclarative
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtDeclarative/pyside_qtdeclarative_python.h
|
QtDeclarative_include_dirs
|
||||||
DESTINATION include/PySide/QtDeclarative/)
|
QtDeclarative_libraries
|
||||||
|
QtDeclarative_deps
|
||||||
|
QtDeclarative_typesystem_path
|
||||||
|
QtDeclarative_SRC
|
||||||
|
QtDeclarative_registerType)
|
||||||
|
|
||||||
|
|
|
||||||
366
PySide/QtDeclarative/pysideqmlregistertype.cpp
Normal file
366
PySide/QtDeclarative/pysideqmlregistertype.cpp
Normal file
|
|
@ -0,0 +1,366 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the Shiboken Python Bindings Generator project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pysideqmlregistertype.h"
|
||||||
|
// Qt
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDeclarativeEngine>
|
||||||
|
#include <QMutex>
|
||||||
|
// shiboken
|
||||||
|
#include <typeresolver.h>
|
||||||
|
#include <gilstate.h>
|
||||||
|
#include <sbkdbg.h>
|
||||||
|
// pyside
|
||||||
|
#include <pyside.h>
|
||||||
|
#include <dynamicqmetaobject.h>
|
||||||
|
#include <pysideproperty.h>
|
||||||
|
|
||||||
|
// auto generated headers
|
||||||
|
#include "qdeclarativeitem_wrapper.h"
|
||||||
|
#include "pyside_qtcore_python.h"
|
||||||
|
#include "pyside_qtdeclarative_python.h"
|
||||||
|
|
||||||
|
#ifndef PYSIDE_MAX_QML_TYPES
|
||||||
|
// Maximum number of different types the user cna export to QML using qmlRegisterType.
|
||||||
|
#define PYSIDE_MAX_QML_TYPES 50
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args);
|
||||||
|
|
||||||
|
|
||||||
|
// All registered python types
|
||||||
|
static PyObject* pyTypes[PYSIDE_MAX_QML_TYPES];
|
||||||
|
static void (*createFuncs[PYSIDE_MAX_QML_TYPES])(void*);
|
||||||
|
|
||||||
|
// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr
|
||||||
|
static QMutex nextQmlElementMutex;
|
||||||
|
|
||||||
|
template<int N>
|
||||||
|
struct ElementFactoryBase
|
||||||
|
{
|
||||||
|
static void createInto(void* memory)
|
||||||
|
{
|
||||||
|
QMutexLocker locker(&nextQmlElementMutex);
|
||||||
|
PySide::setNextQObjectMemoryAddr(memory);
|
||||||
|
Shiboken::GilState state;
|
||||||
|
PyObject* obj = PyObject_CallObject(pyTypes[N], 0);
|
||||||
|
if (!obj || PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
PySide::setNextQObjectMemoryAddr(0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<int N>
|
||||||
|
struct ElementFactory : ElementFactoryBase<N>
|
||||||
|
{
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
createFuncs[N] = &ElementFactoryBase<N>::createInto;
|
||||||
|
ElementFactory<N-1>::init();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct ElementFactory<0> : ElementFactoryBase<0>
|
||||||
|
{
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
createFuncs[0] = &ElementFactoryBase<0>::createInto;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, int versionMinor, const char* qmlName)
|
||||||
|
{
|
||||||
|
using namespace Shiboken;
|
||||||
|
|
||||||
|
static PyTypeObject* qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
|
||||||
|
static PyTypeObject* qdeclarativeType = Shiboken::Conversions::getPythonTypeObject("QDeclarativeItem*");
|
||||||
|
assert(qobjectType);
|
||||||
|
static int nextType = 0;
|
||||||
|
|
||||||
|
if (nextType >= PYSIDE_MAX_QML_TYPES) {
|
||||||
|
PyErr_Format(PyExc_TypeError, "QML doesn't really like language bindings, so you can only export %d types to QML.", PYSIDE_MAX_QML_TYPES);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qobjectType)) {
|
||||||
|
PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.", qobjectType->tp_name, ((PyTypeObject*)pyObj)->tp_name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isDeclarativeType = PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qdeclarativeType);
|
||||||
|
|
||||||
|
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
|
||||||
|
Q_ASSERT(metaObject);
|
||||||
|
|
||||||
|
// Inc ref the type object, don't worry about dec ref them because there's no way to unregister a QML type
|
||||||
|
Py_INCREF(pyObj);
|
||||||
|
|
||||||
|
// All ready... now the ugly code begins... :-)
|
||||||
|
pyTypes[nextType] = pyObj;
|
||||||
|
|
||||||
|
// Init proxy object static meta object
|
||||||
|
QDeclarativePrivate::RegisterType type;
|
||||||
|
type.version = 0;
|
||||||
|
if (isDeclarativeType) {
|
||||||
|
type.typeId = qMetaTypeId<QDeclarativeItem*>();
|
||||||
|
type.listId = qMetaTypeId<QDeclarativeListProperty<QDeclarativeItem> >();
|
||||||
|
|
||||||
|
type.attachedPropertiesFunction = QDeclarativePrivate::attachedPropertiesFunc<QDeclarativeItem>();
|
||||||
|
type.attachedPropertiesMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<QDeclarativeItem>();
|
||||||
|
|
||||||
|
type.parserStatusCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativeParserStatus>::cast();
|
||||||
|
type.valueSourceCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativePropertyValueSource>::cast();
|
||||||
|
type.valueInterceptorCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativePropertyValueInterceptor>::cast();
|
||||||
|
} else {
|
||||||
|
type.typeId = qMetaTypeId<QObject*>();
|
||||||
|
type.listId = qMetaTypeId<QDeclarativeListProperty<QObject> >();
|
||||||
|
type.attachedPropertiesFunction = QDeclarativePrivate::attachedPropertiesFunc<QObject>();
|
||||||
|
type.attachedPropertiesMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<QObject>();
|
||||||
|
|
||||||
|
type.parserStatusCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativeParserStatus>::cast();
|
||||||
|
type.valueSourceCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativePropertyValueSource>::cast();
|
||||||
|
type.valueInterceptorCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativePropertyValueInterceptor>::cast();
|
||||||
|
}
|
||||||
|
type.objectSize = PySide::getSizeOfQObject(reinterpret_cast<SbkObjectType*>(pyObj));
|
||||||
|
type.create = createFuncs[nextType];
|
||||||
|
type.uri = uri;
|
||||||
|
type.versionMajor = versionMajor;
|
||||||
|
type.versionMinor = versionMinor;
|
||||||
|
type.elementName = qmlName;
|
||||||
|
type.metaObject = metaObject;
|
||||||
|
|
||||||
|
type.extensionObjectCreate = 0;
|
||||||
|
type.extensionMetaObject = 0;
|
||||||
|
type.customParser = 0;
|
||||||
|
|
||||||
|
int qmlTypeId = QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
|
||||||
|
++nextType;
|
||||||
|
return qmlTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
|
||||||
|
// This is the user data we store in the property.
|
||||||
|
struct DeclarativeListProperty
|
||||||
|
{
|
||||||
|
PyTypeObject* type;
|
||||||
|
PyObject* append;
|
||||||
|
PyObject* at;
|
||||||
|
PyObject* clear;
|
||||||
|
PyObject* count;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int propListTpInit(PyObject* self, PyObject* args, PyObject* kwds)
|
||||||
|
{
|
||||||
|
static const char *kwlist[] = {"type", "append", "at", "clear", "count", 0};
|
||||||
|
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
|
||||||
|
DeclarativeListProperty* data = new DeclarativeListProperty;
|
||||||
|
memset(data, 0, sizeof(DeclarativeListProperty));
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds,
|
||||||
|
"OO|OOO:QtDeclarative.ListProperty", (char**) kwlist,
|
||||||
|
&data->type,
|
||||||
|
&data->append,
|
||||||
|
&data->at,
|
||||||
|
&data->clear,
|
||||||
|
&data->count)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
PySide::Property::setMetaCallHandler(pySelf, &propListMetaCall);
|
||||||
|
PySide::Property::setTypeName(pySelf, "QDeclarativeListProperty<QDeclarativeItem>");
|
||||||
|
PySide::Property::setUserData(pySelf, data);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void propListTpFree(void* self)
|
||||||
|
{
|
||||||
|
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
|
||||||
|
delete reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pySelf));
|
||||||
|
// calls base type constructor
|
||||||
|
Py_TYPE(pySelf)->tp_base->tp_free(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyTypeObject PropertyListType = {
|
||||||
|
PyVarObject_HEAD_INIT(0, 0)
|
||||||
|
"ListProperty", /*tp_name*/
|
||||||
|
sizeof(PySideProperty), /*tp_basicsize*/
|
||||||
|
0, /*tp_itemsize*/
|
||||||
|
0, /*tp_dealloc*/
|
||||||
|
0, /*tp_print*/
|
||||||
|
0, /*tp_getattr*/
|
||||||
|
0, /*tp_setattr*/
|
||||||
|
0, /*tp_compare*/
|
||||||
|
0, /*tp_repr*/
|
||||||
|
0, /*tp_as_number*/
|
||||||
|
0, /*tp_as_sequence*/
|
||||||
|
0, /*tp_as_mapping*/
|
||||||
|
0, /*tp_hash */
|
||||||
|
0, /*tp_call*/
|
||||||
|
0, /*tp_str*/
|
||||||
|
0, /*tp_getattro*/
|
||||||
|
0, /*tp_setattro*/
|
||||||
|
0, /*tp_as_buffer*/
|
||||||
|
Py_TPFLAGS_DEFAULT, /*tp_flags*/
|
||||||
|
0, /*tp_doc */
|
||||||
|
0, /*tp_traverse */
|
||||||
|
0, /*tp_clear */
|
||||||
|
0, /*tp_richcompare */
|
||||||
|
0, /*tp_weaklistoffset */
|
||||||
|
0, /*tp_iter */
|
||||||
|
0, /*tp_iternext */
|
||||||
|
0, /*tp_methods */
|
||||||
|
0, /*tp_members */
|
||||||
|
0, /*tp_getset */
|
||||||
|
&PySidePropertyType, /*tp_base */
|
||||||
|
0, /*tp_dict */
|
||||||
|
0, /*tp_descr_get */
|
||||||
|
0, /*tp_descr_set */
|
||||||
|
0, /*tp_dictoffset */
|
||||||
|
propListTpInit, /*tp_init */
|
||||||
|
0, /*tp_alloc */
|
||||||
|
0, /*tp_new */
|
||||||
|
propListTpFree, /*tp_free */
|
||||||
|
0, /*tp_is_gc */
|
||||||
|
0, /*tp_bases */
|
||||||
|
0, /*tp_mro */
|
||||||
|
0, /*tp_cache */
|
||||||
|
0, /*tp_subclasses */
|
||||||
|
0, /*tp_weaklist */
|
||||||
|
0, /*tp_del */
|
||||||
|
};
|
||||||
|
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::AppendFunction callback
|
||||||
|
void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDeclarativeItem* item)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef args(PyTuple_New(2));
|
||||||
|
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
|
||||||
|
PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtDeclarativeTypes[SBK_QDECLARATIVEITEM_IDX], item));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
|
||||||
|
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::CountFunction callback
|
||||||
|
int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef args(PyTuple_New(1));
|
||||||
|
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
|
||||||
|
|
||||||
|
// Check return type
|
||||||
|
int cppResult = 0;
|
||||||
|
PythonToCppFunc pythonToCpp;
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), retVal)))
|
||||||
|
pythonToCpp(retVal, &cppResult);
|
||||||
|
return cppResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::AtFunction callback
|
||||||
|
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef args(PyTuple_New(2));
|
||||||
|
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
|
||||||
|
PyTuple_SET_ITEM(args, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<int>(), &index));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
|
||||||
|
|
||||||
|
QDeclarativeItem* result = 0;
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
|
||||||
|
Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QDECLARATIVEITEM_IDX], retVal, &result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::ClearFunction callback
|
||||||
|
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef args(PyTuple_New(1));
|
||||||
|
PyTuple_SET_ITEM(args, 0, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], propList->object));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
|
||||||
|
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
// qt_metacall specialization for ListProperties
|
||||||
|
static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args)
|
||||||
|
{
|
||||||
|
if (call != QMetaObject::ReadProperty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pp));
|
||||||
|
QObject* qobj;
|
||||||
|
Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], self, &qobj);
|
||||||
|
QDeclarativeListProperty<QDeclarativeItem> declProp(qobj, data, &propListAppender);
|
||||||
|
|
||||||
|
if (data->count)
|
||||||
|
declProp.count = &propListCount;
|
||||||
|
if (data->at)
|
||||||
|
declProp.at = &propListAt;
|
||||||
|
if (data->clear)
|
||||||
|
declProp.clear = &propListClear;
|
||||||
|
|
||||||
|
// Copy the data to the memory location requested by the meta call
|
||||||
|
void* v = args[0];
|
||||||
|
*reinterpret_cast<QDeclarativeListProperty<QDeclarativeItem>*>(v) = declProp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PySide::initQmlSupport(PyObject* module)
|
||||||
|
{
|
||||||
|
ElementFactory<PYSIDE_MAX_QML_TYPES - 1>::init();
|
||||||
|
|
||||||
|
// Export DeclarativeListProperty type
|
||||||
|
if (PyType_Ready(&PropertyListType) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Py_INCREF((PyObject*)&PropertyListType);
|
||||||
|
PyModule_AddObject(module, PropertyListType.tp_name, (PyObject*)&PropertyListType);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
57
PySide/QtDeclarative/pysideqmlregistertype.h
Normal file
57
PySide/QtDeclarative/pysideqmlregistertype.h
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the Shiboken Python Bindings Generator project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PYSIDEQMLREGISTERTYPE_H
|
||||||
|
#define PYSIDEQMLREGISTERTYPE_H
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
|
||||||
|
struct SbkObjectType;
|
||||||
|
|
||||||
|
namespace PySide
|
||||||
|
{
|
||||||
|
|
||||||
|
extern void* nextQmlElementMemoryAddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Init the QML support doign things like registering QtDeclarative.ListProperty and create the necessary stuff for
|
||||||
|
* qmlRegisterType.
|
||||||
|
*
|
||||||
|
* \param module QtDeclarative python module
|
||||||
|
*/
|
||||||
|
void initQmlSupport(PyObject* module);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PySide implementation of qmlRegisterType<T> function.
|
||||||
|
*
|
||||||
|
* \param pyObj Python type to be registered.
|
||||||
|
* \param uri QML element uri.
|
||||||
|
* \param versionMajor QML component major version.
|
||||||
|
* \param versionMinor QML component minor version.
|
||||||
|
* \param qmlName QML element name
|
||||||
|
* \return the metatype id of the registered type.
|
||||||
|
*/
|
||||||
|
int qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, int versionMinor, const char* qmlName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,39 +1,169 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtDeclarative">
|
<typesystem package="PySide.QtDeclarative">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
||||||
<load-typesystem name="typesystem_network.xml" generate="no"/>
|
<load-typesystem name="typesystem_network.xml" generate="no"/>
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
||||||
<object-type name="QDeclarativeComponent" />
|
<add-function signature="qmlRegisterType(PyTypeObject, const char*, int, int, const char*)" return-type="int">
|
||||||
<enum-type name="QDeclarativeComponent::Status" />
|
<inject-documentation format="target" mode="append">
|
||||||
<object-type name="QDeclarativeContext" />
|
This function registers the Python type in the QML system with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor.
|
||||||
|
Returns the QML type id.
|
||||||
|
|
||||||
|
For example, this registers a Python class MySliderItem as a QML type named Slider for version 1.0 of a module called "com.mycompany.qmlcomponents":
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
qmlRegisterType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider")
|
||||||
|
|
||||||
|
Once this is registered, the type can be used in QML by importing the specified module name and version number:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
import com.mycompany.qmlcomponents 1.0
|
||||||
|
|
||||||
|
Slider { ... }
|
||||||
|
|
||||||
|
Note that it's perfectly reasonable for a library to register types to older versions than the actual version of the library. Indeed, it is normal for the new library to allow QML written to previous versions to continue to work, even if more advanced versions of some of its types are available.
|
||||||
|
</inject-documentation>
|
||||||
|
|
||||||
|
<inject-code class="target">
|
||||||
|
int %0 = PySide::qmlRegisterType(%ARGUMENT_NAMES);
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[int](%0);
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
|
||||||
|
<enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES" since="4.7">
|
||||||
|
<extra-includes>
|
||||||
|
<include file-name="QtDeclarative" location="global"/>
|
||||||
|
<!-- FIXME The include tag doesn't work on modules -->
|
||||||
|
<include file-name="pysideqmlregistertype.h" location="local"/>
|
||||||
|
</extra-includes>
|
||||||
|
</enum-type>
|
||||||
|
|
||||||
|
<inject-code class="target" position="end">
|
||||||
|
PySide::initQmlSupport(module);
|
||||||
|
</inject-code>
|
||||||
|
|
||||||
|
<object-type name="QDeclarativeExtensionInterface"/>
|
||||||
|
<object-type name="QDeclarativeComponent">
|
||||||
|
<enum-type name="Status"/>
|
||||||
|
<!-- This ctor isn't part of Qt public API -->
|
||||||
|
<modify-function signature="QDeclarativeComponent(QObject*)" remove="all" />
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QDeclarativeContext">
|
||||||
|
<modify-function signature="setContextProperty(const QString &, QObject*)">
|
||||||
|
<inject-code class="target" position="end">
|
||||||
|
QByteArray key("%FUNCTION_NAME_");
|
||||||
|
key.append(%1.toLocal8Bit());
|
||||||
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(%PYSELF), key.constData(), %PYARG_2);
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QDeclarativeEngine">
|
<object-type name="QDeclarativeEngine">
|
||||||
|
<enum-type name="ObjectOwnership" />
|
||||||
|
<modify-function signature="QDeclarativeEngine(QObject*)">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<rename to="parent" /> <!-- Qt names this just p -->
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
<modify-function signature="setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory*)">
|
<modify-function signature="setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<parent index="this" action="add" />
|
<parent index="this" action="add" />
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
<modify-function signature="importPlugin(QString,QString,QString*)">
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(ok, errorString)" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
QString errorString;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%RETURN_TYPE ok_ = %CPPSELF.%FUNCTION_NAME(%1, %2, &errorString);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](ok_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](errorString));
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
<enum-type name="QDeclarativeEngine::ObjectOwnership" />
|
|
||||||
<value-type name="QDeclarativeError" />
|
<value-type name="QDeclarativeError" />
|
||||||
<object-type name="QDeclarativeExpression" />
|
<object-type name="QDeclarativeExpression">
|
||||||
|
<modify-function signature="evaluate(bool*)">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
<insert-template name="fix_bool*"/>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
</object-type>
|
||||||
<object-type name="QDeclarativeExtensionPlugin" />
|
<object-type name="QDeclarativeExtensionPlugin" />
|
||||||
<object-type name="QDeclarativeImageProvider" />
|
<object-type name="QDeclarativeImageProvider">
|
||||||
<object-type name="QDeclarativeItem" />
|
<enum-type name="ImageType" />
|
||||||
<enum-type name="QDeclarativeItem::TransformOrigin" />
|
</object-type>
|
||||||
|
<object-type name="QDeclarativeItem">
|
||||||
|
<extra-includes>
|
||||||
|
<include file-name="pysideqmlregistertype.h" location="local"/>
|
||||||
|
</extra-includes>
|
||||||
|
<enum-type name="TransformOrigin" />
|
||||||
|
</object-type>
|
||||||
|
|
||||||
<value-type name="QDeclarativeListReference" />
|
<value-type name="QDeclarativeListReference" />
|
||||||
<object-type name="QDeclarativeNetworkAccessManagerFactory" />
|
<object-type name="QDeclarativeNetworkAccessManagerFactory" >
|
||||||
|
<modify-function signature="create(QObject *)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="c++"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</object-type>
|
||||||
<object-type name="QDeclarativeParserStatus" />
|
<object-type name="QDeclarativeParserStatus" />
|
||||||
|
|
||||||
<value-type name="QDeclarativeProperty" />
|
<value-type name="QDeclarativeProperty">
|
||||||
<enum-type name="QDeclarativeProperty::PropertyTypeCategory" />
|
<enum-type name="PropertyTypeCategory" />
|
||||||
<enum-type name="QDeclarativeProperty::Type" />
|
<enum-type name="Type" />
|
||||||
|
</value-type>
|
||||||
|
|
||||||
<object-type name="QDeclarativePropertyMap" />
|
<object-type name="QDeclarativePropertyMap">
|
||||||
|
<modify-documentation xpath="description/code[1]"><code># create our data
|
||||||
|
ownerData = QDeclarativePropertyMap()
|
||||||
|
ownerData.insert("name", "John Smith")
|
||||||
|
ownerData.insert("phone", "555-5555")
|
||||||
|
|
||||||
|
# expose it to the UI layer
|
||||||
|
view = QDeclarativeView()
|
||||||
|
ctxt = view.rootContext()
|
||||||
|
ctxt.setContextProperty("owner", ownerData)
|
||||||
|
|
||||||
|
view.setSource(QUrl.fromLocalFile("main.qml"))
|
||||||
|
view.show()</code></modify-documentation>
|
||||||
|
</object-type>
|
||||||
<object-type name="QDeclarativePropertyValueSource" />
|
<object-type name="QDeclarativePropertyValueSource" />
|
||||||
<value-type name="QDeclarativeScriptString" />
|
<value-type name="QDeclarativeScriptString" />
|
||||||
<object-type name="QDeclarativeView" />
|
<object-type name="QDeclarativeView">
|
||||||
<enum-type name="QDeclarativeView::ResizeMode" />
|
<enum-type name="ResizeMode" />
|
||||||
<enum-type name="QDeclarativeView::Status" />
|
<enum-type name="Status" />
|
||||||
|
</object-type>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -1,62 +1,22 @@
|
||||||
project(QtGui)
|
project(QtGui)
|
||||||
|
|
||||||
# Check QtGui support
|
|
||||||
macro(CHECK_QT_GUI_MACRO macro_display_name qt_macro module_sources global_sources)
|
|
||||||
if (DEFINED PYSIDE_${qt_macro})
|
|
||||||
if (PYSIDE_${qt_macro})
|
|
||||||
list(APPEND ${global_sources} ${${module_sources}})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${qt_macro}.cxx)
|
|
||||||
file(WRITE ${SRC_FILE}
|
|
||||||
"#include <QtGui>\n"
|
|
||||||
"int main() { \n"
|
|
||||||
"#ifdef ${qt_macro}\n"
|
|
||||||
"#error not supported.\n"
|
|
||||||
"#endif\n"
|
|
||||||
"}\n")
|
|
||||||
|
|
||||||
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
|
|
||||||
${SRC_FILE}
|
|
||||||
CMAKE_FLAGS
|
|
||||||
-DINCLUDE_DIRECTORIES:STRING=${QT_QTGUI_INCLUDE_DIR}\;${QT_INCLUDE_DIR}
|
|
||||||
-DLINK_LIBRARIES:PATH=${QT_QTGUI_LIBRARY_RELEASE}
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
|
||||||
|
|
||||||
set("PYSIDE_${qt_macro}" ${Q_WORKS} CACHE STRING "Has this Qt module been found by pyside?")
|
|
||||||
if(Q_WORKS)
|
|
||||||
message(STATUS "Testing support to ${macro_display_name} -- enabled")
|
|
||||||
list(APPEND ${global_sources} ${${module_sources}})
|
|
||||||
else()
|
|
||||||
message(STATUS "Testing support to ${macro_display_name} -- disabled")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endmacro(CHECK_QT_GUI_MACRO)
|
|
||||||
|
|
||||||
if(ENABLE_X11)
|
if(ENABLE_X11)
|
||||||
set(MODULE_NAME "x11")
|
|
||||||
set(SPECIFIC_OS_FILES
|
set(SPECIFIC_OS_FILES
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedcontainer_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedwidget_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(Q_WS_MAEMO_5)
|
if(Q_WS_MAEMO_5)
|
||||||
set(AUTO_OS "MAEMO 5")
|
|
||||||
set(MODULE_NAME "maemo")
|
|
||||||
set(SPECIFIC_OS_FILES
|
set(SPECIFIC_OS_FILES
|
||||||
${SPECIFIC_OS_FILES}
|
${SPECIFIC_OS_FILES}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractkineticscroller_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractkineticscroller_wrapper.cpp
|
||||||
)
|
)
|
||||||
endif(Q_WS_MAEMO_5)
|
endif()
|
||||||
|
endif()
|
||||||
elseif(ENABLE_MAC)
|
|
||||||
set(MODULE_NAME "mac")
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
endif(ENABLE_X11)
|
|
||||||
|
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
||||||
set (QtGui_46_SRC )
|
set(QtGui_46_SRC "")
|
||||||
else()
|
else()
|
||||||
set(QtGui_46_SRC
|
set(QtGui_46_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix2x2_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix2x2_wrapper.cpp
|
||||||
|
|
@ -69,6 +29,7 @@ else()
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x3_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x3_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x4_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qmatrix4x4_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesture_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesture_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgestureevent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesturerecognizer_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgesturerecognizer_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchor_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchor_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchorlayout_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgraphicsanchorlayout_wrapper.cpp
|
||||||
|
|
@ -87,6 +48,8 @@ else()
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpinchgesture_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpinchgesture_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qquaternion_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qquaternion_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qswipegesture_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qswipegesture_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtapandholdgesture_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtapgesture_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtilerules_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtilerules_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_touchpoint_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qtouchevent_touchpoint_wrapper.cpp
|
||||||
|
|
@ -94,7 +57,34 @@ else()
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector3d_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector3d_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector4d_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector4d_wrapper.cpp
|
||||||
)
|
)
|
||||||
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
endif ()
|
||||||
|
|
||||||
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 7)
|
||||||
|
set(QtGui_47_SRC "")
|
||||||
|
else()
|
||||||
|
set(QtGui_47_SRC
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpainter_pixmapfragment_wrapper.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(QtGui_OPTIONAL_SRC )
|
||||||
|
set(QtGui_DROPPED_ENTRIES )
|
||||||
|
check_qt_class(QtGui QAbstractPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QAbstractPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QGtkStyle QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPageSetupDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPrintDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPrintEngine QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPrintPreviewDialog QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPrintPreviewWidget QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPrinter QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QPrinterInfo QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QSessionManager QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QSizeGrip QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QSystemTrayIcon QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtGui QMacStyle QtGui_OPTIONAL_SRC QtGui_DROPPED_ENTRIES)
|
||||||
|
|
||||||
|
qt4_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside_SOURCE_DIR}/qpytextobject.h")
|
||||||
|
|
||||||
set(QtGui_SRC
|
set(QtGui_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractbutton_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractbutton_wrapper.cpp
|
||||||
|
|
@ -259,6 +249,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpen_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpictureio_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpictureio_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpicture_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpicture_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmapcache_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmapcache_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmapcache_key_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmap_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpixmap_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextdocumentlayout_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextdocumentlayout_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextedit_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qplaintextedit_wrapper.cpp
|
||||||
|
|
@ -268,6 +259,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpolygon_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressbar_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressbar_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressdialog_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprogressdialog_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qproxymodel_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qproxymodel_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpytextobject_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpushbutton_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpushbutton_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradialgradient_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradialgradient_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradiobutton_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qradiobutton_wrapper.cpp
|
||||||
|
|
@ -411,86 +403,38 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qwizard_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qworkspace_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qworkspace_wrapper.cpp
|
||||||
|
|
||||||
${SPECIFIC_OS_FILES}
|
${SPECIFIC_OS_FILES}
|
||||||
|
${QPYTEXTOBJECT_MOC}
|
||||||
${QtGui_46_SRC}
|
${QtGui_46_SRC}
|
||||||
|
${QtGui_47_SRC}
|
||||||
|
${QtGui_OPTIONAL_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
#Check GtkStyle
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in"
|
||||||
set(QT_GTKSTYLE_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qgtkstyle_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("GtkStyle" QT_NO_STYLE_GTK QT_GTKSTYLE_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check SystemTray
|
|
||||||
set(QT_SYSTEMTRAY_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qsystemtrayicon_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("SystemTray" QT_NO_SYSTEMTRAYICON QT_SYSTEMTRAY_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check QT_PRINTDIALOG support
|
|
||||||
set(QT_PRINTDIALOG_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractpagesetupdialog_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractprintdialog_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qpagesetupdialog_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintdialog_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("PrintDialog Support" QT_NO_PRINTDIALOG QT_PRINTDIALOG_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check QT_PRITPREVIEW support
|
|
||||||
set(QT_PRINTPREVIEW_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintpreviewwidget_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("PrintPreview Support" QT_NO_PRINTPREVIEWWIDGET QT_PRINTPREVIEW_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check QT_PRINTPREVIEWDIALOG support
|
|
||||||
set(QT_PRINTPREVIEWDIALOG_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintpreviewdialog_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("PrintPreviewDialog Support" QT_NO_PRINTPREVIEWDIALOG QT_PRINTPREVIEWDIALOG_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check QT_PRINTER
|
|
||||||
set(QT_PRINTER_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprinter_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprinterinfo_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qprintengine_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("Printer Support" QT_NO_PRINTER QT_PRINTER_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check QT_SIZEGRIP support
|
|
||||||
set(QT_SIZEGRIP_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qsizegrip_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("SizeGrip Support" QT_NO_SIZEGRIP QT_SIZEGRIP_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
#Check QT_SESSIONMANAGER support
|
|
||||||
set(QT_SESSIONMANAGER_SRCS
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qsessionmanager_wrapper.cpp
|
|
||||||
)
|
|
||||||
CHECK_QT_GUI_MACRO("SessionManager Support" QT_NO_SESSIONMANAGER QT_SESSIONMANAGER_SRCS QtGui_SRC)
|
|
||||||
|
|
||||||
configure_file(typesystem_gui.xml.in
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
|
||||||
|
|
||||||
execute_generator(gui QtGui_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtCore_BINARY_DIR}")
|
set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}")
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtGui_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/
|
||||||
|
${pyside_SOURCE_DIR}
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/)
|
||||||
)
|
set(QtGui_libraries pyside
|
||||||
add_library(QtGui MODULE ${QtGui_SRC})
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
set_property(TARGET QtGui PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtGui
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY})
|
||||||
)
|
set(QtGui_deps "QtCore")
|
||||||
add_dependencies(QtGui QtCore)
|
|
||||||
|
|
||||||
# install
|
create_pyside_module(QtGui
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtGui${CMAKE_DEBUG_POSTFIX}.so DESTINATION "${SITE_PACKAGE}/PySide")
|
QtGui_include_dirs
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/pyside_qtgui_python.h
|
QtGui_libraries
|
||||||
DESTINATION include/PySide/QtGui/)
|
QtGui_deps
|
||||||
|
QtGui_typesystem_path
|
||||||
|
QtGui_SRC
|
||||||
|
""
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
|
||||||
|
|
||||||
|
install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)
|
||||||
|
|
|
||||||
|
|
@ -3,54 +3,48 @@ extern PyObject* moduleQtGui;
|
||||||
|
|
||||||
static int QApplicationArgCount;
|
static int QApplicationArgCount;
|
||||||
static char** QApplicationArgValues;
|
static char** QApplicationArgValues;
|
||||||
|
static const char QAPP_MACRO[] = "qApp";
|
||||||
|
|
||||||
void DeleteQApplicationAtExit() {
|
bool QApplicationConstructorStart(PyObject* argv)
|
||||||
if (QApplication::instance()) {
|
|
||||||
//disconnect and decref all widgets used on signals before destroy qApp
|
|
||||||
PySide::SignalManager::instance().clear();
|
|
||||||
delete QApplication::instance();
|
|
||||||
for (int i = 0; i < QApplicationArgCount; ++i)
|
|
||||||
delete[] QApplicationArgValues[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int SbkQApplication_Init(PyObject* self, PyObject* args, PyObject*)
|
|
||||||
{
|
{
|
||||||
if (QApplication::instance()) {
|
if (QApplication::instance()) {
|
||||||
PyErr_SetString(PyExc_RuntimeError, "A QApplication instance already exists.");
|
PyErr_SetString(PyExc_RuntimeError, "A QApplication instance already exists.");
|
||||||
return -1;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numArgs = PyTuple_GET_SIZE(args);
|
return Shiboken::sequenceToArgcArgv(argv, &QApplicationArgCount, &QApplicationArgValues, "PySideApp");
|
||||||
if (numArgs != 1) {
|
}
|
||||||
PyErr_BadArgument();
|
|
||||||
return -1;
|
void QApplicationConstructorEnd(PyObject* self)
|
||||||
}
|
{
|
||||||
|
// Verify if qApp is in main module
|
||||||
if (!PySequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QApplicationArgCount, &QApplicationArgValues, "PySideApp")) {
|
PyObject* globalsDict = PyEval_GetGlobals();
|
||||||
PyErr_BadArgument();
|
if (globalsDict) {
|
||||||
return -1;
|
PyObject* qAppObj = PyDict_GetItemString(globalsDict, QAPP_MACRO);
|
||||||
}
|
if (qAppObj)
|
||||||
|
PyDict_SetItemString(globalsDict, QAPP_MACRO, self);
|
||||||
void* cptr = new QApplication(QApplicationArgCount, QApplicationArgValues);
|
}
|
||||||
Shiboken::setCppPointer(reinterpret_cast<SbkBaseWrapper*>(self),
|
|
||||||
Shiboken::SbkType<QApplication>(),
|
PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self);
|
||||||
cptr);
|
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
|
||||||
SbkBaseWrapper_setValidCppObject(self, 1);
|
Py_INCREF(self);
|
||||||
Shiboken::BindingManager::instance().registerWrapper(reinterpret_cast<SbkBaseWrapper*>(self), cptr);
|
}
|
||||||
|
|
||||||
// Verify if qApp is in main module
|
static void QApplicationConstructor(PyObject* self, PyObject* argv, QApplicationWrapper** cptr)
|
||||||
const char QAPP_MACRO[] = "qApp";
|
{
|
||||||
PyObject* localsDict = PyEval_GetLocals();
|
if (QApplicationConstructorStart(argv)) {
|
||||||
if (localsDict) {
|
*cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues);
|
||||||
PyObject* qAppObj = PyDict_GetItemString(localsDict, QAPP_MACRO);
|
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
|
||||||
if (qAppObj)
|
QApplicationConstructorEnd(self);
|
||||||
PyDict_SetItemString(localsDict, QAPP_MACRO, self);
|
}
|
||||||
}
|
}
|
||||||
PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self);
|
|
||||||
|
template <typename T>
|
||||||
Py_INCREF(self);
|
static void QApplicationConstructor(PyObject* self, PyObject* argv, T extraArg, QApplicationWrapper** cptr)
|
||||||
Py_AtExit(DeleteQApplicationAtExit);
|
{
|
||||||
|
if (QApplicationConstructorStart(argv)) {
|
||||||
return 1;
|
*cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues, extraArg);
|
||||||
|
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
|
||||||
|
QApplicationConstructorEnd(self);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
122
PySide/QtGui/glue/qlayout_help_functions.cpp
Normal file
122
PySide/QtGui/glue/qlayout_help_functions.cpp
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
void addLayoutOwnership(QLayout* layout, QLayoutItem* item);
|
||||||
|
void removeLayoutOwnership(QLayout* layout, QWidget* widget);
|
||||||
|
|
||||||
|
inline QByteArray retrieveObjectName(PyObject* obj)
|
||||||
|
{
|
||||||
|
Shiboken::AutoDecRef objName(PyObject_Str(obj));
|
||||||
|
return Shiboken::String::toCString(objName);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void addLayoutOwnership(QLayout* layout, QWidget* widget)
|
||||||
|
{
|
||||||
|
//transfer ownership to parent widget
|
||||||
|
QWidget *lw = layout->parentWidget();
|
||||||
|
QWidget *pw = widget->parentWidget();
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](widget));
|
||||||
|
|
||||||
|
//Transfer parent to layout widget
|
||||||
|
if (pw && lw && pw != lw)
|
||||||
|
Shiboken::Object::setParent(0, pyChild);
|
||||||
|
|
||||||
|
if (!lw && !pw) {
|
||||||
|
//keep the reference while the layout is orphan
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](layout));
|
||||||
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true);
|
||||||
|
} else {
|
||||||
|
if (!lw)
|
||||||
|
lw = pw;
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](lw));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void addLayoutOwnership(QLayout* layout, QLayout* other)
|
||||||
|
{
|
||||||
|
//transfer all children widgets from other to layout parent widget
|
||||||
|
QWidget* parent = layout->parentWidget();
|
||||||
|
if (!parent) {
|
||||||
|
//keep the reference while the layout is orphan
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](other));
|
||||||
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i=0, i_max=other->count(); i < i_max; i++) {
|
||||||
|
QLayoutItem* item = other->itemAt(i);
|
||||||
|
if (PyErr_Occurred() || !item)
|
||||||
|
return;
|
||||||
|
addLayoutOwnership(layout, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](other));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void addLayoutOwnership(QLayout* layout, QLayoutItem* item)
|
||||||
|
{
|
||||||
|
if (!item)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QWidget* w = item->widget();
|
||||||
|
if (w)
|
||||||
|
addLayoutOwnership(layout, w);
|
||||||
|
else {
|
||||||
|
QLayout* l = item->layout();
|
||||||
|
if (l)
|
||||||
|
addLayoutOwnership(layout, l);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayoutItem*](item));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void removeWidgetFromLayout(QLayout* layout, QWidget* widget)
|
||||||
|
{
|
||||||
|
QWidget* parent = widget->parentWidget();
|
||||||
|
|
||||||
|
if (!parent) {
|
||||||
|
//remove reference on layout
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](layout));
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](widget));
|
||||||
|
Shiboken::Object::removeReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild);
|
||||||
|
} else {
|
||||||
|
//give the ownership to parent
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](widget));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void removeLayoutOwnership(QLayout* layout, QLayoutItem* item)
|
||||||
|
{
|
||||||
|
QWidget* w = item->widget();
|
||||||
|
if (w)
|
||||||
|
removeWidgetFromLayout(layout, w);
|
||||||
|
else {
|
||||||
|
QLayout* l = item->layout();
|
||||||
|
if (l)
|
||||||
|
removeLayoutOwnership(layout, l);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayoutItem*](item));
|
||||||
|
Shiboken::Object::invalidate(pyChild);
|
||||||
|
Shiboken::Object::setParent(0, pyChild);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void removeLayoutOwnership(QLayout* layout, QWidget* widget)
|
||||||
|
{
|
||||||
|
if (!widget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int i=0, i_max=layout->count(); i < i_max; i++) {
|
||||||
|
QLayoutItem* item = layout->itemAt(i);
|
||||||
|
if (PyErr_Occurred() || !item)
|
||||||
|
return;
|
||||||
|
if (item->widget() == widget)
|
||||||
|
removeLayoutOwnership(layout, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
#ifndef QLAYOUT_HELP_FUNCTIONS
|
|
||||||
#define QLAYOUT_HELP_FUNCTIONS
|
|
||||||
|
|
||||||
void addLayoutOwnership(QLayout *layout, QLayoutItem *item);
|
|
||||||
|
|
||||||
inline void addLayoutOwnership(QLayout *layout, QWidget *widget)
|
|
||||||
{
|
|
||||||
//transfer ownership to parent widget
|
|
||||||
QWidget *parent = layout->parentWidget();
|
|
||||||
if (!parent)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(widget));
|
|
||||||
Shiboken::setParent(pyParent, pyChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void addLayoutOwnership(QLayout *layout, QLayout *other)
|
|
||||||
{
|
|
||||||
//transfer all children widgetes from other to layout parent widget
|
|
||||||
QWidget *parent = layout->parentWidget();
|
|
||||||
if (!parent)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (int i=0, i_max=layout->count(); i < i_max; i++) {
|
|
||||||
addLayoutOwnership(layout, layout->itemAt(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QLayout*>::toPython(layout));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(other));
|
|
||||||
Shiboken::setParent(pyParent, pyChild);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void addLayoutOwnership(QLayout *layout, QLayoutItem *item)
|
|
||||||
{
|
|
||||||
QWidget *w = item->widget();
|
|
||||||
if (w)
|
|
||||||
addLayoutOwnership(layout, w);
|
|
||||||
else {
|
|
||||||
QLayout *l = item->layout();
|
|
||||||
if (l)
|
|
||||||
addLayoutOwnership(layout, l);
|
|
||||||
}
|
|
||||||
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QLayout*>::toPython(layout));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayoutItem*>::toPython(item));
|
|
||||||
Shiboken::setParent(pyParent, pyChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
21
PySide/QtGui/glue/qmenu_glue.cpp
Normal file
21
PySide/QtGui/glue/qmenu_glue.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
inline PyObject* addActionWithPyObject(QMenu* self, const QIcon& icon, const QString& text, PyObject* callback, const QKeySequence& shortcut)
|
||||||
|
{
|
||||||
|
QAction* act = new QAction(text, self);
|
||||||
|
|
||||||
|
if (!icon.isNull())
|
||||||
|
act->setIcon(icon);
|
||||||
|
|
||||||
|
if (!shortcut.isEmpty())
|
||||||
|
act->setShortcut(shortcut);
|
||||||
|
|
||||||
|
self->addAction(act);
|
||||||
|
|
||||||
|
PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
|
||||||
|
Shiboken::AutoDecRef result(PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered()), callback));
|
||||||
|
if (result.isNull()) {
|
||||||
|
Py_DECREF(pyAct);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pyAct;
|
||||||
|
}
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
|
|
||||||
inline PyObject*
|
|
||||||
addActionWithPyObject(QMenu *self, const QIcon& icon, const QString& text, PyObject *callback, const QKeySequence &shortcut)
|
|
||||||
{
|
|
||||||
QAction *act = new QAction(text, self);
|
|
||||||
|
|
||||||
if (!icon.isNull())
|
|
||||||
act->setIcon(icon);
|
|
||||||
|
|
||||||
if (!shortcut.isEmpty())
|
|
||||||
act->setShortcut(shortcut);
|
|
||||||
|
|
||||||
self->addAction(act);
|
|
||||||
|
|
||||||
PyObject *pyAct = Shiboken::Converter<QAction*>::toPython(act);
|
|
||||||
PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered()), callback);
|
|
||||||
if (result == 0) {
|
|
||||||
Py_DECREF(pyAct);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pyAct;
|
|
||||||
}
|
|
||||||
|
|
@ -5,7 +5,7 @@ addActionWithPyObject(QMenuBar* self, const QString& text, PyObject* callback)
|
||||||
|
|
||||||
self->addAction(act);
|
self->addAction(act);
|
||||||
|
|
||||||
PyObject* pyAct = Shiboken::Converter<QAction*>::toPython(act);
|
PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
|
||||||
PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct,
|
PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct,
|
||||||
SIGNAL(triggered(bool)), callback);
|
SIGNAL(triggered(bool)), callback);
|
||||||
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
// Init qApp macro to None.
|
// Init qApp macro to None.
|
||||||
Py_INCREF(Py_None);
|
if (qApp) {
|
||||||
PyModule_AddObject(module, "qApp", Py_None);
|
PyObject* pyApp = %CONVERTTOPYTHON[QApplication*](qApp);
|
||||||
|
Py_INCREF(pyApp);
|
||||||
|
PyModule_AddObject(module, "qApp", pyApp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
PyModule_AddObject(module, "qApp", Py_None);
|
||||||
|
}
|
||||||
moduleQtGui = module;
|
moduleQtGui = module;
|
||||||
|
|
|
||||||
65
PySide/QtGui/glue/qwidget_glue.cpp
Normal file
65
PySide/QtGui/glue/qwidget_glue.cpp
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
static QString retrieveObjectName(PyObject *obj)
|
||||||
|
{
|
||||||
|
Shiboken::AutoDecRef objName(PyObject_Str(obj));
|
||||||
|
return QString(Shiboken::String::toCString(objName));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tranfer objects ownership from layout to widget
|
||||||
|
**/
|
||||||
|
static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
||||||
|
{
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
|
||||||
|
|
||||||
|
for (int i=0; i < layout->count(); i++) {
|
||||||
|
QLayoutItem* item = layout->itemAt(i);
|
||||||
|
if (PyErr_Occurred() || !item)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QWidget* w = item->widget();
|
||||||
|
if (w) {
|
||||||
|
QWidget* pw = w->parentWidget();
|
||||||
|
if (pw != parent) {
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](w));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QLayout* l = item->layout();
|
||||||
|
if (l)
|
||||||
|
qwidgetReparentLayout(parent, l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
|
//remove previous references
|
||||||
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void qwidgetSetLayout(QWidget *self, QLayout *layout)
|
||||||
|
{
|
||||||
|
if (!layout || self->layout())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QObject* oldParent = layout->parent();
|
||||||
|
if (oldParent && oldParent != self) {
|
||||||
|
if (oldParent->isWidgetType()) {
|
||||||
|
// remove old parent policy
|
||||||
|
Shiboken::AutoDecRef pyLayout(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
|
Shiboken::Object::setParent(Py_None, pyLayout);
|
||||||
|
} else {
|
||||||
|
PyErr_Format(PyExc_RuntimeError, "QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", when the QLayout already has a parent",
|
||||||
|
qPrintable(layout->objectName()), self->metaObject()->className(), qPrintable(self->objectName()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oldParent != self) {
|
||||||
|
qwidgetReparentLayout(self, layout);
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
return;
|
||||||
|
|
||||||
|
self->setLayout(layout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
/**
|
|
||||||
* Tranfer objects ownership from layout to widget
|
|
||||||
**/
|
|
||||||
static inline void
|
|
||||||
qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
|
||||||
{
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent));
|
|
||||||
|
|
||||||
for (int i=0; i < layout->count(); i++)
|
|
||||||
{
|
|
||||||
QLayoutItem *item = layout->itemAt(i);
|
|
||||||
QWidget *w = item->widget();
|
|
||||||
|
|
||||||
if (w)
|
|
||||||
{
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(w));
|
|
||||||
Shiboken::setParent(pyParent, pyChild);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QLayout *l = item->layout();
|
|
||||||
if (l)
|
|
||||||
qwidgetReparentLayout(parent, l);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(layout));
|
|
||||||
Shiboken::setParent(pyParent, pyChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
|
||||||
qwidgetSetLayout(QWidget *self, QLayout *layout)
|
|
||||||
{
|
|
||||||
if (self->layout())
|
|
||||||
return;
|
|
||||||
|
|
||||||
qwidgetReparentLayout(self, layout);
|
|
||||||
self->setLayout(layout);
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
inline bool Converter< QPixmap >::isConvertible(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
if (ValueTypeConverter<QPixmap>::isConvertible(pyobj))
|
|
||||||
return true;
|
|
||||||
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QPixmap>());
|
|
||||||
bool isVariant = SbkQVariant_Check(pyobj);
|
|
||||||
if (isVariant) {
|
|
||||||
QVariant var(Converter<QVariant>::toCpp(pyobj));
|
|
||||||
return var.type() == QVariant::Pixmap;
|
|
||||||
} else if (SbkQSize_Check(pyobj) || SbkQString_Check(pyobj)) {
|
|
||||||
return true;
|
|
||||||
} else if (shiboType->ext_isconvertible) {
|
|
||||||
return shiboType->ext_isconvertible(pyobj);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QPixmap Converter< QPixmap >::toCpp(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
SbkBaseWrapperType* shiboType = reinterpret_cast<SbkBaseWrapperType*>(SbkType<QPixmap>());
|
|
||||||
bool isVariant = SbkQVariant_Check(pyobj);
|
|
||||||
if (isVariant) {
|
|
||||||
QVariant var(Converter<QVariant>::toCpp(pyobj));
|
|
||||||
return var.value<QPixmap>();
|
|
||||||
} else if (SbkQSize_Check(pyobj)) {
|
|
||||||
return QPixmap(Shiboken::Converter<QSize& >::toCpp(pyobj));
|
|
||||||
} else if (SbkQString_Check(pyobj)) {
|
|
||||||
return QPixmap(Shiboken::Converter<QString& >::toCpp(pyobj));
|
|
||||||
} else if (shiboType->ext_isconvertible && shiboType->ext_tocpp && shiboType->ext_isconvertible(pyobj)) {
|
|
||||||
QPixmap* cptr = reinterpret_cast<QPixmap*>(shiboType->ext_tocpp(pyobj));
|
|
||||||
std::auto_ptr<QPixmap> cptr_auto_ptr(cptr);
|
|
||||||
return *cptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return *Converter<QPixmap*>::toCpp(pyobj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline PyObject* Converter<QPixmap>::toPython(const QPixmap& cppObj)
|
|
||||||
{
|
|
||||||
return ValueTypeConverter<QPixmap>::toPython(cppObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,25 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtGui">
|
<typesystem package="PySide.QtGui">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
||||||
<load-typesystem name="typesystem_gui_@MODULE_NAME@.xml" generate="yes"/>
|
<load-typesystem name="typesystem_gui_@AUTO_OS@.xml" generate="yes"/>
|
||||||
|
<load-typesystem name="typesystem_gui_common.xml" generate="yes"/>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,11 +1,32 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtGui">
|
<typesystem package="PySide.QtGui">
|
||||||
<rejection class="*" function-name="qt_mac_set_cursor"/>
|
<rejection class="*" function-name="qt_mac_set_cursor"/>
|
||||||
<rejection class="*" function-name="macMenu"/>
|
<rejection class="*" function-name="macMenu"/>
|
||||||
|
|
||||||
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
|
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject"/>
|
||||||
|
<object-type name="QMacStyle" >
|
||||||
<load-typesystem name="typesystem_gui_common.xml" generate="yes"/>
|
<enum-type name="FocusRectPolicy"/>
|
||||||
|
<enum-type name="WidgetSizePolicy"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
<suppress-warning text="enum 'QPixmap::ShareMode' does not have a type entry or is not an enum" />
|
<suppress-warning text="enum 'QPixmap::ShareMode' does not have a type entry or is not an enum" />
|
||||||
<suppress-warning text="enum 'QSysInfo::Endian' is specified in typesystem, but not declared" />
|
<suppress-warning text="enum 'QSysInfo::Endian' is specified in typesystem, but not declared" />
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,30 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtGui">
|
<typesystem package="PySide.QtGui">
|
||||||
|
|
||||||
<enum-type name="QAbstractKineticScroller::Mode"/>
|
<object-type name="QAbstractKineticScroller">
|
||||||
<enum-type name="QAbstractKineticScroller::OvershootPolicy"/>
|
<enum-type name="Mode"/>
|
||||||
<enum-type name="QAbstractKineticScroller::State"/>
|
<enum-type name="OvershootPolicy"/>
|
||||||
<object-type name="QAbstractKineticScroller" />
|
<enum-type name="State"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
<load-typesystem name="typesystem_gui_x11.xml" generate="yes"/>
|
<load-typesystem name="typesystem_gui_x11.xml" generate="yes"/>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
52
PySide/QtGui/typesystem_gui_simulator.xml
Normal file
52
PySide/QtGui/typesystem_gui_simulator.xml
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtGui">
|
||||||
|
<!-- These classes are not present in Qt Simulator build, even though
|
||||||
|
QT_NO_PRINTER is *not* set -->
|
||||||
|
<rejection class="QAbstractPageSetupDialog"/>
|
||||||
|
<rejection class="QAbstractPrintDialog"/>
|
||||||
|
<rejection class="QPageSetupDialog"/>
|
||||||
|
<rejection class="QPrintDialog"/>
|
||||||
|
<rejection class="QPrintPreviewDialog"/>
|
||||||
|
<rejection class="QPrintPreviewWidget"/>
|
||||||
|
<rejection class="QPrintEngine"/>
|
||||||
|
<rejection class="QPrinterInfo"/>
|
||||||
|
<rejection class="QPrinter"/>
|
||||||
|
|
||||||
|
<object-type name="QPlainTextEdit">
|
||||||
|
<modify-function signature="print(QPrinter*)const" remove="all"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QTextDocument">
|
||||||
|
<modify-function signature="print(QPrinter*)const" remove="all"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QTextEdit">
|
||||||
|
<modify-function signature="print(QPrinter*)const" remove="all"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
|
<!-- Qt::HANDLE is typedef to "void *", which gives compilation errors on
|
||||||
|
conversion templates -->
|
||||||
|
<value-type name="QCursor">
|
||||||
|
<modify-function signature="QCursor(Qt::HANDLE)" remove="all"/>
|
||||||
|
</value-type>
|
||||||
|
<value-type name="QFont">
|
||||||
|
<modify-function signature="handle()const" remove="all"/>
|
||||||
|
</value-type>
|
||||||
|
</typesystem>
|
||||||
49
PySide/QtGui/typesystem_gui_win.xml
Normal file
49
PySide/QtGui/typesystem_gui_win.xml
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtGui">
|
||||||
|
<primitive-type name="WId" target-lang-api-name="PyObject">
|
||||||
|
<conversion-rule>
|
||||||
|
<native-to-target>
|
||||||
|
#ifdef IS_PY3K
|
||||||
|
return PyCapsule_New(%in, 0, 0);
|
||||||
|
#else
|
||||||
|
return PyCObject_FromVoidPtr(%in, 0);
|
||||||
|
#endif
|
||||||
|
</native-to-target>
|
||||||
|
<target-to-native>
|
||||||
|
<add-conversion type="PyNone">
|
||||||
|
%out = 0;
|
||||||
|
</add-conversion>
|
||||||
|
<add-conversion check="checkPyCapsuleOrPyCObject(%in)" type="PyObject">
|
||||||
|
#ifdef IS_PY3K
|
||||||
|
%out = (%OUTTYPE)PyCapsule_GetPointer(%in, 0);
|
||||||
|
#else
|
||||||
|
%out = (%OUTTYPE)PyCObject_AsVoidPtr(%in);
|
||||||
|
#endif
|
||||||
|
</add-conversion>
|
||||||
|
</target-to-native>
|
||||||
|
</conversion-rule>
|
||||||
|
</primitive-type>
|
||||||
|
<inject-code class="native" position="beginning">
|
||||||
|
<insert-template name="checkPyCapsuleOrPyCObject_func"/>
|
||||||
|
</inject-code>
|
||||||
|
<enum-type name="QPixmap::HBitmapFormat" />
|
||||||
|
</typesystem>
|
||||||
|
|
@ -1,14 +1,50 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtGui">
|
<typesystem package="PySide.QtGui">
|
||||||
|
|
||||||
<rejection class="" function-name="qt_x11_getX11InfoForWindow"/>
|
<rejection class="" function-name="qt_x11_getX11InfoForWindow"/>
|
||||||
<rejection class="QX11Info" field-name="x11data"/>
|
<rejection class="QX11Info" field-name="x11data"/>
|
||||||
<value-type name="QX11Info">
|
<value-type name="QX11Info">
|
||||||
<modify-function signature="visual()const" remove="all"/>
|
<add-function signature="display()" return-type="unsigned long" static="yes">
|
||||||
<modify-function signature="appVisual(int)" remove="all"/>
|
<inject-code>
|
||||||
|
%PYARG_0 = PyLong_FromVoidPtr(%TYPE::%FUNCTION_NAME());
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<modify-function signature="visual()const">
|
||||||
|
<inject-code>
|
||||||
|
%PYARG_0 = PyLong_FromVoidPtr(%CPPSELF.%FUNCTION_NAME());
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="appVisual(int)">
|
||||||
|
<inject-code>
|
||||||
|
%PYARG_0 = PyLong_FromVoidPtr(%CPPSELF.%FUNCTION_NAME());
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
<object-type name="QX11EmbedContainer">
|
||||||
|
<enum-type name="Error"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QX11EmbedWidget">
|
||||||
|
<enum-type name="Error"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
<enum-type name="QPixmap::ShareMode"/>
|
<enum-type name="QPixmap::ShareMode"/>
|
||||||
|
|
||||||
<load-typesystem name="typesystem_gui_common.xml" generate="yes"/>
|
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -15,34 +15,28 @@ set(QtHelp_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qthelp_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qthelp_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(help QtHelp_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtHelp_SOURCE_DIR}")
|
set(QtHelp_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtHelp_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtHelp_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_QTHELP_INCLUDE_DIR}
|
${QT_QTHELP_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp)
|
||||||
add_library(QtHelp MODULE ${QtHelp_SRC})
|
set(QtHelp_libraries pyside
|
||||||
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
set_target_properties(QtHelp PROPERTIES PREFIX "")
|
|
||||||
|
|
||||||
target_link_libraries(QtHelp
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTHELP_LIBRARY})
|
${QT_QTHELP_LIBRARY})
|
||||||
add_dependencies(QtHelp QtGui)
|
set(QtHelp_deps QtGui)
|
||||||
|
|
||||||
# install
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtHelp${CMAKE_DEBUG_POSTFIX}.so
|
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/pyside_qthelp_python.h
|
|
||||||
DESTINATION include/PySide/QtHelp/)
|
|
||||||
|
|
||||||
|
|
||||||
|
create_pyside_module(QtHelp
|
||||||
|
QtHelp_include_dirs
|
||||||
|
QtHelp_libraries
|
||||||
|
QtHelp_deps
|
||||||
|
QtHelp_typesystem_path
|
||||||
|
QtHelp_SRC
|
||||||
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,27 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
|
||||||
<typesystem package="PySide.QtHelp">
|
<typesystem package="PySide.QtHelp">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
<enum-type name="QHelpSearchQuery::FieldName"/>
|
|
||||||
|
|
||||||
<value-type name="QHelpContentItem">
|
<value-type name="QHelpContentItem">
|
||||||
<modify-function signature="parent() const">
|
<modify-function signature="parent() const">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
|
|
@ -19,7 +36,9 @@
|
||||||
<object-type name="QHelpIndexModel"/>
|
<object-type name="QHelpIndexModel"/>
|
||||||
<object-type name="QHelpIndexWidget"/>
|
<object-type name="QHelpIndexWidget"/>
|
||||||
<object-type name="QHelpSearchEngine"/>
|
<object-type name="QHelpSearchEngine"/>
|
||||||
<value-type name="QHelpSearchQuery"/>
|
<value-type name="QHelpSearchQuery">
|
||||||
|
<enum-type name="FieldName"/>
|
||||||
|
</value-type>
|
||||||
<object-type name="QHelpSearchQueryWidget"/>
|
<object-type name="QHelpSearchQueryWidget"/>
|
||||||
<object-type name="QHelpSearchResultWidget"/>
|
<object-type name="QHelpSearchResultWidget"/>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -11,47 +11,40 @@ ${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qmaemo5valuebutton_wrapper.
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qtmaemo5_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5/qtmaemo5_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(maemo5 QtMaemo5_SRC
|
set(QtMaemo5_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtMaemo5_SOURCE_DIR}")
|
|
||||||
|
|
||||||
# QT_QTMAEMO5_* variables are not defined by CMake
|
# QT_QTMAEMO5_* variables are not defined by CMake
|
||||||
if(NOT QT_QTMAEMO5_INCLUDE_DIR)
|
if(NOT QT_QTMAEMO5_INCLUDE_DIR)
|
||||||
FIND_PATH(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
|
FIND_PATH(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
|
||||||
PATHS ${QT_HEADERS_DIR}/QtMaemo5 NO_DEFAULT_PATH)
|
PATHS ${QT_HEADERS_DIR}/QtMaemo5 NO_DEFAULT_PATH)
|
||||||
endif(NOT QT_QTMAEMO5_INCLUDE_DIR)
|
endif()
|
||||||
if(NOT QT_QTMAEMO5_LIBRARY)
|
if(NOT QT_QTMAEMO5_LIBRARY)
|
||||||
FIND_LIBRARY(QT_QTMAEMO5_LIBRARY QtMaemo5
|
FIND_LIBRARY(QT_QTMAEMO5_LIBRARY QtMaemo5
|
||||||
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
endif(NOT QT_QTMAEMO5_LIBRARY)
|
endif()
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtMaemo5_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_QTMAEMO5_INCLUDE_DIR}
|
${QT_QTMAEMO5_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtCore_BINARY_DIR}/${BINDING_NAME}/QtCore/
|
${QtCore_BINARY_DIR}/${BINDING_NAME}/QtCore/
|
||||||
${QtGui_BINARY_DIR}/${BINDING_NAME}/QtGui/
|
${QtGui_BINARY_DIR}/${BINDING_NAME}/QtGui/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5)
|
${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtMaemo5)
|
||||||
add_library(QtMaemo5 MODULE ${QtMaemo5_SRC})
|
set(QtMaemo5_libraries pyside
|
||||||
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
set_target_properties(QtMaemo5 PROPERTIES
|
|
||||||
PREFIX "")
|
|
||||||
|
|
||||||
target_link_libraries(QtMaemo5
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTMAEMO5_LIBRARY})
|
${QT_QTMAEMO5_LIBRARY})
|
||||||
|
set(QtMaemo5_deps QtGui)
|
||||||
|
|
||||||
#add_dependencies(QtMaemo5)
|
create_pyside_module(QtMaemo5
|
||||||
|
QtMaemo5_include_dirs
|
||||||
# install
|
QtMaemo5_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtMaemo5${CMAKE_DEBUG_POSTFIX}.so
|
QtMaemo5_deps
|
||||||
DESTINATION ${SITE_PACKAGE}/${BINDING_NAME})
|
QtMaemo5_typesystem_path
|
||||||
|
QtMaemo5_SRC
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMaemo5/pyside_qtmaemo5_python.h
|
"")
|
||||||
DESTINATION include/${BINDING_NAME}/QtMaemo5/)
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,26 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtMaemo5">
|
<typesystem package="PySide.QtMaemo5">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
||||||
<enum-type name="QMaemo5ValueButton::ValueLayout"/>
|
|
||||||
|
|
||||||
<object-type name="QMaemo5AbstractPickSelector">
|
<object-type name="QMaemo5AbstractPickSelector">
|
||||||
<modify-function signature="widget(QWidget*)">
|
<modify-function signature="widget(QWidget*)">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
|
|
@ -30,7 +47,7 @@
|
||||||
<object-type name="QMaemo5InformationBox">
|
<object-type name="QMaemo5InformationBox">
|
||||||
<modify-function signature="setWidget(QWidget*)">
|
<modify-function signature="setWidget(QWidget*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<reference-count action="add"/>
|
<reference-count action="set"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="paintEvent(QPaintEvent*)">
|
<modify-function signature="paintEvent(QPaintEvent*)">
|
||||||
|
|
@ -44,7 +61,7 @@
|
||||||
<object-type name="QMaemo5ListPickSelector">
|
<object-type name="QMaemo5ListPickSelector">
|
||||||
<modify-function signature="setModel(QAbstractItemModel*)">
|
<modify-function signature="setModel(QAbstractItemModel*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<reference-count action="add"/>
|
<reference-count action="set"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
|
|
@ -57,6 +74,7 @@
|
||||||
|
|
||||||
<object-type name="QMaemo5TimePickSelector"/>
|
<object-type name="QMaemo5TimePickSelector"/>
|
||||||
<object-type name="QMaemo5ValueButton">
|
<object-type name="QMaemo5ValueButton">
|
||||||
|
<enum-type name="ValueLayout"/>
|
||||||
<modify-function signature="setPickSelector(QMaemo5AbstractPickSelector*)">
|
<modify-function signature="setPickSelector(QMaemo5AbstractPickSelector*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<parent index="this" action="add"/>
|
<parent index="this" action="add"/>
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,9 @@ set(QtMultimedia_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qvideoframe_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qvideoframe_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qtmultimedia_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qtmultimedia_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
set(QtMultimedia_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
|
||||||
execute_generator(multimedia QtMultimedia_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
set(QtMultimedia_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
|
@ -28,24 +27,22 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTMULTIMEDIA_INCLUDE_DIR}
|
${QT_QTMULTIMEDIA_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/)
|
||||||
)
|
|
||||||
|
|
||||||
add_library(QtMultimedia MODULE ${QtMultimedia_SRC})
|
set(QtMultimedia_libraries pyside
|
||||||
set_property(TARGET QtMultimedia PROPERTY PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(QtMultimedia
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTMULTIMEDIA_LIBRARY}
|
${QT_QTMULTIMEDIA_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY})
|
||||||
)
|
|
||||||
add_dependencies(QtMultimedia QtGui)
|
|
||||||
|
|
||||||
# install
|
set(QtMultimedia_deps QtGui)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtMultimedia${CMAKE_DEBUG_POSTFIX}.so
|
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
create_pyside_module(QtMultimedia
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/pyside_qtmultimedia_python.h
|
QtMultimedia_include_dirs
|
||||||
DESTINATION include/PySide/QtMultimedia/)
|
QtMultimedia_libraries
|
||||||
|
QtMultimedia_deps
|
||||||
|
QtMultimedia_typesystem_path
|
||||||
|
QtMultimedia_SRC
|
||||||
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,44 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtMultimedia">
|
<typesystem package="PySide.QtMultimedia">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
<rejection class="" function-name="qobject_cast<QAudioEngineFactoryInterface*>"/>
|
<rejection class="" function-name="qobject_cast<QAudioEngineFactoryInterface*>"/>
|
||||||
<rejection class="" function-name="qobject_interface_iid<QAudioEngineFactoryInterface*>"/>
|
<rejection class="" function-name="qobject_interface_iid<QAudioEngineFactoryInterface*>"/>
|
||||||
|
|
||||||
<namespace-type name="QAudio"/>
|
<namespace-type name="QAudio">
|
||||||
<enum-type name="QAudio::Error"/>
|
<enum-type name="Error"/>
|
||||||
<enum-type name="QAudio::Mode"/>
|
<enum-type name="Mode"/>
|
||||||
<enum-type name="QAudio::State"/>
|
<enum-type name="State"/>
|
||||||
<enum-type name="QAbstractVideoBuffer::HandleType"/>
|
</namespace-type>
|
||||||
<enum-type name="QAbstractVideoBuffer::MapMode"/>
|
|
||||||
<enum-type name="QAbstractVideoSurface::Error"/>
|
|
||||||
<enum-type name="QAudioFormat::Endian"/>
|
|
||||||
<enum-type name="QAudioFormat::SampleType"/>
|
|
||||||
<enum-type name="QVideoFrame::FieldType"/>
|
|
||||||
<enum-type name="QVideoFrame::PixelFormat"/>
|
|
||||||
<enum-type name="QVideoSurfaceFormat::Direction"/>
|
|
||||||
<enum-type name="QVideoSurfaceFormat::YCbCrColorSpace"/>
|
|
||||||
|
|
||||||
<value-type name="QVideoSurfaceFormat"/>
|
<value-type name="QVideoSurfaceFormat">
|
||||||
|
<enum-type name="Direction"/>
|
||||||
|
<enum-type name="YCbCrColorSpace"/>
|
||||||
|
</value-type>
|
||||||
<object-type name="QAbstractVideoBuffer">
|
<object-type name="QAbstractVideoBuffer">
|
||||||
|
<enum-type name="HandleType"/>
|
||||||
|
<enum-type name="MapMode"/>
|
||||||
|
<modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)" remove="all"/>
|
||||||
|
<!-- TODO: discuss a way to have this working with the virtual method.
|
||||||
<modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)">
|
<modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)">
|
||||||
<modify-argument index="0">
|
<modify-argument index="0">
|
||||||
<replace-type modified-type="PyObject"/>
|
<replace-type modified-type="PyObject"/>
|
||||||
|
|
@ -35,11 +53,20 @@
|
||||||
<insert-template name="fix_arg,int*,int*"/>
|
<insert-template name="fix_arg,int*,int*"/>
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
-->
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QAbstractVideoSurface">
|
||||||
|
<enum-type name="Error"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QVideoFrame">
|
||||||
|
<enum-type name="FieldType"/>
|
||||||
|
<enum-type name="PixelFormat"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QAbstractVideoSurface"/>
|
|
||||||
<object-type name="QVideoFrame"/>
|
|
||||||
|
|
||||||
<value-type name="QAudioFormat"/>
|
<value-type name="QAudioFormat">
|
||||||
|
<enum-type name="Endian"/>
|
||||||
|
<enum-type name="SampleType"/>
|
||||||
|
</value-type>
|
||||||
<value-type name="QAudioDeviceInfo"/>
|
<value-type name="QAudioDeviceInfo"/>
|
||||||
<object-type name="QAbstractAudioDeviceInfo"/>
|
<object-type name="QAbstractAudioDeviceInfo"/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,52 +1,5 @@
|
||||||
project(QtNetwork)
|
project(QtNetwork)
|
||||||
|
|
||||||
# Check QtNetwork support
|
|
||||||
macro(CHECK_QT_NETWORK_MACRO macro_display_name qt_macro module_sources global_sources)
|
|
||||||
if (DEFINED PYSIDE_${qt_macro})
|
|
||||||
if (PYSIDE_${qt_macro})
|
|
||||||
list(APPEND ${global_sources} ${${module_sources}})
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${qt_macro}.cxx)
|
|
||||||
file(WRITE ${SRC_FILE}
|
|
||||||
"#include <QtNetwork>\n"
|
|
||||||
"int main() { \n"
|
|
||||||
"#ifdef ${qt_macro}\n"
|
|
||||||
"#error not supported.\n"
|
|
||||||
"#endif\n"
|
|
||||||
"}\n")
|
|
||||||
|
|
||||||
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
|
|
||||||
${SRC_FILE}
|
|
||||||
CMAKE_FLAGS
|
|
||||||
-DINCLUDE_DIRECTORIES:STRING=${QT_QTNETWORK_INCLUDE_DIR}\;${QT_INCLUDE_DIR}
|
|
||||||
-DLINK_LIBRARIES:PATH=${QT_QTNETWORK_LIBRARY_RELEASE}
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
|
||||||
|
|
||||||
set("PYSIDE_${qt_macro}" ${Q_WORKS} CACHE STRING "Has this Qt module been found by pyside?")
|
|
||||||
if(Q_WORKS)
|
|
||||||
message(STATUS "Testing support to ${macro_display_name} -- enabled")
|
|
||||||
list(APPEND ${global_sources} ${${module_sources}})
|
|
||||||
else()
|
|
||||||
message(STATUS "Testing support to ${macro_display_name} -- disabled")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endmacro(CHECK_QT_NETWORK_MACRO)
|
|
||||||
|
|
||||||
|
|
||||||
if(Q_WS_X11)
|
|
||||||
set(MODULE_NAME network_x11)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
|
|
||||||
elseif(Q_WS_MAC)
|
|
||||||
set(MODULE_NAME network_mac)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "OS not supported")
|
|
||||||
endif(Q_WS_X11)
|
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
|
||||||
set (QtNetwork_47_SRC
|
set (QtNetwork_47_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkconfiguration_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkconfiguration_wrapper.cpp
|
||||||
|
|
@ -57,25 +10,39 @@ else()
|
||||||
set(QtNetwork_47_SRC )
|
set(QtNetwork_47_SRC )
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set(QtNetwork_OPTIONAL_SRC )
|
||||||
|
set(QtNetwork_DROPPED_ENTRIES )
|
||||||
|
check_qt_class(QtNetwork QSslCertificate QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtNetwork QSslCipher QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtNetwork QSslConfiguration QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtNetwork QSslError QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtNetwork QSslKey QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
|
||||||
|
check_qt_class(QtNetwork QSslSocket QtNetwork_OPTIONAL_SRC QtNetwork_DROPPED_ENTRIES)
|
||||||
|
|
||||||
set(QtNetwork_SRC
|
set(QtNetwork_SRC
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractnetworkcache_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qauthenticator_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qauthenticator_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qftp_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qftp_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostaddress_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostaddress_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostinfo_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhostinfo_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttp_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpheader_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpheader_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttprequestheader_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttprequestheader_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpresponseheader_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttpresponseheader_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qhttp_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qipv6address_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qipv6address_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalserver_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalserver_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalsocket_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qlocalsocket_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaccessmanager_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaccessmanager_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaddressentry_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkaddressentry_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookiejar_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcachemetadata_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookie_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookie_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookiejar_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkdiskcache_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkinterface_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkinterface_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxy_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxy_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxyfactory_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkproxyquery_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkreply_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkreply_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkrequest_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkrequest_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qssl_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qssl_wrapper.cpp
|
||||||
|
|
@ -84,44 +51,33 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtcpsocket_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtnetwork_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtnetwork_module_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp
|
||||||
${SPECIFIC_OS_FILES}
|
|
||||||
${QtNetwork_47_SRC}
|
${QtNetwork_47_SRC}
|
||||||
|
${QtNetwork_OPTIONAL_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OPENSSL_SOURCES
|
set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslcipher_wrapper.cpp
|
set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslkey_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslconfiguration_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslerror_wrapper.cpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qsslsocket_wrapper.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
CHECK_QT_NETWORK_MACRO("Network OPENSSL" QT_NO_OPENSSL OPENSSL_SOURCES QtNetwork_SRC)
|
|
||||||
|
|
||||||
execute_generator(network QtNetwork_SRC "${CMAKE_CURRENT_SOURCE_DIR}:${QtCore_SOURCE_DIR}")
|
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${QT_QTNETWORK_INCLUDE_DIR}
|
${QT_QTNETWORK_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/)
|
||||||
)
|
set(QtNetwork_libraries pyside
|
||||||
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
add_library(QtNetwork MODULE ${QtNetwork_SRC})
|
|
||||||
set_property(TARGET QtNetwork PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtNetwork
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTNETWORK_LIBRARY}
|
${QT_QTNETWORK_LIBRARY})
|
||||||
)
|
|
||||||
add_dependencies(QtNetwork QtCore)
|
|
||||||
|
|
||||||
# install
|
set(QtNetwork_deps QtCore)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtNetwork${CMAKE_DEBUG_POSTFIX}.so
|
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
create_pyside_module(QtNetwork
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/pyside_qtnetwork_python.h
|
QtNetwork_include_dirs
|
||||||
DESTINATION include/PySide/QtNetwork/)
|
QtNetwork_libraries
|
||||||
|
QtNetwork_deps
|
||||||
|
QtNetwork_typesystem_path
|
||||||
|
QtNetwork_SRC
|
||||||
|
""
|
||||||
|
""
|
||||||
|
QtNetwork_DROPPED_ENTRIES)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
char data[%ARGUMENT_NAMES];
|
|
||||||
QHostAddress ha;
|
|
||||||
quint16 port;
|
|
||||||
|
|
||||||
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(data, %ARGUMENT_NAMES, &ha, &port);
|
|
||||||
%PYARG_0 = Shiboken::makeTuple(QByteArray(data, retval), ha, port);
|
|
||||||
|
|
@ -1,50 +1,45 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtNetwork">
|
<typesystem package="PySide.QtNetwork">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
||||||
|
|
||||||
<namespace-type name="QSsl">
|
<namespace-type name="QSsl">
|
||||||
|
<enum-type name="AlternateNameEntryType"/>
|
||||||
|
<enum-type name="EncodingFormat"/>
|
||||||
|
<enum-type name="KeyAlgorithm"/>
|
||||||
|
<enum-type name="KeyType"/>
|
||||||
|
<enum-type name="SslProtocol"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="qssl.h" location="global"/>
|
<include file-name="qssl.h" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</namespace-type>
|
</namespace-type>
|
||||||
|
|
||||||
<rejection class="QIPv6Address" field-name="c"/>
|
<rejection class="QIPv6Address" field-name="c"/>
|
||||||
<rejection class="QSslCertificate"/>
|
|
||||||
<enum-type name="QAbstractSocket::NetworkLayerProtocol"/>
|
|
||||||
<enum-type name="QAbstractSocket::SocketError"/>
|
|
||||||
<enum-type name="QAbstractSocket::SocketOption"/>
|
|
||||||
<enum-type name="QAbstractSocket::SocketState"/>
|
|
||||||
<enum-type name="QAbstractSocket::SocketType"/>
|
|
||||||
<enum-type name="QFtp::Command"/>
|
|
||||||
<enum-type name="QFtp::Error"/>
|
|
||||||
<enum-type name="QFtp::State"/>
|
|
||||||
<enum-type name="QFtp::TransferMode"/>
|
|
||||||
<enum-type name="QFtp::TransferType"/>
|
|
||||||
<enum-type name="QHostAddress::SpecialAddress"/>
|
|
||||||
<enum-type name="QHttp::Error"/>
|
|
||||||
<enum-type name="QHttp::State"/>
|
|
||||||
<enum-type name="QHttp::ConnectionMode"/>
|
|
||||||
<enum-type name="QNetworkInterface::InterfaceFlag" flags="QNetworkInterface::InterfaceFlags"/>
|
|
||||||
<enum-type name="QNetworkProxy::Capability"/>
|
|
||||||
<enum-type name="QNetworkProxy::ProxyType"/>
|
|
||||||
<enum-type name="QUdpSocket::BindFlag" flags="QUdpSocket::BindMode"/>
|
|
||||||
<enum-type name="QUrlInfo::PermissionSpec"/>
|
|
||||||
<enum-type name="QHostInfo::HostInfoError"/>
|
|
||||||
<enum-type name="QSsl::KeyType"/>
|
|
||||||
<enum-type name="QSsl::EncodingFormat"/>
|
|
||||||
<enum-type name="QSsl::KeyAlgorithm"/>
|
|
||||||
<enum-type name="QSsl::AlternateNameEntryType"/>
|
|
||||||
<enum-type name="QSsl::SslProtocol"/>
|
|
||||||
<enum-type name="QLocalSocket::LocalSocketError"/>
|
|
||||||
<enum-type name="QLocalSocket::LocalSocketState"/>
|
|
||||||
<enum-type name="QNetworkAccessManager::Operation"/>
|
|
||||||
<enum-type name="QNetworkCookie::RawForm"/>
|
|
||||||
<enum-type name="QNetworkReply::NetworkError"/>
|
|
||||||
<enum-type name="QNetworkRequest::Attribute" extensible="yes"/>
|
|
||||||
<enum-type name="QNetworkRequest::CacheLoadControl"/>
|
|
||||||
<enum-type name="QNetworkRequest::KnownHeaders"/>
|
|
||||||
|
|
||||||
<object-type name="QAbstractSocket">
|
<object-type name="QAbstractSocket">
|
||||||
|
<enum-type name="NetworkLayerProtocol"/>
|
||||||
|
<enum-type name="SocketError"/>
|
||||||
|
<enum-type name="SocketOption" since="4.6"/>
|
||||||
|
<enum-type name="SocketState"/>
|
||||||
|
<enum-type name="SocketType"/>
|
||||||
<modify-function signature="connectToHost(const QString&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
<modify-function signature="connectToHost(const QString&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
||||||
<modify-function signature="connectToHost(const QHostAddress&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
<modify-function signature="connectToHost(const QHostAddress&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
||||||
<modify-function signature="disconnectFromHost()" allow-thread="yes" />
|
<modify-function signature="disconnectFromHost()" allow-thread="yes" />
|
||||||
|
|
@ -53,6 +48,11 @@
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QFtp">
|
<object-type name="QFtp">
|
||||||
|
<enum-type name="Command"/>
|
||||||
|
<enum-type name="Error"/>
|
||||||
|
<enum-type name="State"/>
|
||||||
|
<enum-type name="TransferMode"/>
|
||||||
|
<enum-type name="TransferType"/>
|
||||||
<modify-function signature="connectToHost(const QString&, quint16)" allow-thread="yes" />
|
<modify-function signature="connectToHost(const QString&, quint16)" allow-thread="yes" />
|
||||||
<modify-function signature="login(const QString&, const QString&)" allow-thread="yes" />
|
<modify-function signature="login(const QString&, const QString&)" allow-thread="yes" />
|
||||||
<modify-function signature="close()" allow-thread="yes" />
|
<modify-function signature="close()" allow-thread="yes" />
|
||||||
|
|
@ -81,7 +81,9 @@
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QHttp">
|
<object-type name="QHttp">
|
||||||
<modify-function signature="closeConnection()" remove="all"/>
|
<enum-type name="ConnectionMode"/>
|
||||||
|
<enum-type name="Error"/>
|
||||||
|
<enum-type name="State"/>
|
||||||
<modify-function signature="readAll()" allow-thread="yes"/>
|
<modify-function signature="readAll()" allow-thread="yes"/>
|
||||||
<modify-function signature="read(char*, qint64)" allow-thread="yes">
|
<modify-function signature="read(char*, qint64)" allow-thread="yes">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
|
|
@ -94,6 +96,9 @@
|
||||||
<insert-template name="read_wrapper"/>
|
<insert-template name="read_wrapper"/>
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
<!-- ### Obsolete methods -->
|
||||||
|
<modify-function signature="closeConnection()" remove="all"/>
|
||||||
|
<!-- ### -->
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QTcpServer">
|
<object-type name="QTcpServer">
|
||||||
<modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
|
<modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
|
||||||
|
|
@ -106,7 +111,7 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="PyTuple*"/>
|
<replace-type modified-type="(retval, timeOut)"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="fix_args,bool*"/>
|
<insert-template name="fix_args,bool*"/>
|
||||||
|
|
@ -115,6 +120,7 @@
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QTcpSocket"/>
|
<object-type name="QTcpSocket"/>
|
||||||
<object-type name="QUdpSocket">
|
<object-type name="QUdpSocket">
|
||||||
|
<enum-type name="BindFlag" flags="BindMode"/>
|
||||||
<modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes">
|
<modify-function signature="readDatagram(char*, qint64, QHostAddress*, quint16*)" allow-thread="yes">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
|
|
@ -128,19 +134,29 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="PyTuple*"/>
|
<replace-type modified-type="(data, address, port)"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning" file="glue/qudpsocket_read_datagram_glue.cpp"/>
|
<inject-code class="target" position="beginning">
|
||||||
|
Shiboken::AutoArrayPointer<char> data(%ARGUMENT_NAMES);
|
||||||
|
QHostAddress ha;
|
||||||
|
quint16 port;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(data, %ARGUMENT_NAMES, &ha, &port);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
QByteArray ba(data, retval);
|
||||||
|
%PYARG_0 = PyTuple_New(3);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QByteArray](ba));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QHostAddress](ha));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[quint16](port));
|
||||||
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&,quint16)" remove="all"/>
|
|
||||||
<modify-function signature="writeDatagram(const QByteArray&, const QHostAddress&, quint16)" allow-thread="yes"/>
|
<modify-function signature="writeDatagram(const QByteArray&, const QHostAddress&, quint16)" allow-thread="yes"/>
|
||||||
|
<!-- ### writeDatagram(QByteArray, ...) does the trick -->
|
||||||
|
<modify-function signature="writeDatagram(const char*,qint64,const QHostAddress&,quint16)" remove="all"/>
|
||||||
|
<!-- ### -->
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QHttpHeader">
|
<object-type name="QHttpHeader" />
|
||||||
<modify-function signature="operator=(QHttpHeader)" remove="all"/>
|
|
||||||
|
|
||||||
<modify-function signature="QHttpHeader(QHttpHeader)" remove="all"/>
|
|
||||||
</object-type>
|
|
||||||
<object-type name="QLocalServer">
|
<object-type name="QLocalServer">
|
||||||
<modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
|
<modify-function signature="waitForNewConnection(int,bool*)" allow-thread="yes">
|
||||||
<!-- FIXME -->
|
<!-- FIXME -->
|
||||||
|
|
@ -155,13 +171,30 @@
|
||||||
<insert-template name="fix_args,bool*"/>
|
<insert-template name="fix_args,bool*"/>
|
||||||
</inject-code>
|
</inject-code>
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="PyTuple*"/>
|
<replace-type modified-type="(retval, timeOut)"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QLocalSocket"/>
|
<object-type name="QLocalSocket">
|
||||||
|
<enum-type name="LocalSocketError"/>
|
||||||
|
<enum-type name="LocalSocketState"/>
|
||||||
|
</object-type>
|
||||||
<object-type name="QNetworkAccessManager">
|
<object-type name="QNetworkAccessManager">
|
||||||
|
<enum-type name="NetworkAccessibility" since="4.7"/>
|
||||||
|
<enum-type name="Operation"/>
|
||||||
|
<modify-function signature="createRequest(QNetworkAccessManager::Operation, const QNetworkRequest&, QIODevice *)">
|
||||||
|
<modify-argument index="3" invalidate-after-use="yes"/>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="get(const QNetworkRequest&)" allow-thread="yes"/>
|
||||||
|
<modify-function signature="post(const QNetworkRequest &, QIODevice *)" allow-thread="yes"/>
|
||||||
|
<modify-function signature="post(const QNetworkRequest &, const QByteArray &)" allow-thread="yes"/>
|
||||||
|
<modify-function signature="put(const QNetworkRequest &, QIODevice *)" allow-thread="yes"/>
|
||||||
|
<modify-function signature="put(const QNetworkRequest &, const QByteArray &)" allow-thread="yes"/>
|
||||||
|
<modify-function signature="sendCustomRequest(const QNetworkRequest &, const QByteArray &, QIODevice *)" allow-thread="yes" since="4.7" />
|
||||||
<modify-function signature="setCookieJar(QNetworkCookieJar*)">
|
<modify-function signature="setCookieJar(QNetworkCookieJar*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<define-ownership class="target" owner="c++"/>
|
<define-ownership class="target" owner="c++"/>
|
||||||
|
|
@ -169,99 +202,143 @@
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QNetworkCookieJar"/>
|
<object-type name="QNetworkCookieJar"/>
|
||||||
<object-type name="QNetworkReply"/>
|
<object-type name="QNetworkReply">
|
||||||
|
<enum-type name="NetworkError"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
<value-type name="QHostAddress" hash-function="qHash">
|
<value-type name="QHostAddress" hash-function="qHash">
|
||||||
|
<enum-type name="SpecialAddress"/>
|
||||||
|
<!-- ### QHostAddress(QIPv6Address) does this -->
|
||||||
<modify-function signature="QHostAddress(quint8*)" remove="all" />
|
<modify-function signature="QHostAddress(quint8*)" remove="all" />
|
||||||
<modify-function signature="operator=(QString)" remove="all"/>
|
<!-- ### -->
|
||||||
<modify-function signature="operator=(QHostAddress)" remove="all"/>
|
<modify-function signature="setAddress(quint8*)" remove="all" />
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QHostInfo">
|
<value-type name="QHostInfo">
|
||||||
<modify-function signature="operator=(QHostInfo)" remove="all"/>
|
<enum-type name="HostInfoError"/>
|
||||||
<modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/>
|
<modify-function signature="lookupHost(QString,QObject*,const char*)" access="private"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QHttpRequestHeader">
|
<value-type name="QHttpRequestHeader" />
|
||||||
<modify-function signature="operator=(QHttpRequestHeader)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QHttpResponseHeader">
|
<value-type name="QHttpResponseHeader" />
|
||||||
<modify-function signature="operator=(QHttpResponseHeader)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QNetworkAddressEntry">
|
<value-type name="QNetworkAddressEntry" />
|
||||||
<modify-function signature="operator=(QNetworkAddressEntry)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QNetworkInterface">
|
<value-type name="QNetworkInterface">
|
||||||
<modify-function signature="operator=(QNetworkInterface)" remove="all"/>
|
<enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QNetworkProxy">
|
<value-type name="QNetworkProxy">
|
||||||
<modify-function signature="operator=(QNetworkProxy)" remove="all"/>
|
<enum-type name="Capability" flags="Capabilities" />
|
||||||
|
<enum-type name="ProxyType"/>
|
||||||
|
</value-type>
|
||||||
|
|
||||||
|
<object-type name="QNetworkProxyFactory" />
|
||||||
|
<value-type name="QNetworkProxyQuery">
|
||||||
|
<enum-type name="QueryType" />
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QUrlInfo">
|
<value-type name="QUrlInfo">
|
||||||
<modify-function signature="operator=(QUrlInfo)" remove="all"/>
|
<enum-type name="PermissionSpec"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QIPv6Address">
|
<value-type name="QIPv6Address">
|
||||||
<modify-function signature="operator[](int)const">
|
<add-function signature="__len__">
|
||||||
<remove/>
|
<inject-code class="target" position="beginning">
|
||||||
</modify-function>
|
return 16;
|
||||||
<modify-function signature="operator[](int)">
|
</inject-code>
|
||||||
<remove/>
|
</add-function>
|
||||||
</modify-function>
|
<add-function signature="__getitem__">
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
if (_i >= 16) {
|
||||||
|
PyErr_SetString(PyExc_IndexError, "index out of bounds");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (_i < 0)
|
||||||
|
_i = 16 - qAbs(_i);
|
||||||
|
|
||||||
|
uint item = %CPPSELF.c[_i];
|
||||||
|
return %CONVERTTOPYTHON[uint](item);
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__len__">
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
return 16;
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__setitem__">
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
if (_i >= 16) {
|
||||||
|
PyErr_SetString(PyExc_IndexError, "index out of bounds");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (_i < 0)
|
||||||
|
_i = 16 - qAbs(_i);
|
||||||
|
quint8 item = %CONVERTTOCPP[quint8](_value);
|
||||||
|
%CPPSELF.c[_i] = item;
|
||||||
|
return 0;
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QAuthenticator">
|
<value-type name="QAuthenticator" />
|
||||||
<modify-function signature="operator=(QAuthenticator)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
<value-type name="QNetworkCookie">
|
<value-type name="QNetworkCookie">
|
||||||
<modify-function signature="operator=(QNetworkCookie)" remove="all"/>
|
<enum-type name="RawForm"/>
|
||||||
|
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QDateTime" location="global"/>
|
<include file-name="QDateTime" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="QNetworkRequest">
|
<value-type name="QNetworkRequest">
|
||||||
<modify-function signature="operator=(QNetworkRequest)" remove="all"/>
|
<enum-type name="Attribute" extensible="yes"/>
|
||||||
|
<enum-type name="LoadControl" since="4.7"/>
|
||||||
|
<enum-type name="Priority" since="4.7"/>
|
||||||
|
<enum-type name="CacheLoadControl"/>
|
||||||
|
<enum-type name="KnownHeaders"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<enum-type name="QSslError::SslError"/>
|
|
||||||
<enum-type name="QSslCertificate::SubjectInfo"/>
|
|
||||||
<enum-type name="QSslSocket::SslMode"/>
|
|
||||||
<enum-type name="QSslSocket::PeerVerifyMode"/>
|
|
||||||
|
|
||||||
<value-type name="QSslCipher"/>
|
|
||||||
<value-type name="QSslError"/>
|
|
||||||
<value-type name="QSslKey"/>
|
|
||||||
<!-- TODO QSslCertificate requires QMultiMap which isn't implemented yet
|
<!-- TODO QSslCertificate requires QMultiMap which isn't implemented yet
|
||||||
<value-type name="QSslCertificate"/>
|
<value-type name="QSslCertificate"/>
|
||||||
-->
|
-->
|
||||||
<value-type name="QSslConfiguration"/>
|
<enum-type name="QSslCertificate::SubjectInfo"/>
|
||||||
|
|
||||||
|
<!-- Qt 4.7 -->
|
||||||
|
<value-type name="QNetworkConfiguration" since="4.7">
|
||||||
|
<enum-type name="BearerType" />
|
||||||
|
<enum-type name="Purpose" since="4.7"/>
|
||||||
|
<enum-type name="StateFlag" flags="StateFlags" since="4.7"/>
|
||||||
|
<enum-type name="Type" since="4.7"/>
|
||||||
|
</value-type>
|
||||||
|
<object-type name="QNetworkConfigurationManager" since="4.7">
|
||||||
|
<enum-type name="Capability" flags="Capabilities" since="4.7"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QNetworkSession" since="4.7">
|
||||||
|
<enum-type name="SessionError" since="4.7"/>
|
||||||
|
<enum-type name="State" since="4.7"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
|
<object-type name="QAbstractNetworkCache"/>
|
||||||
|
<object-type name="QNetworkDiskCache"/>
|
||||||
|
<value-type name="QNetworkCacheMetaData"/>
|
||||||
|
|
||||||
|
<suppress-warning text="Shadowing: QAbstractSocket::*"/>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- The following entries may be present in the system or not. Keep this section organized. -->
|
||||||
|
<value-type name="QSslCertificate"/>
|
||||||
|
<value-type name="QSslCipher"/>
|
||||||
|
<value-type name="QSslConfiguration"/>
|
||||||
|
<value-type name="QSslError">
|
||||||
|
<enum-type name="SslError"/>
|
||||||
|
</value-type>
|
||||||
|
|
||||||
|
<value-type name="QSslKey"/>
|
||||||
<object-type name="QSslSocket">
|
<object-type name="QSslSocket">
|
||||||
|
<enum-type name="SslMode"/>
|
||||||
|
<enum-type name="PeerVerifyMode"/>
|
||||||
<modify-function signature="connectToHostEncrypted(const QString&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
<modify-function signature="connectToHostEncrypted(const QString&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
||||||
<modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
|
<modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
|
||||||
</object-type>
|
</object-type>
|
||||||
|
<!-- The above entries may be present in the system or not. Keep this section organized. -->
|
||||||
|
|
||||||
<!-- Qt 4.7 -->
|
|
||||||
<enum-type name="QNetworkConfiguration::Purpose" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkConfiguration::StateFlag" flags="QNetworkConfiguration::StateFlags" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkConfiguration::Type" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkConfigurationManager::Capability" flags="QNetworkConfigurationManager::Capabilities" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkSession::SessionError" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkSession::State" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkAccessManager::NetworkAccessibility" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkRequest::Priority" since="4.7"/>
|
|
||||||
<enum-type name="QNetworkRequest::LoadControl" since="4.7"/>
|
|
||||||
|
|
||||||
<value-type name="QNetworkConfiguration" since="4.7"/>
|
|
||||||
<object-type name="QNetworkConfigurationManager" since="4.7"/>
|
|
||||||
<object-type name="QNetworkSession" since="4.7"/>
|
|
||||||
|
|
||||||
<suppress-warning text="Shadowing: QAbstractSocket::*"/>
|
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,31 +32,27 @@ set(QtOpenGL_SRC
|
||||||
${QtOpenGL_47_SRC}
|
${QtOpenGL_47_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(opengl QtOpenGL_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtOpenGL_SOURCE_DIR}")
|
set(QtOpenGL_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtOpenGL_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtOpenGL_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_QTOPENGL_INCLUDE_DIR}
|
${QT_QTOPENGL_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL)
|
||||||
add_library(QtOpenGL MODULE ${QtOpenGL_SRC})
|
set(QtOpenGL_libraries pyside
|
||||||
set_target_properties(QtOpenGL PROPERTIES PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(QtOpenGL
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTOPENGL_LIBRARY})
|
${QT_QTOPENGL_LIBRARY})
|
||||||
add_dependencies(QtOpenGL QtGui)
|
set(QtOpenGL_deps QtGui)
|
||||||
|
create_pyside_module(QtOpenGL
|
||||||
# install
|
QtOpenGL_include_dirs
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtOpenGL${CMAKE_DEBUG_POSTFIX}.so
|
QtOpenGL_libraries
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtOpenGL_deps
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/pyside_qtopengl_python.h
|
QtOpenGL_typesystem_path
|
||||||
DESTINATION include/PySide/QtOpenGL/)
|
QtOpenGL_SRC
|
||||||
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,65 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtOpenGL">
|
<typesystem package="PySide.QtOpenGL">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
<rejection class="QGLColormap::QGLColormapData"/>
|
<primitive-type name="GLbitfield"/>
|
||||||
<rejection class="QGLWidget" function-name="setMouseTracking"/>
|
<primitive-type name="GLboolean"/>
|
||||||
|
<primitive-type name="GLbyte"/>
|
||||||
|
<primitive-type name="GLclampd"/>
|
||||||
|
<primitive-type name="GLclampf"/>
|
||||||
|
<primitive-type name="GLdouble"/>
|
||||||
|
<primitive-type name="GLenum"/>
|
||||||
|
<primitive-type name="GLfloat"/>
|
||||||
|
<primitive-type name="GLint"/>
|
||||||
|
<primitive-type name="GLshort"/>
|
||||||
|
<primitive-type name="GLsizei"/>
|
||||||
|
<primitive-type name="GLubyte"/>
|
||||||
|
<primitive-type name="GLuint"/>
|
||||||
|
<primitive-type name="GLushort"/>
|
||||||
|
|
||||||
<enum-type name="QGL::FormatOption" flags="QGL::FormatOptions" force-integer="yes"/>
|
<rejection class="QGLColormap::QGLColormapData"/>
|
||||||
<enum-type name="QGLContext::BindOption" flags="QGLContext::BindOptions"/>
|
<rejection class="QGLContext" field-name="currentCtx"/>
|
||||||
<enum-type name="QGLFormat::OpenGLVersionFlag" flags="QGLFormat::OpenGLVersionFlags"/>
|
|
||||||
<enum-type name="QGLFramebufferObject::Attachment"/>
|
|
||||||
<enum-type name="QGLShader::ShaderTypeBit" flags="QGLShader::ShaderType"/>
|
|
||||||
|
|
||||||
<namespace-type name="QGL">
|
<namespace-type name="QGL">
|
||||||
|
<enum-type name="FormatOption" flags="FormatOptions" force-integer="yes"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="qgl.h" location="global"/>
|
<include file-name="qgl.h" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</namespace-type>
|
</namespace-type>
|
||||||
|
|
||||||
<value-type name="QGLColormap">
|
<value-type name="QGLColormap">
|
||||||
<modify-function signature="operator=(QGLColormap)" remove="all"/>
|
|
||||||
|
|
||||||
<modify-function signature="setEntries(int,const unsigned int*,int)">
|
<modify-function signature="setEntries(int,const unsigned int*,int)">
|
||||||
<access modifier="private"/>
|
<access modifier="private"/>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QGLFormat">
|
<value-type name="QGLFormat">
|
||||||
<modify-function signature="operator=(QGLFormat)" remove="all"/>
|
<enum-type name="OpenGLContextProfile" since="4.7"/>
|
||||||
|
<enum-type name="OpenGLVersionFlag" flags="OpenGLVersionFlags"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
|
<rejection class="QGLContext" field-name="currentCtx" />
|
||||||
<object-type name="QGLContext">
|
<object-type name="QGLContext">
|
||||||
|
<enum-type name="BindOption" flags="BindOptions" since="4.6"/>
|
||||||
<modify-function signature="chooseContext(const QGLContext*)">
|
<modify-function signature="chooseContext(const QGLContext*)">
|
||||||
<modify-argument index="1" invalidate-after-use="yes"/>
|
<modify-argument index="1" invalidate-after-use="yes"/>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
@ -37,18 +67,14 @@
|
||||||
<modify-argument index="1" invalidate-after-use="yes"/>
|
<modify-argument index="1" invalidate-after-use="yes"/>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<modify-function signature="getProcAddress(QString)const">
|
<!-- ### Obsolete functions and ctors -->
|
||||||
<remove/>
|
|
||||||
</modify-function>
|
|
||||||
<modify-field name="currentCtx" read="false" write="false"/>
|
|
||||||
<modify-function signature="setDevice(QPaintDevice*)">
|
|
||||||
<remove/>
|
|
||||||
</modify-function>
|
|
||||||
<modify-function signature="generateFontDisplayLists(QFont, int)" remove="all"/>
|
<modify-function signature="generateFontDisplayLists(QFont, int)" remove="all"/>
|
||||||
<modify-function signature="tryVisual(const QGLFormat&, int)" remove="all"/>
|
<modify-function signature="QGLContext(const QGLFormat&, QPaintDevice*)" remove="all" />
|
||||||
<modify-function signature="chooseVisual()" remove="all"/>
|
<!-- ### -->
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QGLFramebufferObject">
|
||||||
|
<enum-type name="Attachment"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QGLFramebufferObject"/>
|
|
||||||
<object-type name="QGLPixelBuffer">
|
<object-type name="QGLPixelBuffer">
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QImage" location="global"/>
|
<include file-name="QImage" location="global"/>
|
||||||
|
|
@ -67,80 +93,645 @@
|
||||||
<parent index="2" action="add"/>
|
<parent index="2" action="add"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<!--- Obsolete -->
|
<!-- ### Not part of Qt public API -->
|
||||||
<modify-function signature="setContext(QGLContext*,const QGLContext*,bool)" remove="all" />
|
<modify-function signature="setContext(QGLContext*,const QGLContext*,bool)" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
|
<!--- ### Obsolete functions -->
|
||||||
<modify-function signature="fontDisplayListBase(QFont, int)" remove="all"/>
|
<modify-function signature="fontDisplayListBase(QFont, int)" remove="all"/>
|
||||||
<modify-function signature="setFormat(QGLFormat)" remove="all"/>
|
<modify-function signature="setFormat(QGLFormat)" remove="all"/>
|
||||||
|
<!-- ### -->
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<value-type name="QGLFramebufferObjectFormat"/>
|
<value-type name="QGLFramebufferObjectFormat" since="4.6"/>
|
||||||
<object-type name="QGLShader"/>
|
<object-type name="QGLShader" since="4.6">
|
||||||
<object-type name="QGLShaderProgram">
|
<enum-type name="ShaderTypeBit" flags="ShaderType"/>
|
||||||
<!-- use QMatrixZxY overloads -->
|
</object-type>
|
||||||
<modify-function signature="setUniformValue(int, Array)" remove="all" />
|
|
||||||
<modify-function signature="setUniformValue(const char*, Array)" remove="all" />
|
<template name="callArrayFunction">
|
||||||
<modify-function signature="setAttributeValue(int,const float*,int,int)" remove="all" />
|
int _size = PySequence_Size(%PYARG_2);
|
||||||
<modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" />
|
if (_size) {
|
||||||
<modify-function signature="setAttributeArray(int, uint, const void*, int, int)" remove="all" since="4.7" />
|
$ATTR_TYPE *_list = new $ATTR_TYPE[_size];
|
||||||
<modify-function signature="setAttributeArray(const char*, uint, const void*, int, int)" remove="all" since="4.7" />
|
if (_size) {
|
||||||
|
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_2, "Failed to parse sequence with type %VECTOR_TYPE."));
|
||||||
|
for(int i=0; i < _size; i++) {
|
||||||
|
PyObject* pv = PySequence_Fast_GET_ITEM(fast.object(), i);
|
||||||
|
_list[i] = %CONVERTTOCPP[$ATTR_TYPE](pv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%CPPSELF.%FUNCTION_NAME(%1, _list, $ARG0);
|
||||||
|
delete[] _list;
|
||||||
|
} else {
|
||||||
|
%CPPSELF.%FUNCTION_NAME(%1, ($ATTR_TYPE*)NULL, $ARG1);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<object-type name="QGLShaderProgram" since="4.6">
|
||||||
|
<!-- setAttributeArray -->
|
||||||
|
<modify-function signature="setAttributeArray(int, const QVector2D*, int)" rename="setAttributeArray2D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector2D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(int, const QVector3D*, int)" rename="setAttributeArray3D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector3D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(int, const QVector4D*, int)" rename="setAttributeArray4D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector4D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(const char*, const QVector2D*, int)" rename="setAttributeArray2D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector2D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(const char*, const QVector3D*, int)" rename="setAttributeArray3D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector3D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(const char*, const QVector4D*, int)" rename="setAttributeArray4D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector4D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<!-- setUniformValueArray -->
|
||||||
|
<modify-function signature="setUniformValueArray(int, const GLint*, int)" rename="setUniformValueArrayInt">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="GLint"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const GLuint*, int)" rename="setUniformValueArrayUint">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="GLuint"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QVector2D*, int)" rename="setUniformValueArray2D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector2D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QVector3D*, int)" rename="setUniformValueArray3D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector3D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QVector4D*, int)" rename="setUniformValueArray4D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector4D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix2x2*, int)" rename="setUniformValueArray2x2">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix2x2"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix2x3*, int)" rename="setUniformValueArray2x3">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix2x3"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix2x4*, int)" rename="setUniformValueArray2x4">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix2x4"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix3x2*, int)" rename="setUniformValueArray3x2">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix3x2"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix3x3*, int)" rename="setUniformValueArray3x3">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix3x3"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix3x4*, int)" rename="setUniformValueArray3x4">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix3x4"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix4x2*, int)" rename="setUniformValueArray4x2">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix4x2"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix4x3*, int)" rename="setUniformValueArray4x3">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix4x3"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(int, const QMatrix4x4*, int)" rename="setUniformValueArray4x4">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix4x4"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const GLint*, int)" rename="setUniformValueArrayInt">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="GLint"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const GLuint*, int)" rename="setUniformValueArrayUint">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="GLuint"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QVector2D*, int)" rename="setUniformValueArray2D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector2D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QVector3D*, int)" rename="setUniformValueArray3D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector3D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QVector4D*, int)" rename="setUniformValueArray4D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector4D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix2x2*, int)" rename="setUniformValueArray2x2">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix2x2"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix2x3*, int)" rename="setUniformValueArray2x3">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix2x3"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix2x4*, int)" rename="setUniformValueArray2x4">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix2x4"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix3x2*, int)" rename="setUniformValueArray3x2">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix3x2"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix3x3*, int)" rename="setUniformValueArray3x3">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix3x3"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix3x4*, int)" rename="setUniformValueArray3x4">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix3x4"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix4x2*, int)" rename="setUniformValueArray4x2">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix4x2"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix4x3*, int)" rename="setUniformValueArray4x3">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix4x3"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setUniformValueArray(const char*, const QMatrix4x4*, int)" rename="setUniformValueArray4x4">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3">
|
||||||
|
<remove-argument />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="_size" />
|
||||||
|
<replace from="$ARG1" to="0" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QMatrix4x4"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<!-- ### TODO: must evaluate if anything other than removal should be done. -->
|
||||||
|
<modify-function signature="setAttributeArray(int,const GLfloat*,int,int)" remove="all" />
|
||||||
|
<modify-function signature="setAttributeArray(const char*,const GLfloat*,int,int)" remove="all" />
|
||||||
|
<modify-function signature="setUniformValueArray(int,const GLfloat*,int,int)" remove="all" />
|
||||||
|
<modify-function signature="setUniformValueArray(const char*,const GLfloat*,int,int)" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
|
|
||||||
|
<!-- ### Use QMatrixZxY overloads -->
|
||||||
|
<modify-function signature="setUniformValue(int,Array)" remove="all" />
|
||||||
|
<modify-function signature="setUniformValue(const char*,Array)" remove="all" />
|
||||||
|
<modify-function signature="setAttributeValue(int,const GLfloat*,int,int)" remove="all" />
|
||||||
|
<modify-function signature="setAttributeValue(const char*,const GLfloat*,int,int)" remove="all" />
|
||||||
|
<modify-function signature="setAttributeArray(int, GLenum, const void*, int, int)" remove="all" since="4.7" />
|
||||||
|
<modify-function signature="setAttributeArray(const char*, GLenum, const void*, int, int)" remove="all" since="4.7" />
|
||||||
|
<!-- ### -->
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<!-- Qt 4.7 -->
|
<!-- Qt 4.7 -->
|
||||||
<enum-type name="QGLFormat::OpenGLContextProfile" since="4.7"/>
|
|
||||||
<enum-type name="QGLBuffer::Access" since="4.7"/>
|
|
||||||
<enum-type name="QGLBuffer::Type" since="4.7"/>
|
|
||||||
<enum-type name="QGLBuffer::UsagePattern" since="4.7"/>
|
|
||||||
|
|
||||||
<object-type name="QGLBuffer" since="4.7">
|
<object-type name="QGLBuffer" since="4.7">
|
||||||
|
<enum-type name="Access" since="4.7"/>
|
||||||
|
<enum-type name="Type" since="4.7"/>
|
||||||
|
<enum-type name="UsagePattern" since="4.7"/>
|
||||||
<modify-function signature="allocate(const void*, int)">
|
<modify-function signature="allocate(const void*, int)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<replace-type modified-type="const QByteArray&"/>
|
<replace-type modified-type="QByteArray&"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<modify-argument index="2">
|
<modify-argument index="2">
|
||||||
<replace-default-expression with="-1"/>
|
<replace-default-expression with="-1"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
int size = %2;
|
int size = (%2 < 0) ? %1.size() : %2;
|
||||||
if (size < 0)
|
%CPPSELF.allocate((const void*) %1.data(), size);
|
||||||
size = %1->size();
|
|
||||||
%CPPSELF.allocate((const void*) %1->data(), size);
|
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="map(QGLBuffer::Access)">
|
<modify-function signature="map(QGLBuffer::Access)">
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code>
|
||||||
void *data = %CPPSELF.map(%1);
|
Py_ssize_t dataSize = %CPPSELF.size();
|
||||||
QByteArray ret;
|
void* data = %CPPSELF.map(%1);
|
||||||
if (data)
|
|
||||||
ret.append((const char*)data, %CPPSELF.size());
|
if (!data) {
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ret);
|
Py_INCREF(Py_None);
|
||||||
|
%PYARG_0 = Py_None;
|
||||||
|
} else if (%1 == QGLBuffer::ReadOnly) {
|
||||||
|
%PYARG_0 = Shiboken::Buffer::newObject(data, dataSize, Shiboken::Buffer::ReadOnly);
|
||||||
|
} else {
|
||||||
|
%PYARG_0 = Shiboken::Buffer::newObject(data, dataSize, Shiboken::Buffer::ReadWrite);
|
||||||
|
}
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="read(int, void*, int)">
|
<modify-function signature="read(int, void*, int)">
|
||||||
<modify-argument index="2">
|
<modify-argument index="2">
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, data)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
char *data = new char[%3];
|
char *data = new char[%3];
|
||||||
bool result = %CPPSELF.read(%1, data, %3);
|
bool result = %CPPSELF.read(%1, data, %3);
|
||||||
QByteArray ret;
|
QByteArray ret;
|
||||||
if (result)
|
if (result)
|
||||||
ret.append((const char*)data, %3);
|
ret.append((const char*)data, %3);
|
||||||
%PYARG_0 = Shiboken::makeTuple(result, ret);
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[bool](result));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QByteArray](ret));
|
||||||
delete[] data;
|
delete[] data;
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="write(int, const void*, int)">
|
<modify-function signature="write(int, const void*, int)">
|
||||||
<modify-argument index="2">
|
<modify-argument index="2">
|
||||||
<replace-type modified-type="const QByteArray&"/>
|
<replace-type modified-type="QByteArray&"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<modify-argument index="3">
|
<modify-argument index="3">
|
||||||
<replace-default-expression with="-1"/>
|
<replace-default-expression with="-1"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
int size = %3;
|
int size = (%3 < 0) ? %2.size() : %3;
|
||||||
if (size < 0)
|
%CPPSELF.write(%1, (const void*) %2.data(), size);
|
||||||
size = %2->size();
|
|
||||||
%CPPSELF.write(%1, (const void*) %2->data(), size);
|
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
project(QtScript)
|
project(QtScript)
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 7)
|
||||||
set (QtCore_46_SRC )
|
set (QtScript_47_SRC )
|
||||||
else()
|
else()
|
||||||
set(QtScript_46_SRC
|
set(QtScript_47_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptprogram_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptprogram_wrapper.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -22,33 +22,28 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptextensionplugin_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptstring_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptstring_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptvalue_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptvalue_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptvalueiterator_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/qscriptvalueiterator_wrapper.cpp
|
||||||
${QtScript_46_SRC}
|
${QtScript_47_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(script QtScript_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}")
|
set(QtScript_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
|
set(QtScript_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${QT_QTSCRIPT_INCLUDE_DIR}
|
${QT_QTSCRIPT_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore
|
${QtCore_BINARY_DIR}/PySide/QtCore )
|
||||||
)
|
set(QtScript_libraries pyside
|
||||||
add_library(QtScript MODULE ${QtScript_SRC})
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
set_property(TARGET QtScript PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtScript
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTSCRIPT_LIBRARY}
|
${QT_QTSCRIPT_LIBRARY})
|
||||||
)
|
set(QtScript_deps QtCore)
|
||||||
add_dependencies(QtScript QtCore)
|
create_pyside_module(QtScript
|
||||||
|
QtScript_include_dirs
|
||||||
# install
|
QtScript_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtScript${CMAKE_DEBUG_POSTFIX}.so DESTINATION ${SITE_PACKAGE}/PySide)
|
QtScript_deps
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript/pyside_qtscript_python.h
|
QtScript_typesystem_path
|
||||||
DESTINATION include/PySide/QtScript/)
|
QtScript_SRC
|
||||||
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,115 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtScript">
|
<typesystem package="PySide.QtScript">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no" />
|
<load-typesystem name="typesystem_core.xml" generate="no" />
|
||||||
|
|
||||||
<enum-type name="QScriptContext::Error"/>
|
|
||||||
<enum-type name="QScriptContext::ExecutionState"/>
|
|
||||||
<enum-type name="QScriptContextInfo::FunctionType"/>
|
|
||||||
<enum-type name="QScriptEngine::ValueOwnership"/>
|
|
||||||
<enum-type name="QScriptEngine::QObjectWrapOption" flags="QScriptEngine::QObjectWrapOptions"/>
|
|
||||||
<enum-type name="QScriptEngineAgent::Extension"/>
|
|
||||||
<enum-type name="QScriptValue::ResolveFlag"/>
|
|
||||||
<enum-type name="QScriptValue::PropertyFlag"/>
|
|
||||||
<enum-type name="QScriptValue::SpecialValue"/>
|
|
||||||
<enum-type name="QScriptClass::QueryFlag"/>
|
|
||||||
<enum-type name="QScriptClass::Extension"/>
|
|
||||||
|
|
||||||
<object-type name="QScriptable"/>
|
<object-type name="QScriptable"/>
|
||||||
<object-type name="QScriptClass"/>
|
<object-type name="QScriptClass">
|
||||||
|
<enum-type name="Extension"/>
|
||||||
|
<enum-type name="QueryFlag"/>
|
||||||
|
</object-type>
|
||||||
<object-type name="QScriptClassPropertyIterator"/>
|
<object-type name="QScriptClassPropertyIterator"/>
|
||||||
<object-type name="QScriptContext"/>
|
<object-type name="QScriptContext">
|
||||||
<value-type name="QScriptContextInfo"/>
|
<enum-type name="Error"/>
|
||||||
<object-type name="QScriptEngineAgent"/>
|
<enum-type name="ExecutionState"/>
|
||||||
<object-type name="QScriptEngine"/>
|
</object-type>
|
||||||
|
<value-type name="QScriptContextInfo">
|
||||||
|
<enum-type name="FunctionType"/>
|
||||||
|
</value-type>
|
||||||
|
<object-type name="QScriptEngineAgent">
|
||||||
|
<enum-type name="Extension"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QScriptEngine">
|
||||||
|
<enum-type name="QObjectWrapOption" flags="QObjectWrapOptions"/>
|
||||||
|
<enum-type name="ValueOwnership"/>
|
||||||
|
<!-- Not supported BUG #957-->
|
||||||
|
<modify-function signature="scriptValueFromQMetaObject()" remove="all" />
|
||||||
|
</object-type>
|
||||||
<object-type name="QScriptExtensionInterface"/>
|
<object-type name="QScriptExtensionInterface"/>
|
||||||
<object-type name="QScriptExtensionPlugin"/>
|
<object-type name="QScriptExtensionPlugin"/>
|
||||||
<object-type name="QScriptProgram"/>
|
<value-type name="QScriptProgram" since="4.7"/>
|
||||||
<value-type name="QScriptString"/>
|
<value-type name="QScriptString">
|
||||||
<value-type name="QScriptValue"/>
|
<modify-function signature="toArrayIndex(bool*)const">
|
||||||
<object-type name="QScriptValueIterator"/>
|
<modify-argument index="1">
|
||||||
|
<remove-argument/>
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
<insert-template name="fix_bool*"/>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
</value-type>
|
||||||
|
<value-type name="QScriptValue">
|
||||||
|
<enum-type name="PropertyFlag" flags="PropertyFlags"/>
|
||||||
|
<enum-type name="ResolveFlag" flags="ResolveFlags"/>
|
||||||
|
<enum-type name="SpecialValue"/>
|
||||||
|
<add-function signature="__repr__" return-type="PyObject*">
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
if (%CPPSELF.isVariant() || %CPPSELF.isString()) {
|
||||||
|
QString format = QString().sprintf("%s(\"%s\")", ((PyObject*)%PYSELF)->ob_type->tp_name, qPrintable(%CPPSELF.toString()));
|
||||||
|
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
|
||||||
|
} else {
|
||||||
|
%PYARG_0 = Shiboken::String::fromCString(
|
||||||
|
((PyObject* )%PYSELF)->ob_type->tp_name);
|
||||||
|
}
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__mgetitem__">
|
||||||
|
<inject-code>
|
||||||
|
Shiboken::AutoDecRef key(PyObject_Str(_key));
|
||||||
|
QVariant res = %CPPSELF.property(Shiboken::String::toCString(key.object())).toVariant();
|
||||||
|
if (res.isValid()) {
|
||||||
|
return %CONVERTTOPYTHON[QVariant](res);
|
||||||
|
} else {
|
||||||
|
PyObject* errorType = PyInt_Check(_key) ? PyExc_IndexError : PyExc_KeyError;
|
||||||
|
PyErr_SetString(errorType, "Key not found.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__iter__()" return-type="PyObject*">
|
||||||
|
<inject-code>
|
||||||
|
%PYARG_0 = Shiboken::createWrapper(new QScriptValueIterator(*%CPPSELF), true, true);
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
</value-type>
|
||||||
|
<object-type name="QScriptValueIterator">
|
||||||
|
<add-function signature="__iter__()" return-type="PyObject*">
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="__iter__" />
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__next__()" return-type="PyObject*">
|
||||||
|
<inject-code>
|
||||||
|
if (%CPPSELF.hasNext()) {
|
||||||
|
%CPPSELF.next();
|
||||||
|
QString name = %CPPSELF.name();
|
||||||
|
QVariant value = %CPPSELF.value().toVariant();
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[QString](name));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QVariant](value));
|
||||||
|
} else {
|
||||||
|
PyErr_SetNone(PyExc_StopIteration);
|
||||||
|
}
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
</object-type>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,14 @@ set(QtScriptTools_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/qscriptenginedebugger_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/qscriptenginedebugger_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(scripttools QtScriptTools_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtScript_SOURCE_DIR}:${QtScriptTools_SOURCE_DIR}")
|
set(QtScriptTools_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtScript_SOURCE_DIR}${PATH_SEP}${QtScriptTools_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtScriptTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_GUI_INCLUDE_DIR}
|
${QT_GUI_INCLUDE_DIR}
|
||||||
${QT_QTSCRIPT_INCLUDE_DIR}
|
${QT_QTSCRIPT_INCLUDE_DIR}
|
||||||
${QT_QTSCRIPTTOOLS_INCLUDE_DIR}
|
${QT_QTSCRIPTTOOLS_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
|
|
@ -20,21 +20,18 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QtScript_BINARY_DIR}/PySide/QtScript/
|
${QtScript_BINARY_DIR}/PySide/QtScript/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools)
|
||||||
|
|
||||||
add_library(QtScriptTools MODULE ${QtScriptTools_SRC})
|
set(QtScriptTools_libraries pyside
|
||||||
set_target_properties(QtScriptTools PROPERTIES PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(QtScriptTools
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_GUI_LIBRARY}
|
${QT_GUI_LIBRARY}
|
||||||
${QT_QTSCRIPT_LIBRARY}
|
${QT_QTSCRIPT_LIBRARY}
|
||||||
${QT_QTSCRIPTTOOLS_LIBRARY})
|
${QT_QTSCRIPTTOOLS_LIBRARY})
|
||||||
|
set(QtScriptTools_deps QtCore QtScript QtGui)
|
||||||
|
|
||||||
add_dependencies(QtScriptTools QtCore QtScript QtGui)
|
create_pyside_module(QtScriptTools
|
||||||
|
QtScriptTools_include_dirs
|
||||||
# install
|
QtScriptTools_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtScriptTools${CMAKE_DEBUG_POSTFIX}.so
|
QtScriptTools_deps
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtScriptTools_typesystem_path
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/pyside_qtscripttools_python.h
|
QtScriptTools_SRC
|
||||||
DESTINATION include/PySide/QtScriptTools/)
|
"")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,31 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtScriptTools">
|
<typesystem package="PySide.QtScriptTools">
|
||||||
<load-typesystem name="typesystem_script.xml" generate="no" />
|
<load-typesystem name="typesystem_script.xml" generate="no" />
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
<!-- enums -->
|
|
||||||
<enum-type name="QScriptEngineDebugger::DebuggerAction"/>
|
|
||||||
<enum-type name="QScriptEngineDebugger::DebuggerWidget"/>
|
|
||||||
<enum-type name="QScriptEngineDebugger::DebuggerState"/>
|
|
||||||
|
|
||||||
<!-- classes -->
|
|
||||||
<object-type name="QScriptEngineDebugger">
|
<object-type name="QScriptEngineDebugger">
|
||||||
|
<enum-type name="DebuggerAction"/>
|
||||||
|
<enum-type name="DebuggerState" since="4.6"/>
|
||||||
|
<enum-type name="DebuggerWidget"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QScriptEngine" location="global"/>
|
<include file-name="QScriptEngine" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
|
|
|
||||||
|
|
@ -21,32 +21,27 @@ set(QtSql_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(sql QtSql_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtSql_SOURCE_DIR}")
|
set(QtSql_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtSql_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtSql_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_QTSQL_INCLUDE_DIR}
|
${QT_QTSQL_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/)
|
||||||
add_library(QtSql MODULE ${QtSql_SRC})
|
set(QtSql_libraries pyside
|
||||||
set_target_properties(QtSql PROPERTIES PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(QtSql
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTSQL_LIBRARY})
|
${QT_QTSQL_LIBRARY})
|
||||||
|
set(QtSql_deps QtGui)
|
||||||
add_dependencies(QtSql QtGui)
|
create_pyside_module(QtSql
|
||||||
|
QtSql_include_dirs
|
||||||
# install
|
QtSql_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtSql${CMAKE_DEBUG_POSTFIX}.so
|
QtSql_deps
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtSql_typesystem_path
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/pyside_qtsql_python.h
|
QtSql_SRC
|
||||||
DESTINATION include/PySide/QtSql/)
|
"")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtSql">
|
<typesystem package="PySide.QtSql">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
||||||
|
|
@ -7,6 +26,10 @@
|
||||||
<rejection class="QSqlDriverFactoryInterface"/>
|
<rejection class="QSqlDriverFactoryInterface"/>
|
||||||
|
|
||||||
<namespace-type name="QSql">
|
<namespace-type name="QSql">
|
||||||
|
<enum-type name="Location"/>
|
||||||
|
<enum-type name="ParamTypeFlag" flags="ParamType"/>
|
||||||
|
<enum-type name="TableType"/>
|
||||||
|
<enum-type name="NumericalPrecisionPolicy"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QtSql/qsql.h" location="global"/>
|
<include file-name="QtSql/qsql.h" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
|
|
@ -21,7 +44,6 @@
|
||||||
<include file-name="QStringList" location="global"/>
|
<include file-name="QStringList" location="global"/>
|
||||||
<include file-name="QSize" location="global"/>
|
<include file-name="QSize" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
<modify-function signature="operator=(QSqlDatabase)" remove="all"/>
|
|
||||||
<modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes" />
|
<modify-function signature="exec(QString)const" rename="exec_" allow-thread="yes" />
|
||||||
<modify-function signature="open()" allow-thread="yes" />
|
<modify-function signature="open()" allow-thread="yes" />
|
||||||
<modify-function signature="open(const QString&, const QString&)" allow-thread="yes" />
|
<modify-function signature="open(const QString&, const QString&)" allow-thread="yes" />
|
||||||
|
|
@ -36,6 +58,7 @@
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QSqlQuery">
|
<value-type name="QSqlQuery">
|
||||||
|
<enum-type name="BatchExecutionMode"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QSqlError" location="global"/>
|
<include file-name="QSqlError" location="global"/>
|
||||||
<include file-name="QSqlRecord" location="global"/>
|
<include file-name="QSqlRecord" location="global"/>
|
||||||
|
|
@ -44,7 +67,6 @@
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
|
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
|
||||||
<modify-function signature="exec(const QString &)" rename="exec_" allow-thread="yes" />
|
<modify-function signature="exec(const QString &)" rename="exec_" allow-thread="yes" />
|
||||||
<modify-function signature="operator=(QSqlQuery)" remove="all"/>
|
|
||||||
<modify-function signature="prepare(const QString&)" allow-thread="yes" />
|
<modify-function signature="prepare(const QString&)" allow-thread="yes" />
|
||||||
<modify-function signature="clear()" allow-thread="yes" />
|
<modify-function signature="clear()" allow-thread="yes" />
|
||||||
<modify-function signature="last()" allow-thread="yes" />
|
<modify-function signature="last()" allow-thread="yes" />
|
||||||
|
|
@ -59,26 +81,26 @@
|
||||||
<include file-name="QSqlField" location="global"/>
|
<include file-name="QSqlField" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
<modify-function signature="append(QSqlField)" access="non-final"/>
|
<modify-function signature="append(QSqlField)" access="non-final"/>
|
||||||
<modify-function signature="operator=(QSqlRecord)" remove="all"/>
|
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QSqlError">
|
<value-type name="QSqlError">
|
||||||
<modify-function signature="operator=(QSqlError)" remove="all"/>
|
<enum-type name="ErrorType"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QSqlIndex">
|
<value-type name="QSqlIndex" />
|
||||||
<modify-function signature="operator=(QSqlIndex)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QSqlRelation"/>
|
<value-type name="QSqlRelation"/>
|
||||||
|
|
||||||
<object-type name="QSqlRelationalDelegate"/>
|
<object-type name="QSqlRelationalDelegate"/>
|
||||||
|
|
||||||
<value-type name="QSqlField">
|
<value-type name="QSqlField">
|
||||||
<modify-function signature="operator=(QSqlField)" remove="all"/>
|
<enum-type name="RequiredStatus"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<object-type name="QSqlDriver">
|
<object-type name="QSqlDriver">
|
||||||
|
<enum-type name="DriverFeature"/>
|
||||||
|
<enum-type name="IdentifierType"/>
|
||||||
|
<enum-type name="StatementType"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QSqlQuery" location="global"/>
|
<include file-name="QSqlQuery" location="global"/>
|
||||||
<include file-name="QSqlError" location="global"/>
|
<include file-name="QSqlError" location="global"/>
|
||||||
|
|
@ -91,7 +113,9 @@
|
||||||
<modify-function signature="commitTransaction()" allow-thread="yes" />
|
<modify-function signature="commitTransaction()" allow-thread="yes" />
|
||||||
<modify-function signature="rollbackTransaction()" allow-thread="yes" />
|
<modify-function signature="rollbackTransaction()" allow-thread="yes" />
|
||||||
<modify-function signature="open(const QString &, const QString&, const QString&, const QString&, int, const QString&)" allow-thread="yes" />
|
<modify-function signature="open(const QString &, const QString&, const QString&, const QString&, int, const QString&)" allow-thread="yes" />
|
||||||
|
<!-- ### This is too low level for Python, and pointer would be useless for the Python programmer -->
|
||||||
<modify-function signature="handle() const" remove="all"/>
|
<modify-function signature="handle() const" remove="all"/>
|
||||||
|
<!-- ### -->
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QSqlQueryModel">
|
<object-type name="QSqlQueryModel">
|
||||||
|
|
@ -112,6 +136,8 @@
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QSqlResult">
|
<object-type name="QSqlResult">
|
||||||
|
<enum-type name="BindingSyntax"/>
|
||||||
|
<enum-type name="VirtualHookOperation"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QSqlError" location="global"/>
|
<include file-name="QSqlError" location="global"/>
|
||||||
<include file-name="QSqlQuery" location="global"/>
|
<include file-name="QSqlQuery" location="global"/>
|
||||||
|
|
@ -119,7 +145,9 @@
|
||||||
<include file-name="QStringList" location="global"/>
|
<include file-name="QStringList" location="global"/>
|
||||||
<include file-name="QSize" location="global"/>
|
<include file-name="QSize" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
|
<!-- ### This isn't part of Qt public API -->
|
||||||
<modify-function signature="virtual_hook(int,void*)" remove="all" />
|
<modify-function signature="virtual_hook(int,void*)" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
|
<modify-function signature="exec()" rename="exec_" allow-thread="yes" />
|
||||||
<modify-function signature="fetchLast()" allow-thread="yes" />
|
<modify-function signature="fetchLast()" allow-thread="yes" />
|
||||||
<modify-function signature="fetchFirst()" allow-thread="yes" />
|
<modify-function signature="fetchFirst()" allow-thread="yes" />
|
||||||
|
|
@ -129,6 +157,7 @@
|
||||||
<modify-function signature="prepare(QString)" allow-thread="yes" />
|
<modify-function signature="prepare(QString)" allow-thread="yes" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QSqlTableModel">
|
<object-type name="QSqlTableModel">
|
||||||
|
<enum-type name="EditStrategy"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QSqlIndex" location="global"/>
|
<include file-name="QSqlIndex" location="global"/>
|
||||||
<include file-name="QStringList" location="global"/>
|
<include file-name="QStringList" location="global"/>
|
||||||
|
|
@ -141,18 +170,4 @@
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<enum-type name="QSql::Location"/>
|
|
||||||
<enum-type name="QSql::ParamTypeFlag" flags="QSql::ParamType"/>
|
|
||||||
<enum-type name="QSql::TableType"/>
|
|
||||||
<enum-type name="QSql::NumericalPrecisionPolicy"/>
|
|
||||||
<enum-type name="QSqlDriver::DriverFeature"/>
|
|
||||||
<enum-type name="QSqlDriver::IdentifierType"/>
|
|
||||||
<enum-type name="QSqlDriver::StatementType"/>
|
|
||||||
<enum-type name="QSqlError::ErrorType"/>
|
|
||||||
<enum-type name="QSqlField::RequiredStatus"/>
|
|
||||||
<enum-type name="QSqlQuery::BatchExecutionMode"/>
|
|
||||||
<enum-type name="QSqlResult::BindingSyntax"/>
|
|
||||||
<enum-type name="QSqlResult::VirtualHookOperation"/>
|
|
||||||
<enum-type name="QSqlTableModel::EditStrategy"/>
|
|
||||||
|
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,15 @@
|
||||||
project(QtSvg)
|
project(QtSvg)
|
||||||
|
|
||||||
if(Q_WS_X11)
|
|
||||||
set(MODULE_NAME svg_x11)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
elseif(Q_WS_MAC)
|
|
||||||
set(MODULE_NAME svg_mac)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "OS not supported")
|
|
||||||
endif(Q_WS_X11)
|
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
|
||||||
set (QtSvg_46_SRC )
|
|
||||||
else ()
|
|
||||||
set(QtSvg_46_SRC
|
|
||||||
)
|
|
||||||
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
|
||||||
|
|
||||||
set(QtSvg_SRC
|
set(QtSvg_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qgraphicssvgitem_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qgraphicssvgitem_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvggenerator_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvggenerator_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgrenderer_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgrenderer_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgwidget_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgwidget_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qtsvg_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qtsvg_module_wrapper.cpp
|
||||||
|
|
||||||
${SPECIFIC_OS_FILES}
|
|
||||||
${QtSvg_46_SRC}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(svg QtSvg_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
set(QtSvg_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtSvg_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
|
@ -40,24 +17,19 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTSVG_INCLUDE_DIR}
|
${QT_QTSVG_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/)
|
||||||
)
|
set(QtSvg_libraries pyside
|
||||||
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
add_library(QtSvg MODULE ${QtSvg_SRC})
|
|
||||||
set_property(TARGET QtSvg PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtSvg
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTSVG_LIBRARY}
|
${QT_QTSVG_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY})
|
||||||
)
|
set(QtSvg_deps QtGui)
|
||||||
add_dependencies(QtSvg QtGui)
|
create_pyside_module(QtSvg
|
||||||
|
QtSvg_include_dirs
|
||||||
# install
|
QtSvg_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtSvg${CMAKE_DEBUG_POSTFIX}.so
|
QtSvg_deps
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtSvg_typesystem_path
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/pyside_qtsvg_python.h
|
QtSvg_SRC
|
||||||
DESTINATION include/PySide/QtSvg/)
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtSvg">
|
<typesystem package="PySide.QtSvg">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
||||||
|
|
@ -8,7 +27,7 @@
|
||||||
<object-type name="QSvgGenerator">
|
<object-type name="QSvgGenerator">
|
||||||
<modify-function signature="setOutputDevice(QIODevice*)">
|
<modify-function signature="setOutputDevice(QIODevice*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<reference-count action="add"/>
|
<reference-count action="set"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,21 @@
|
||||||
project(QtTest)
|
project(QtTest)
|
||||||
|
|
||||||
if(Q_WS_X11)
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
||||||
set(MODULE_NAME test_x11)
|
set(QtTest_46_SRC "")
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
elseif(Q_WS_MAC)
|
|
||||||
set(MODULE_NAME test_mac)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "OS not supported")
|
set(QtTest_46_SRC
|
||||||
endif(Q_WS_X11)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_pysideqtoucheventsequence_wrapper.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(QtTest_SRC
|
set(QtTest_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qttest_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qttest_module_wrapper.cpp
|
||||||
${SPECIFIC_OS_FILES}
|
${QtTest_46_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(test QtTest_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
set(QtTest_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtTest_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
|
@ -28,24 +23,20 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTTEST_INCLUDE_DIR}
|
${QT_QTTEST_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/)
|
||||||
)
|
set(QtTest_libraries pyside
|
||||||
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
add_library(QtTest MODULE ${QtTest_SRC})
|
|
||||||
set_property(TARGET QtTest PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtTest
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTTEST_LIBRARY}
|
${QT_QTTEST_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY})
|
||||||
)
|
set(QtTest_deps QtGui)
|
||||||
add_dependencies(QtTest QtGui)
|
create_pyside_module(QtTest
|
||||||
|
QtTest_include_dirs
|
||||||
# install
|
QtTest_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtTest${CMAKE_DEBUG_POSTFIX}.so
|
QtTest_deps
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtTest_typesystem_path
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/pyside_qttest_python.h
|
QtTest_SRC
|
||||||
DESTINATION include/PySide/QtTest/)
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtTest">
|
<typesystem package="PySide.QtTest">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
||||||
|
|
@ -6,6 +25,8 @@
|
||||||
<rejection class="QTest" function-name="qCompare<char*>"/>
|
<rejection class="QTest" function-name="qCompare<char*>"/>
|
||||||
<rejection class="QTest" function-name="qCompare<double>"/>
|
<rejection class="QTest" function-name="qCompare<double>"/>
|
||||||
<rejection class="QTest" function-name="qCompare<float>"/>
|
<rejection class="QTest" function-name="qCompare<float>"/>
|
||||||
|
<rejection class="QTest" function-name="qCompare<double,qreal>"/>
|
||||||
|
<rejection class="QTest" function-name="qCompare<qreal,double>"/>
|
||||||
<rejection class="QTest" function-name="qCompare"/>
|
<rejection class="QTest" function-name="qCompare"/>
|
||||||
<rejection class="QTest" function-name="qVerify"/>
|
<rejection class="QTest" function-name="qVerify"/>
|
||||||
<rejection class="QTest" function-name="qSleep"/>
|
<rejection class="QTest" function-name="qSleep"/>
|
||||||
|
|
@ -16,23 +37,64 @@
|
||||||
<rejection class="QTest" function-name="qData"/>
|
<rejection class="QTest" function-name="qData"/>
|
||||||
<rejection class="QTest" function-name="qWarn"/>
|
<rejection class="QTest" function-name="qWarn"/>
|
||||||
<rejection class="QTest" function-name="toString"/>
|
<rejection class="QTest" function-name="toString"/>
|
||||||
|
<rejection class="QTest" function-name="toString<bool>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<char>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<double>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<float>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<int>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<long>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<qint64>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<quint64>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<short>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<uint>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<ulong>"/>
|
||||||
|
<rejection class="QTest" function-name="toString<ushort>"/>
|
||||||
|
<rejection class="QTest" function-name="qt_snprintf"/>
|
||||||
|
|
||||||
<rejection class="QTest" function-name="compare_helper"/>
|
<rejection class="QTest" function-name="compare_helper"/>
|
||||||
|
<rejection class="QTest" function-name="touchEvent"/>
|
||||||
|
|
||||||
<namespace-type name="QTest">
|
<namespace-type name="QTest">
|
||||||
|
<enum-type name="AttributeIndex" since="4.6"/>
|
||||||
|
<enum-type name="KeyAction"/>
|
||||||
|
<enum-type name="LogElementType" since="4.6"/>
|
||||||
|
<enum-type name="MouseAction"/>
|
||||||
|
<enum-type name="QBenchmarkMetric" since="4.7"/>
|
||||||
|
<enum-type name="SkipMode"/>
|
||||||
|
<enum-type name="TestFailMode"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QtTest" location="global"/>
|
<include file-name="QtTest" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
<!--<modify-function signature="qCompare<char>(char">-->
|
<!--<modify-function signature="qCompare<char>(char">-->
|
||||||
</namespace-type>
|
|
||||||
|
|
||||||
<rejection class="QTouchEventSequence"/>
|
<rejection class="QTouchEventSequence"/>
|
||||||
|
<object-type name="PySideQTouchEventSequence" target-lang-name="QTouchEventSequence" since="4.6" >
|
||||||
<enum-type name="QTest::AttributeIndex"/>
|
<modify-function signature="press(int, const QPoint&, QWidget*)">
|
||||||
<enum-type name="QTest::KeyAction"/>
|
<modify-argument index="return">
|
||||||
<enum-type name="QTest::LogElementType"/>
|
<define-ownership class="target" owner="default"/>
|
||||||
<enum-type name="QTest::MouseAction"/>
|
</modify-argument>
|
||||||
<enum-type name="QTest::SkipMode"/>
|
</modify-function>
|
||||||
<enum-type name="QTest::TestFailMode"/>
|
<modify-function signature="move(int, const QPoint&, QWidget*)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="release(int, const QPoint&, QWidget*)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="stationary(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</object-type>
|
||||||
|
<modify-function signature="generateTouchEvent(QWidget*, QTouchEvent::DeviceType)" rename="touchEvent" since="4.6">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="target"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</namespace-type>
|
||||||
|
|
||||||
<rejection class="QSignalSpy"/>
|
<rejection class="QSignalSpy"/>
|
||||||
<rejection class="QTestEventList"/>
|
<rejection class="QTestEventList"/>
|
||||||
|
|
|
||||||
|
|
@ -5,35 +5,34 @@ set(QtUiTools_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/quiloader_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/quiloader_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(uitools QtUiTools_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtXml_SOURCE_DIR}:${QtUiTools_SOURCE_DIR}")
|
set(QtUiTools_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtXml_SOURCE_DIR}${PATH_SEP}${QtUiTools_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtUiTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_QTXML_INCLUDE_DIR}
|
${QT_QTXML_INCLUDE_DIR}
|
||||||
|
${QT_QTDESIGNER_INCLUDE_DIR}
|
||||||
${QT_QTUITOOLS_INCLUDE_DIR}
|
${QT_QTUITOOLS_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
|
${plugins_SOURCE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtXml_BINARY_DIR}/PySide/QtXml/
|
${QtXml_BINARY_DIR}/PySide/QtXml/
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools)
|
||||||
|
set(QtUiTools_libraries pyside
|
||||||
add_library(QtUiTools MODULE ${QtUiTools_SRC})
|
uiplugin
|
||||||
set_target_properties(QtUiTools PROPERTIES PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(QtUiTools
|
${QT_QTUITOOLS_LIBRARY}
|
||||||
pyside
|
${QT_QTDESIGNER_LIBRARY}
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY})
|
||||||
${QT_QTUITOOLS_LIBRARY})
|
set(QtUiTools_deps QtGui QtXml)
|
||||||
|
create_pyside_module(QtUiTools
|
||||||
add_dependencies(QtUiTools QtGui QtXml)
|
QtUiTools_include_dirs
|
||||||
|
QtUiTools_libraries
|
||||||
# install
|
QtUiTools_deps
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtUiTools${CMAKE_DEBUG_POSTFIX}.so
|
QtUiTools_typesystem_path
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtUiTools_SRC
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/pyside_qtuitools_python.h
|
"")
|
||||||
DESTINATION include/PySide/QtUiTools/)
|
|
||||||
|
|
||||||
|
|
|
||||||
47
PySide/QtUiTools/glue/plugins.h
Normal file
47
PySide/QtUiTools/glue/plugins.h
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the PySide project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _PLUGIN_H_
|
||||||
|
#define _PLUGIN_H_
|
||||||
|
|
||||||
|
#include <QPluginLoader>
|
||||||
|
#include "customwidgets.h"
|
||||||
|
|
||||||
|
inline void registerCustomWidget(PyObject* obj)
|
||||||
|
{
|
||||||
|
static PyCustomWidgets* plugin = 0;
|
||||||
|
|
||||||
|
if (plugin == 0) {
|
||||||
|
foreach(QObject* o, QPluginLoader::staticInstances()) {
|
||||||
|
plugin = qobject_cast<PyCustomWidgets*>(o);
|
||||||
|
if (plugin)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!plugin)
|
||||||
|
qDebug() << "Failed to load uiloader plugin.";
|
||||||
|
else
|
||||||
|
plugin->registerWidgetType(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
52
PySide/QtUiTools/glue/uitools_loadui.cpp
Normal file
52
PySide/QtUiTools/glue/uitools_loadui.cpp
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Based on code provided by:
|
||||||
|
* Antonio Valentino <antonio.valentino at tiscali.it>
|
||||||
|
* Frédéric <frederic.mantegazza at gbiloba.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <shiboken.h>
|
||||||
|
#include <QUiLoader>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
static void createChildrenNameAttributes(PyObject* root, QObject* object)
|
||||||
|
{
|
||||||
|
foreach (QObject* child, object->children()) {
|
||||||
|
const QByteArray name = child->objectName().toLocal8Bit();
|
||||||
|
|
||||||
|
if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
|
||||||
|
bool hasAttr = PyObject_HasAttrString(root, name.constData());
|
||||||
|
if (!hasAttr) {
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QObject*](child));
|
||||||
|
PyObject_SetAttrString(root, name.constData(), pyChild);
|
||||||
|
}
|
||||||
|
createChildrenNameAttributes(root, child);
|
||||||
|
}
|
||||||
|
createChildrenNameAttributes(root, child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject* QUiLoadedLoadUiFromDevice(QUiLoader* self, QIODevice* dev, QWidget* parent)
|
||||||
|
{
|
||||||
|
QWidget* wdg = self->load(dev, parent);
|
||||||
|
|
||||||
|
if (wdg) {
|
||||||
|
PyObject* pyWdg = %CONVERTTOPYTHON[QWidget*](wdg);
|
||||||
|
createChildrenNameAttributes(pyWdg, wdg);
|
||||||
|
if (parent) {
|
||||||
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyWdg);
|
||||||
|
}
|
||||||
|
return pyWdg;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!PyErr_Occurred())
|
||||||
|
PyErr_SetString(PyExc_RuntimeError, "Unable to open/read ui device");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyObject* QUiLoaderLoadUiFromFileName(QUiLoader* self, const QString& uiFile, QWidget* parent)
|
||||||
|
{
|
||||||
|
QFile fd(uiFile);
|
||||||
|
return QUiLoadedLoadUiFromDevice(self, &fd, parent);
|
||||||
|
}
|
||||||
|
|
@ -1,50 +1,126 @@
|
||||||
<typesystem package="PySide.QtUiTools">
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtUiTools">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
<load-typesystem name="typesystem_xml.xml" generate="no" />
|
<load-typesystem name="typesystem_xml.xml" generate="no" />
|
||||||
|
|
||||||
<object-type name="QUiLoader">
|
<object-type name="QUiLoader">
|
||||||
<modify-function signature="createAction(QObject *, const QString&)">
|
<extra-includes>
|
||||||
|
<include file-name="glue/plugins.h" location="local"/>
|
||||||
|
</extra-includes>
|
||||||
|
<inject-code class="native" position="beginning" file="glue/uitools_loadui.cpp"/>
|
||||||
|
<inject-code>
|
||||||
|
Q_IMPORT_PLUGIN(uiplugin);
|
||||||
|
</inject-code>
|
||||||
|
<add-function signature="registerCustomWidget(PyObject*)" return-type="void">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<rename to="customWidgetType" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-documentation format="target" mode="append">
|
||||||
|
Registers a Python created custom widget to QUiLoader, so it can be recognized when
|
||||||
|
loading a `.ui` file. The custom widget type is passed via the ``customWidgetType`` argument.
|
||||||
|
This is needed when you want to override a virtual method of some widget in the interface,
|
||||||
|
since duck punching will not work with widgets created by QUiLoader based on the contents
|
||||||
|
of the `.ui` file.
|
||||||
|
|
||||||
|
(Remember that `duck punching virtual methods is an invitation for your own demise!
|
||||||
|
<http://www.pyside.org/docs/shiboken/wordsofadvice.html#duck-punching-and-virtual-methods>`_)
|
||||||
|
|
||||||
|
Let's see an obvious example. If you want to create a new widget it's probable you'll end up
|
||||||
|
overriding :class:`~PySide.QtGui.QWidget`'s :meth:`~PySide.QtGui.QWidget.paintEvent` method.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
class Circle(QWidget):
|
||||||
|
def paintEvent(self, event):
|
||||||
|
painter = QPainter(self)
|
||||||
|
painter.setPen(self.pen)
|
||||||
|
painter.setBrush(QBrush(self.color))
|
||||||
|
painter.drawEllipse(event.rect().center(), 20, 20)
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
loader = QUiLoader()
|
||||||
|
loader.registerCustomWidget(Circle)
|
||||||
|
circle = loader.load('circle.ui')
|
||||||
|
circle.show()
|
||||||
|
|
||||||
|
# ...
|
||||||
|
</inject-documentation>
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
registerCustomWidget(%PYARG_1);
|
||||||
|
%CPPSELF.addPluginPath(""); // force reload widgets
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<modify-function signature="createAction(QObject*, const QString&)">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<parent index="1" action="add"/>
|
<parent index="1" action="add"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<modify-function signature="createActionGroup(QObject *, const QString&)">
|
<modify-function signature="createActionGroup(QObject*, const QString&)">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<parent index="1" action="add"/>
|
<parent index="1" action="add"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<modify-function signature="createLayout(const QString&,QObject *, const QString&)">
|
<modify-function signature="createLayout(const QString&, QObject*, const QString&)">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<parent index="2" action="add"/>
|
<parent index="2" action="add"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<modify-function signature="createWidget(const QString&,QWidget*, const QString&)">
|
<modify-function signature="createWidget(const QString&, QWidget*, const QString&)">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<parent index="2" action="add"/>
|
<parent index="2" action="add"/>
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<modify-function signature="load(QIODevice*, QWidget*)">
|
<modify-function signature="load(QIODevice*, QWidget*)">
|
||||||
<modify-argument index="return">
|
<modify-argument index="2">
|
||||||
<parent index="2" action="add"/>
|
<replace-default-expression with="0" />
|
||||||
|
<rename to="parentWidget" />
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="target"/>
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
|
||||||
|
%PYARG_0 = QUiLoadedLoadUiFromDevice(%CPPSELF, %1, %2);
|
||||||
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<!-- Syntax sugar -->
|
<!-- Syntax sugar -->
|
||||||
<add-function signature="load(const char*, QWidget*)" return-type="QWidget*">
|
<add-function signature="load(QString, QWidget*)" return-type="QWidget*">
|
||||||
|
<modify-argument index="2">
|
||||||
|
<replace-default-expression with="0" />
|
||||||
|
<rename to="parentWidget" />
|
||||||
|
</modify-argument>
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<parent index="2" action="add"/>
|
<define-ownership class="target" owner="target"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code>
|
<inject-code>
|
||||||
QFile f(%1);
|
// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
|
||||||
if (f.open(QIODevice::ReadOnly | QIODevice::Text))
|
%PYARG_0 = QUiLoaderLoadUiFromFileName(%CPPSELF, %1, %2);
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QWidget*](%CPPSELF.load(&f, %2));
|
|
||||||
else
|
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
|
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,5 @@
|
||||||
project(QtWebKit)
|
project(QtWebKit)
|
||||||
|
|
||||||
if(Q_WS_X11)
|
|
||||||
set(MODULE_NAME webkit_x11)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
elseif(Q_WS_MAC)
|
|
||||||
set(MODULE_NAME webkit_mac)
|
|
||||||
set(SPECIFIC_OS_FILES
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "OS not supported")
|
|
||||||
endif(Q_WS_X11)
|
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
||||||
set (QtWebKit_46_SRC )
|
set (QtWebKit_46_SRC )
|
||||||
else ()
|
else ()
|
||||||
|
|
@ -19,9 +7,11 @@ else ()
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelement_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelement_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelementcollection_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebelementcollection_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebinspector_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebinspector_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_errorpageextensionoption_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_errorpageextensionreturn_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qgraphicswebview_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qgraphicswebview_wrapper.cpp
|
||||||
)
|
)
|
||||||
endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
endif ()
|
||||||
|
|
||||||
set(QtWebKit_SRC
|
set(QtWebKit_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qtwebkit_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qtwebkit_module_wrapper.cpp
|
||||||
|
|
@ -32,6 +22,10 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistoryitem_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistory_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhistory_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhittestresult_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebhittestresult_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_choosemultiplefilesextensionoption_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_choosemultiplefilesextensionreturn_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpage_extensionreturn_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_mimetype_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_mimetype_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_plugin_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_plugin_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebpluginfactory_wrapper.cpp
|
||||||
|
|
@ -40,13 +34,11 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebsettings_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebview_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebview_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp
|
||||||
|
|
||||||
${SPECIFIC_OS_FILES}
|
|
||||||
${QtWebKit_46_SRC}
|
${QtWebKit_46_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(webkit QtWebKit_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtNetwork_SOURCE_DIR}")
|
set(QtWebKit_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(QtWebkit_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
|
@ -55,27 +47,22 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTWEBKIT_INCLUDE_DIR}
|
${QT_QTWEBKIT_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${QtNetwork_BINARY_DIR}/PySide/QtNetwork/
|
${QtNetwork_BINARY_DIR}/PySide/QtNetwork/ )
|
||||||
)
|
set(QtWebKit_libraries pyside
|
||||||
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
add_library(QtWebKit MODULE ${QtWebKit_SRC})
|
|
||||||
set_property(TARGET QtWebKit PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtWebKit
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTWEBKIT_LIBRARY}
|
${QT_QTWEBKIT_LIBRARY}
|
||||||
${QT_QTNETWORK_LIBRARY}
|
${QT_QTNETWORK_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY})
|
||||||
)
|
set(QtWebKit_deps QtGui QtNetwork)
|
||||||
add_dependencies(QtWebKit QtGui)
|
create_pyside_module(QtWebKit
|
||||||
add_dependencies(QtWebKit QtNetwork)
|
QtWebkit_include_dirs
|
||||||
|
QtWebKit_libraries
|
||||||
|
QtWebKit_deps
|
||||||
|
QtWebKit_typesystem_path
|
||||||
|
QtWebKit_SRC
|
||||||
|
"")
|
||||||
|
|
||||||
# install
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtWebKit${CMAKE_DEBUG_POSTFIX}.so
|
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/pyside_qtwebkit_python.h
|
|
||||||
DESTINATION include/PySide/QtWebKit/)
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtWebKit">
|
<typesystem package="PySide.QtWebKit">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
@ -6,60 +25,208 @@
|
||||||
|
|
||||||
<namespace-type name="WebCore"/>
|
<namespace-type name="WebCore"/>
|
||||||
|
|
||||||
<enum-type name="QWebSettings::FontFamily"/>
|
|
||||||
<enum-type name="QWebSettings::FontSize"/>
|
|
||||||
<enum-type name="QWebSettings::WebGraphic"/>
|
|
||||||
<enum-type name="QWebSettings::WebAttribute"/>
|
|
||||||
<enum-type name="QWebPage::ErrorDomain"/>
|
|
||||||
<enum-type name="QWebPage::NavigationType"/>
|
|
||||||
<enum-type name="QWebPage::WebAction"/>
|
|
||||||
<enum-type name="QWebPage::WebWindowType"/>
|
|
||||||
<enum-type name="QWebPage::FindFlag" flags="QWebPage::FindFlags"/>
|
|
||||||
<enum-type name="QWebPage::LinkDelegationPolicy"/>
|
|
||||||
<enum-type name="QWebPluginFactory::Extension"/>
|
|
||||||
|
|
||||||
<!-- Qt 4.6 -->
|
|
||||||
<enum-type name="QWebElement::StyleResolveStrategy"/>
|
|
||||||
<enum-type name="QWebFrame::RenderLayer"/>
|
|
||||||
<enum-type name="QWebPage:ErrorDomain"/>
|
|
||||||
<enum-type name="QWebPage::Extension"/>
|
|
||||||
|
|
||||||
<!-- unsuported property with type QList<MimeType> -->
|
|
||||||
<rejection class="QWebPluginFactory::Plugin" field-name="mimeTypes"/>
|
|
||||||
|
|
||||||
<object-type name="QWebView">
|
<object-type name="QWebView">
|
||||||
<modify-function signature="setPage(QWebPage*)">
|
<modify-function signature="setPage(QWebPage*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<define-ownership class="target" owner="c++"/>
|
<reference-count action="set"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
<modify-function signature="page() const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code position="end">
|
||||||
|
SbkObject* _pyReturn = reinterpret_cast<SbkObject*>(%PYARG_0);
|
||||||
|
if (!Shiboken::Object::hasParentInfo(_pyReturn))
|
||||||
|
Shiboken::Object::setParent(%PYSELF, %PYARG_0);
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
<modify-function signature="print(QPrinter*)const" rename="print_" />
|
<modify-function signature="print(QPrinter*)const" rename="print_" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QWebFrame">
|
<object-type name="QWebFrame">
|
||||||
|
<enum-type name="RenderLayer" since="4.6"/>
|
||||||
<modify-function signature="addToJavaScriptWindowObject(QString,QObject*)">
|
<modify-function signature="addToJavaScriptWindowObject(QString,QObject*)">
|
||||||
<modify-argument index="2">
|
<modify-argument index="2">
|
||||||
<parent index="this" action="add"/>
|
<parent index="this" action="add"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<!-- TODO QMultiMap isn't implemented yet -->
|
<modify-function signature="print(QPrinter*)const" rename="print_" />
|
||||||
<modify-function signature="metaData()const" remove="all" />
|
<modify-function signature="metaData()const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="PyObject" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code position="end">
|
||||||
|
<insert-template name="convertFromMultiMap">
|
||||||
|
<replace from="%MAP_NAME" to="%0"/>
|
||||||
|
<replace from="%RETURN_NAME" to="%PYARG_0"/>
|
||||||
|
<replace from="%KEY_TYPE" to="QString"/>
|
||||||
|
<replace from="%VALUE_TYPE" to="QString"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QWebSettings"/>
|
<object-type name="QWebSettings">
|
||||||
<object-type name="QWebPage"/>
|
<enum-type name="FontFamily"/>
|
||||||
|
<enum-type name="FontSize"/>
|
||||||
|
<enum-type name="WebAttribute"/>
|
||||||
|
<enum-type name="WebGraphic"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QWebPage">
|
||||||
|
<enum-type name="FindFlag" flags="FindFlags"/>
|
||||||
|
<enum-type name="LinkDelegationPolicy"/>
|
||||||
|
<enum-type name="NavigationType"/>
|
||||||
|
<enum-type name="WebAction"/>
|
||||||
|
<enum-type name="WebWindowType"/>
|
||||||
|
<!-- Qt 4.6 -->
|
||||||
|
<enum-type name="ErrorDomain" since="4.6"/>
|
||||||
|
<enum-type name="Extension"/>
|
||||||
|
<!-- Qt 4.8 -->
|
||||||
|
<enum-type name="Feature" since="4.8" revision="4800" />
|
||||||
|
<enum-type name="PermissionPolicy" since="4.8" revision="4800" />
|
||||||
|
|
||||||
|
<value-type name="ChooseMultipleFilesExtensionOption" />
|
||||||
|
<value-type name="ChooseMultipleFilesExtensionReturn" />
|
||||||
|
<value-type name="ErrorPageExtensionOption" since="4.6" />
|
||||||
|
<value-type name="ErrorPageExtensionReturn" since="4.6" />
|
||||||
|
<value-type name="ExtensionOption" />
|
||||||
|
<value-type name="ExtensionReturn" />
|
||||||
|
|
||||||
|
<modify-function signature="extension(QWebPage::Extension, const QWebPage::ExtensionOption*, QWebPage::ExtensionReturn*)">
|
||||||
|
<template name="qwebpage_extension_argument_conversion">
|
||||||
|
PyObject* %out = 0;
|
||||||
|
// Cast the parameters according to the extension type
|
||||||
|
if (extension == QWebPage::ChooseMultipleFilesExtension) {
|
||||||
|
const ChooseMultipleFilesExtension$TYPE_SUFFIX* _in = reinterpret_cast<const ChooseMultipleFilesExtension$TYPE_SUFFIX*>(%in);
|
||||||
|
%out = %CONVERTTOPYTHON[const QWebPage::ChooseMultipleFilesExtension$TYPE_SUFFIX*](_in);
|
||||||
|
#if QT_VERSION >= 0x040600
|
||||||
|
} else if (extension == QWebPage::ErrorPageExtension) {
|
||||||
|
const ErrorPageExtension$TYPE_SUFFIX* _in = reinterpret_cast<const ErrorPageExtension$TYPE_SUFFIX*>(%in);
|
||||||
|
%out = %CONVERTTOPYTHON[const QWebPage::ErrorPageExtension$TYPE_SUFFIX*](_in);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
<modify-argument index="2" invalidate-after-use="yes">
|
||||||
|
<conversion-rule class="target">
|
||||||
|
<insert-template name="qwebpage_extension_argument_conversion">
|
||||||
|
<replace from="$TYPE_SUFFIX" to="Option"/>
|
||||||
|
</insert-template>
|
||||||
|
</conversion-rule>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="3" invalidate-after-use="yes">
|
||||||
|
<conversion-rule class="target">
|
||||||
|
<insert-template name="qwebpage_extension_argument_conversion">
|
||||||
|
<replace from="$TYPE_SUFFIX" to="Return"/>
|
||||||
|
</insert-template>
|
||||||
|
</conversion-rule>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setNetworkAccessManager(QNetworkAccessManager*)">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<reference-count action="set"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="networkAccessManager()const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<reference-count action="set" variable-name="setNetworkAccessManager(QNetworkAccessManager*)1" />
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="view()const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="pluginFactory()const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="javaScriptPrompt(QWebFrame*,const QString &,const QString &,QString*)">
|
||||||
|
<modify-argument index="4">
|
||||||
|
<remove-argument />
|
||||||
|
<conversion-rule class="native">
|
||||||
|
QString _local;
|
||||||
|
QString* %4 = &_local;
|
||||||
|
</conversion-rule>
|
||||||
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="PySequence"/>
|
||||||
|
<conversion-rule class="native">
|
||||||
|
Shiboken::AutoDecRef pyRes(PySequence_GetItem(%PYARG_0, 0));
|
||||||
|
Shiboken::AutoDecRef pyStr(PySequence_GetItem(%PYARG_0, 1));
|
||||||
|
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](pyRes);
|
||||||
|
*%4 = %CONVERTTOCPP[QString](pyStr);
|
||||||
|
</conversion-rule>
|
||||||
|
<conversion-rule class="target">
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](*%4));
|
||||||
|
</conversion-rule>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<add-function signature="qt_metacall()">
|
||||||
|
<inject-code class="native">
|
||||||
|
static int _signalIndex = -1;
|
||||||
|
static QMetaMethod _m;
|
||||||
|
|
||||||
|
if (_signalIndex == -1) {
|
||||||
|
_signalIndex = QWebPage::staticMetaObject.indexOfSlot("shouldInterruptJavaScript()");
|
||||||
|
_m = QWebPage::staticMetaObject.method(_signalIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_signalIndex == id) {
|
||||||
|
Shiboken::GilState gil;
|
||||||
|
PyObject* self = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(this);
|
||||||
|
if (self) {
|
||||||
|
Shiboken::AutoDecRef _pyMethod(PyObject_GetAttrString(self, "shouldInterruptJavaScript"));
|
||||||
|
return PySide::SignalManager::callPythonMetaMethod(_m, args, _pyMethod, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
</object-type>
|
||||||
<object-type name="QWebHistory"/>
|
<object-type name="QWebHistory"/>
|
||||||
<object-type name="QWebHistoryInterface"/>
|
<object-type name="QWebHistoryInterface"/>
|
||||||
<object-type name="QWebPluginFactory"/>
|
<object-type name="QWebPluginFactory">
|
||||||
<value-type name="QWebPluginFactory::Plugin"/>
|
<enum-type name="Extension"/>
|
||||||
<value-type name="QWebPluginFactory::MimeType"/>
|
<value-type name="Plugin"/>
|
||||||
|
<value-type name="MimeType"/>
|
||||||
|
<modify-function signature="create(const QString &, const QUrl &, const QStringList &, const QStringList &) const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="native" owner="c++"/>
|
||||||
|
<define-ownership class="target" owner="target"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</object-type>
|
||||||
<value-type name="QWebDatabase"/>
|
<value-type name="QWebDatabase"/>
|
||||||
<value-type name="QWebHistoryItem"/>
|
<value-type name="QWebHistoryItem"/>
|
||||||
<value-type name="QWebHitTestResult"/>
|
<value-type name="QWebHitTestResult"/>
|
||||||
<value-type name="QWebSecurityOrigin"/>
|
<value-type name="QWebSecurityOrigin"/>
|
||||||
|
|
||||||
<!-- Qt 4.6 -->
|
<!-- Qt 4.6 -->
|
||||||
<object-type name="QGraphicsWebView"/>
|
<object-type name="QGraphicsWebView" since="4.6"/>
|
||||||
<object-type name="QWebInspector"/>
|
<object-type name="QWebInspector" since="4.6"/>
|
||||||
<value-type name="QWebElement"/>
|
<value-type name="QWebElement" since="4.6">
|
||||||
<value-type name="QWebElementCollection"/>
|
<enum-type name="StyleResolveStrategy"/>
|
||||||
|
</value-type>
|
||||||
|
<value-type name="QWebElementCollection" since="4.6">
|
||||||
|
<add-function signature="__len__">
|
||||||
|
<inject-code>
|
||||||
|
return %CPPSELF.count();
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__getitem__">
|
||||||
|
<inject-code>
|
||||||
|
if (_i < 0 || _i >= %CPPSELF.count()) {
|
||||||
|
PyErr_SetString(PyExc_IndexError, "index out of bounds");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
QWebElement element = %CPPSELF.at(_i);
|
||||||
|
return %CONVERTTOPYTHON[QWebElement](element);
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
</value-type>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
30
PySide/QtWebKit/typesystem_webkit_simulator.xml
Normal file
30
PySide/QtWebKit/typesystem_webkit_simulator.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
|
<typesystem package="PySide.QtWebKit">
|
||||||
|
<object-type name="QWebFrame">
|
||||||
|
<modify-function signature="print(QPrinter*)const" remove="all"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="QWebView">
|
||||||
|
<modify-function signature="print(QPrinter*)const" remove="all"/>
|
||||||
|
</object-type>
|
||||||
|
|
||||||
|
<load-typesystem name="typesystem_webkit.xml" generate="yes"/>
|
||||||
|
</typesystem>
|
||||||
|
|
@ -35,9 +35,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/qxmlreader_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/qxmlsimplereader_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/qxmlsimplereader_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(xml QtXml_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}")
|
set(QtXml_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
|
set(QtXml_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
|
|
@ -45,21 +44,17 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTXML_INCLUDE_DIR}
|
${QT_QTXML_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore
|
${QtCore_BINARY_DIR}/PySide/QtCore)
|
||||||
)
|
set(QtXml_libraries pyside
|
||||||
add_library(QtXml MODULE ${QtXml_SRC})
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
set_property(TARGET QtXml PROPERTY PREFIX "")
|
|
||||||
target_link_libraries(QtXml
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${SHIBOKEN_LIBRARY}
|
${SHIBOKEN_LIBRARY}
|
||||||
${QT_QTXML_LIBRARY}
|
${QT_QTXML_LIBRARY})
|
||||||
)
|
set(QtXml_deps QtCore)
|
||||||
add_dependencies(QtXml QtCore)
|
create_pyside_module(QtXml
|
||||||
|
QtXml_include_dirs
|
||||||
# install
|
QtXml_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtXml${CMAKE_DEBUG_POSTFIX}.so DESTINATION ${SITE_PACKAGE}/PySide)
|
QtXml_deps
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml/pyside_qtxml_python.h
|
QtXml_typesystem_path
|
||||||
DESTINATION include/PySide/QtXml/)
|
QtXml_SRC
|
||||||
|
"")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtXml">
|
<typesystem package="PySide.QtXml">
|
||||||
<load-typesystem name="typesystem_templates.xml" generate="no" />
|
<load-typesystem name="typesystem_templates.xml" generate="no" />
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no" />
|
<load-typesystem name="typesystem_core.xml" generate="no" />
|
||||||
|
|
@ -8,46 +27,26 @@
|
||||||
<rejection class="QXmlInputSource" field-name="EndOfData"/>
|
<rejection class="QXmlInputSource" field-name="EndOfData"/>
|
||||||
<rejection class="QXmlInputSource" field-name="EndOfDocument"/>
|
<rejection class="QXmlInputSource" field-name="EndOfDocument"/>
|
||||||
|
|
||||||
<enum-type name="QDomNode::NodeType"/>
|
<value-type name="QDomAttr" />
|
||||||
<enum-type name="QDomNode::EncodingPolicy"/>
|
<value-type name="QDomCDATASection" />
|
||||||
<enum-type name="QDomImplementation::InvalidDataPolicy"/>
|
<value-type name="QDomCharacterData" />
|
||||||
<!--
|
<value-type name="QDomComment" />
|
||||||
<enum-type name="QXmlStreamReader::Error" />
|
|
||||||
<enum-type name="QXmlStreamReader::TokenType" />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<value-type name="QDomAttr">
|
|
||||||
<modify-function signature="operator=(QDomAttr)" remove="all"/>
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomCDATASection">
|
|
||||||
<modify-function signature="operator=(QDomCDATASection)" remove="all"/>
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomCharacterData">
|
|
||||||
<modify-function signature="operator=(QDomCharacterData)" remove="all"/>
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomComment">
|
|
||||||
<modify-function signature="operator=(QDomComment)" remove="all"/>
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<template name="qdomdocument_setcontent">
|
<template name="qdomdocument_setcontent">
|
||||||
QString _errorMsg_;
|
QString _errorMsg_;
|
||||||
int _errorLine_ = 0;
|
int _errorLine_ = 0;
|
||||||
int _errorColumn_ = 0;
|
int _errorColumn_ = 0;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_errorMsg_, &_errorLine_, &_errorColumn_);
|
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_errorMsg_, &_errorLine_, &_errorColumn_);
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _errorColumn_);
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(4);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[bool](_ret_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QString](_errorMsg_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](_errorLine_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[int](_errorColumn_));
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<value-type name="QDomDocument">
|
<value-type name="QDomDocument">
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(QDomDocument)" remove="all"/>
|
|
||||||
|
|
||||||
<!-- will be replaced in inject code -->
|
<!-- will be replaced in inject code -->
|
||||||
<modify-function signature="setContent(const QByteArray&, bool, QString*, int*, int*)">
|
<modify-function signature="setContent(const QByteArray&, bool, QString*, int*, int*)">
|
||||||
<modify-argument index="3">
|
<modify-argument index="3">
|
||||||
|
|
@ -62,6 +61,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -79,6 +81,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -96,6 +101,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -113,6 +121,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -130,6 +141,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -147,6 +161,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -164,6 +181,9 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -181,80 +201,42 @@
|
||||||
<remove-argument/>
|
<remove-argument/>
|
||||||
<remove-default-expression/>
|
<remove-default-expression/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="(retval, errorMsg, errorLine, errorColumn)"/>
|
||||||
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
<insert-template name="qdomdocument_setcontent" />
|
<insert-template name="qdomdocument_setcontent" />
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QDomDocumentFragment">
|
<value-type name="QDomDocumentFragment" />
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
<value-type name="QDomDocumentType" />
|
||||||
<modify-function signature="operator=(QDomDocumentFragment)" remove="all"/>
|
<value-type name="QDomEntity" />
|
||||||
</value-type>
|
<value-type name="QDomEntityReference" />
|
||||||
|
|
||||||
<value-type name="QDomDocumentType">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(QDomDocumentType)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomEntity">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(QDomEntity)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomEntityReference">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(QDomEntityReference)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomImplementation">
|
<value-type name="QDomImplementation">
|
||||||
<modify-function signature="operator=(QDomImplementation)" remove="all"/>
|
<enum-type name="InvalidDataPolicy"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QDomNamedNodeMap">
|
<value-type name="QDomNamedNodeMap" />
|
||||||
<modify-function signature="operator=(QDomNamedNodeMap)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomNode">
|
<value-type name="QDomNode">
|
||||||
<modify-function signature="operator=(QDomNode)" remove="all"/>
|
<enum-type name="EncodingPolicy"/>
|
||||||
|
<enum-type name="NodeType"/>
|
||||||
<modify-function signature="save(QTextStream&, int)const" allow-thread="yes"/>
|
<modify-function signature="save(QTextStream&, int)const" allow-thread="yes"/>
|
||||||
<modify-function signature="save(QTextStream&, int, QDomNode::EncodingPolicy)const" allow-thread="yes"/>
|
<modify-function signature="save(QTextStream&, int, QDomNode::EncodingPolicy)const" allow-thread="yes"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QDomNodeList">
|
<value-type name="QDomNodeList" />
|
||||||
<modify-function signature="operator=(const QDomNodeList &)" remove="all"/>
|
<value-type name="QDomNotation" />
|
||||||
</value-type>
|
<value-type name="QDomProcessingInstruction" />
|
||||||
|
|
||||||
<value-type name="QDomNotation">
|
<value-type name="QDomText" />
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(QDomNotation)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomProcessingInstruction">
|
<object-type name="QXmlParseException"/>
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(QDomProcessingInstruction)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomText">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
<modify-function signature="operator=(const QDomText &)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QXmlParseException"/>
|
|
||||||
|
|
||||||
<!-- These are defined in QtCore
|
|
||||||
<value-type name="QXmlStreamAttribute"/>
|
|
||||||
<value-type name="QXmlStreamAttributes"/>
|
|
||||||
|
|
||||||
<value-type name="QXmlStreamNamespaceDeclaration"/>
|
|
||||||
<value-type name="QXmlStreamNotationDeclaration"/>
|
|
||||||
<value-type name="QXmlStreamEntityDeclaration"/>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<value-type name="QXmlAttributes"/>
|
<value-type name="QXmlAttributes"/>
|
||||||
|
|
||||||
<!-- FIXME: This needs to be changed to value-type if
|
|
||||||
QXmlNamespaceSupport is ever passed by value -->
|
|
||||||
<object-type name="QXmlNamespaceSupport"/>
|
<object-type name="QXmlNamespaceSupport"/>
|
||||||
|
|
||||||
<value-type name="QDomElement"/>
|
<value-type name="QDomElement"/>
|
||||||
|
|
@ -272,8 +254,8 @@
|
||||||
<object-type name="QXmlLexicalHandler"/>
|
<object-type name="QXmlLexicalHandler"/>
|
||||||
|
|
||||||
<template name="QXmlEntityResolver_resolveEntity_return_conversion_native">
|
<template name="QXmlEntityResolver_resolveEntity_return_conversion_native">
|
||||||
AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 0));
|
Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 0));
|
||||||
AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 1));
|
Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 1));
|
||||||
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ok_);
|
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ok_);
|
||||||
%3 = %CONVERTTOCPP[QXmlInputSource*](_py_ret_);
|
%3 = %CONVERTTOCPP[QXmlInputSource*](_py_ret_);
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -291,8 +273,12 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
||||||
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QXmlInputSource*](_qxmlinputsource_arg_));
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
@ -314,22 +300,18 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
||||||
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QXmlInputSource*](_qxmlinputsource_arg_));
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QXmlInputSource"/>
|
<object-type name="QXmlInputSource"/>
|
||||||
<object-type name="QXmlLocator"/>
|
<object-type name="QXmlLocator"/>
|
||||||
|
|
||||||
<!-- These are defined already in QtCore
|
|
||||||
<object-type name="QXmlStreamReader">
|
|
||||||
</object-type>
|
|
||||||
|
|
||||||
<object-type name="QXmlStreamWriter">
|
|
||||||
</object-type>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<object-type name="QXmlReader">
|
<object-type name="QXmlReader">
|
||||||
<modify-function signature="parse(const QXmlInputSource*)">
|
<modify-function signature="parse(const QXmlInputSource*)">
|
||||||
<modify-argument index="1" invalidate-after-use="yes"/>
|
<modify-argument index="1" invalidate-after-use="yes"/>
|
||||||
|
|
@ -432,9 +414,5 @@
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<suppress-warning text="Shadowing: QDomNode::attributes() const and QDomElement::attributes() const"/>
|
|
||||||
<suppress-warning text="Shadowing: QDomNode::nodeType() const and QDomElement::nodeType() const"/>
|
|
||||||
|
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,28 +26,25 @@ set(QtXmlPatterns_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlserializer_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/qxmlserializer_wrapper.cpp
|
||||||
${QtXmlPatterns_46_SRC}
|
${QtXmlPatterns_46_SRC}
|
||||||
)
|
)
|
||||||
|
set(QtXmlPatterns_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
execute_generator(xmlpatterns QtXmlPatterns_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}")
|
set(QtXmlPatterns_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTXMLPATTERNS_INCLUDE_DIR}
|
${QT_QTXMLPATTERNS_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns)
|
||||||
add_library(QtXmlPatterns MODULE ${QtXmlPatterns_SRC})
|
set(QtXmlPatterns_libraries pyside
|
||||||
set_target_properties(QtXmlPatterns PROPERTIES PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(QtXmlPatterns
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTXMLPATTERNS_LIBRARY})
|
${QT_QTXMLPATTERNS_LIBRARY})
|
||||||
add_dependencies(QtXmlPatterns QtCore)
|
set(QtXmlPatterns_deps QtCore)
|
||||||
# install
|
create_pyside_module(QtXmlPatterns
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtXmlPatterns${CMAKE_DEBUG_POSTFIX}.so
|
QtXmlPatterns_include_dirs
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
QtXmlPatterns_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXmlPatterns/pyside_qtxmlpatterns_python.h
|
QtXmlPatterns_deps
|
||||||
DESTINATION include/PySide/QtXmlPatterns/)
|
QtXmlPatterns_typesystem_path
|
||||||
|
QtXmlPatterns_SRC
|
||||||
|
"")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,51 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.QtXmlPatterns">
|
<typesystem package="PySide.QtXmlPatterns">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
||||||
|
|
||||||
<enum-type name="QAbstractXmlNodeModel::SimpleAxis" />
|
<object-type name="QXmlSchema" since="4.6" /> <!-- Qt scoped pointer does not allow declare this as value type -->
|
||||||
<enum-type name="QAbstractXmlNodeModel::NodeCopySetting" />
|
<object-type name="QXmlSchemaValidator" since="4.6">
|
||||||
<enum-type name="QXmlNodeModelIndex::NodeKind" />
|
<modify-function signature="schema() const">
|
||||||
<enum-type name="QXmlNodeModelIndex::DocumentOrder" />
|
<modify-argument index="return">
|
||||||
<enum-type name="QXmlNodeModelIndex::Axis"/>
|
<replace-type modified-type="QXmlSchema*"/>
|
||||||
<enum-type name="QXmlQuery::QueryLanguage" />
|
<define-ownership owner="target"/>
|
||||||
|
</modify-argument>
|
||||||
<value-type name="QXmlSchema"/>
|
<inject-code>
|
||||||
<object-type name="QXmlSchemaValidator"/>
|
QXmlSchema* %0 = new QXmlSchema(%CPPSELF.schema());
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[QXmlSchema*](%0);
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
</object-type>
|
||||||
<object-type name="QAbstractMessageHandler" />
|
<object-type name="QAbstractMessageHandler" />
|
||||||
<object-type name="QAbstractUriResolver" />
|
<object-type name="QAbstractUriResolver" />
|
||||||
<object-type name="QAbstractXmlNodeModel" />
|
<object-type name="QAbstractXmlNodeModel">
|
||||||
|
<enum-type name="NodeCopySetting" />
|
||||||
|
<enum-type name="SimpleAxis" />
|
||||||
|
</object-type>
|
||||||
<object-type name="QAbstractXmlReceiver" />
|
<object-type name="QAbstractXmlReceiver" />
|
||||||
<value-type name="QSourceLocation" />
|
<value-type name="QSourceLocation" />
|
||||||
<object-type name="QXmlFormatter" />
|
<object-type name="QXmlFormatter" />
|
||||||
<value-type name="QXmlItem" />
|
<value-type name="QXmlItem" />
|
||||||
<value-type name="QXmlName">
|
<value-type name="QXmlName">
|
||||||
|
<!-- ### These methods aren't part of Qt public API -->
|
||||||
<modify-function signature="QXmlName(short, short, short)" remove="all" />
|
<modify-function signature="QXmlName(short, short, short)" remove="all" />
|
||||||
<modify-function signature="setNamespaceURI(short)" remove="all" />
|
<modify-function signature="setNamespaceURI(short)" remove="all" />
|
||||||
<modify-function signature="localName()const" remove="all" />
|
<modify-function signature="localName()const" remove="all" />
|
||||||
|
|
@ -30,11 +57,19 @@
|
||||||
<modify-function signature="setPrefix(short)" remove="all" />
|
<modify-function signature="setPrefix(short)" remove="all" />
|
||||||
<modify-function signature="setLocalName(short)" remove="all" />
|
<modify-function signature="setLocalName(short)" remove="all" />
|
||||||
<modify-function signature="code()const" remove="all" />
|
<modify-function signature="code()const" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="QXmlNamePool" />
|
<value-type name="QXmlNamePool" />
|
||||||
|
|
||||||
|
<rejection class="QXmlNodeModelIndex" function-name="type" />
|
||||||
|
<rejection class="QXmlNodeModelIndex" function-name="sequencedTypedValue" />
|
||||||
|
<rejection class="QXmlNodeModelIndex" function-name="iterate" />
|
||||||
|
<!-- ### This enum isn't part of Qt public API -->
|
||||||
|
<suppress-warning text="enum 'QXmlNodeModelIndex::Axis' does not have a type entry or is not an enum"/>
|
||||||
<value-type name="QXmlNodeModelIndex">
|
<value-type name="QXmlNodeModelIndex">
|
||||||
<modify-function signature="internalPointer()const" remove="all" />
|
<enum-type name="DocumentOrder" />
|
||||||
<!-- Qt internal methods -->
|
<enum-type name="NodeKind" />
|
||||||
|
<!-- ### Qt internal methods -->
|
||||||
<modify-function signature="name()const" remove="all" />
|
<modify-function signature="name()const" remove="all" />
|
||||||
<modify-function signature="root()const" remove="all" />
|
<modify-function signature="root()const" remove="all" />
|
||||||
<modify-function signature="documentUri()const" remove="all" />
|
<modify-function signature="documentUri()const" remove="all" />
|
||||||
|
|
@ -48,13 +83,19 @@
|
||||||
<modify-function signature="stringValue()const" remove="all" />
|
<modify-function signature="stringValue()const" remove="all" />
|
||||||
<modify-function signature="is(const QXmlNodeModelIndex &)const" remove="all" />
|
<modify-function signature="is(const QXmlNodeModelIndex &)const" remove="all" />
|
||||||
<modify-function signature="reset()" remove="all" />
|
<modify-function signature="reset()" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QXmlQuery" />
|
<value-type name="QXmlQuery">
|
||||||
|
<!-- ### TODO: must evaluate if anything other than removal is needed. -->
|
||||||
|
<enum-type name="QueryLanguage" />
|
||||||
|
<modify-function signature="evaluateTo(QStringList*)const" remove="all" />
|
||||||
|
<modify-function signature="evaluateTo(QString*)const" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
|
</value-type>
|
||||||
<object-type name="QXmlResultItems" />
|
<object-type name="QXmlResultItems" />
|
||||||
<object-type name="QXmlSerializer" />
|
<object-type name="QXmlSerializer" />
|
||||||
|
|
||||||
|
<suppress-warning text="class 'QAbstractXmlNodeModel' inherits from unknown base class 'QSharedData'"/>
|
||||||
<suppress-warning text="unhandled enum value: ForwardAxis in QXmlNodeModelIndex::Axis"/>
|
<suppress-warning text="class not found for setup inheritance 'QSharedData'"/>
|
||||||
<suppress-warning text="unhandled enum value: ReverseAxis in QXmlNodeModelIndex::Axis"/>
|
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
|
|
||||||
3
PySide/__init__.py.in
Normal file
3
PySide/__init__.py.in
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
|
||||||
|
__version__ = "@BINDING_API_VERSION_FULL@"
|
||||||
|
__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_RELEASE_LEVEL@", @BINDING_API_SERIAL@)
|
||||||
1226
PySide/global.h.in
1226
PySide/global.h.in
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of PySide: Python for Qt
|
* This file is part of PySide: Python for Qt
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
* Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
*
|
*
|
||||||
* Contact: PySide team <contact@pyside.org>
|
* Contact: PySide team <contact@pyside.org>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,14 @@
|
||||||
project(phonon)
|
project(phonon)
|
||||||
|
|
||||||
|
# workaround for a cmake bug under MacOSX, it finds phonon but not the include path
|
||||||
|
if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE)
|
||||||
|
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(phonon_OPTIONAL_SRC )
|
||||||
|
set(phonon_DROPPED_ENTRIES )
|
||||||
|
check_qt_class(phonon VideoCaptureDevice phonon_OPTIONAL_SRC phonon_DROPPED_ENTRIES Phonon ObjectDescription)
|
||||||
|
|
||||||
set(phonon_SRC
|
set(phonon_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractaudiooutput_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractmediastream_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_abstractmediastream_wrapper.cpp
|
||||||
|
|
@ -37,32 +46,33 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumefaderinterface_wrapper.cp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_volumeslider_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/phonon_backendcapabilities_notifierwrapper_wrapper.cpp
|
||||||
|
${phonon_OPTIONAL_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_generator(phonon phonon_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${phonon_SOURCE_DIR}")
|
set(phonon_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
${QT_PHONON_INCLUDE_DIR}
|
${QT_PHONON_INCLUDE_DIR}
|
||||||
${PYTHON_INCLUDE_PATH}
|
${SHIBOKEN_PYTHON_INCLUDE_DIR}
|
||||||
${SHIBOKEN_INCLUDE_DIR}
|
${SHIBOKEN_INCLUDE_DIR}
|
||||||
${libpyside_SOURCE_DIR}
|
${libpyside_SOURCE_DIR}
|
||||||
${QtGui_BINARY_DIR}/PySide/QtGui/
|
${QtGui_BINARY_DIR}/PySide/QtGui/
|
||||||
${QtCore_BINARY_DIR}/PySide/QtCore/
|
${QtCore_BINARY_DIR}/PySide/QtCore/
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon)
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon)
|
||||||
add_library(phonon MODULE ${phonon_SRC})
|
set(phonon_libraries pyside
|
||||||
set_target_properties(phonon PROPERTIES PREFIX "")
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
target_link_libraries(phonon
|
|
||||||
pyside
|
|
||||||
${PYTHON_LIBRARIES}
|
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
${QT_QTGUI_LIBRARY}
|
||||||
${QT_PHONON_LIBRARY})
|
${QT_PHONON_LIBRARY})
|
||||||
add_dependencies(phonon QtGui)
|
set(phonon_deps QtGui)
|
||||||
|
|
||||||
# install
|
create_pyside_module(phonon
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/phonon${CMAKE_DEBUG_POSTFIX}.so
|
phonon_include_dirs
|
||||||
DESTINATION ${SITE_PACKAGE}/PySide)
|
phonon_libraries
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/phonon/pyside_phonon_python.h
|
phonon_deps
|
||||||
DESTINATION include/PySide/phonon/)
|
phonon_typesystem_path
|
||||||
|
phonon_SRC
|
||||||
|
""
|
||||||
|
""
|
||||||
|
phonon_DROPPED_ENTRIES)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem package="PySide.phonon">
|
<typesystem package="PySide.phonon">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
|
|
@ -18,8 +37,8 @@
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="phononnamespace.h" location="global"/>
|
<include file-name="phononnamespace.h" location="global"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</namespace-type>
|
|
||||||
<namespace-type name="Phonon::BackendCapabilities" >
|
<namespace-type name="BackendCapabilities" >
|
||||||
<inject-code class="native">
|
<inject-code class="native">
|
||||||
Phonon::BackendCapabilities::NotifierWrapper* Phonon::BackendCapabilities::NotifierWrapper::m_instance = 0;
|
Phonon::BackendCapabilities::NotifierWrapper* Phonon::BackendCapabilities::NotifierWrapper::m_instance = 0;
|
||||||
Phonon::BackendCapabilities::Notifier* Phonon::BackendCapabilities::NotifierWrapper::m_notifier = 0;
|
Phonon::BackendCapabilities::Notifier* Phonon::BackendCapabilities::NotifierWrapper::m_notifier = 0;
|
||||||
|
|
@ -31,69 +50,99 @@
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[Phonon::BackendCapabilities::NotifierWrapper*](_notifierWrapper);
|
%PYARG_0 = %CONVERTTOPYTHON[Phonon::BackendCapabilities::NotifierWrapper*](_notifierWrapper);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
</namespace-type>
|
|
||||||
|
|
||||||
<!-- ### causes moc-related linker error -->
|
<!-- ### causes moc-related linker error -->
|
||||||
<!-- <object-type name="Phonon::BackendCapabilities::Notifier"/> -->
|
<!-- <object-type name="Notifier"/> -->
|
||||||
<object-type name="Phonon::BackendCapabilities::NotifierWrapper" target-lang-name="Notifier">
|
<object-type name="NotifierWrapper" target-lang-name="Notifier">
|
||||||
|
<inject-documentation format="target" mode="append">
|
||||||
|
.. class: Notifier
|
||||||
|
|
||||||
|
Notifications about backend capabilities
|
||||||
|
|
||||||
|
.. method:: capabilitiesChanged()
|
||||||
|
|
||||||
|
This signal is emitted if the capabilities have changed. This can happen if the user has requested a backend change.
|
||||||
|
|
||||||
|
.. method:: availableAudioOutputDevicesChanged()
|
||||||
|
|
||||||
|
This signal is emitted when audio capture devices were plugged or unplugged.
|
||||||
|
|
||||||
|
Check :meth:`PySide.phonon.BackendCapabilities.availableAudioOutputDevices` to get the current list of available devices.
|
||||||
|
|
||||||
|
.. method:: availableAudioCaptureDevicesChanged()
|
||||||
|
|
||||||
|
This signal is emitted when audio capture devices were plugged or unplugged.
|
||||||
|
|
||||||
|
Check :meth:`PySide.phonon.BackendCapabilities.availableAudioCaptureDevices` to get the current list of available devices.
|
||||||
|
</inject-documentation>
|
||||||
<include file-name="backendcapabilities.h" location="global"/>
|
<include file-name="backendcapabilities.h" location="global"/>
|
||||||
<include file-name="pyside_phonon.h" location="local"/>
|
<include file-name="pyside_phonon.h" location="local"/>
|
||||||
|
|
||||||
|
<!-- ### This isn't part of Qt public API -->
|
||||||
<modify-function signature="notifier()" remove="all"/>
|
<modify-function signature="notifier()" remove="all"/>
|
||||||
<modify-function signature="Phonon::BackendCapabilities::NotifierWrapper(Phonon::BackendCapabilities::Notifier*)">
|
<modify-function signature="Phonon::BackendCapabilities::NotifierWrapper(Phonon::BackendCapabilities::Notifier*)">
|
||||||
<access modifier="private"/>
|
<access modifier="private"/>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
<!-- ### -->
|
||||||
|
<inject-code class="target" position="end">
|
||||||
|
PySideSignal* signal_item;
|
||||||
|
|
||||||
|
signal_item = PySide::Signal::newObject("capabilitiesChanged", "void", NULL);
|
||||||
|
PyDict_SetItemString(Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "capabilitiesChanged", (PyObject*)signal_item);
|
||||||
|
Py_DECREF((PyObject*)signal_item);
|
||||||
|
|
||||||
|
signal_item = PySide::Signal::newObject("availableAudioOutputDevicesChanged", "void", NULL);
|
||||||
|
PyDict_SetItemString( Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "availableAudioOutputDevicesChanged", (PyObject*)signal_item);
|
||||||
|
Py_DECREF((PyObject*)signal_item);
|
||||||
|
</inject-code>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
</namespace-type>
|
||||||
|
|
||||||
<enum-type name="Phonon::Category" />
|
<enum-type name="Category" />
|
||||||
<enum-type name="Phonon::DiscType"/>
|
<enum-type name="DiscType"/>
|
||||||
<enum-type name="Phonon::ErrorType"/>
|
<enum-type name="ErrorType"/>
|
||||||
<enum-type name="Phonon::MetaData"/>
|
<enum-type name="MetaData"/>
|
||||||
<enum-type name="Phonon::ObjectDescriptionType"/>
|
<enum-type name="ObjectDescriptionType"/>
|
||||||
<enum-type name="Phonon::State"/>
|
<enum-type name="State"/>
|
||||||
|
<enum-type name="CaptureCategory"/>
|
||||||
|
|
||||||
<enum-type name="Phonon::AddonInterface::AngleCommand"/>
|
<object-type name="AbstractVideoOutput"/>
|
||||||
<enum-type name="Phonon::AddonInterface::ChapterCommand"/>
|
<object-type name="AddonInterface">
|
||||||
<enum-type name="Phonon::AddonInterface::Interface"/>
|
<enum-type name="AngleCommand"/>
|
||||||
<enum-type name="Phonon::AddonInterface::NavigationCommand"/>
|
<enum-type name="AudioChannelCommand"/>
|
||||||
<enum-type name="Phonon::AddonInterface::TitleCommand"/>
|
<enum-type name="ChapterCommand"/>
|
||||||
<enum-type name="Phonon::AddonInterface::SubtitleCommand"/>
|
<enum-type name="Interface"/>
|
||||||
<enum-type name="Phonon::AddonInterface::AudioChannelCommand"/>
|
<enum-type name="NavigationCommand"/>
|
||||||
<enum-type name="Phonon::BackendInterface::Class"/>
|
<enum-type name="SubtitleCommand"/>
|
||||||
<enum-type name="Phonon::EffectParameter::Hint" flags="Phonon::EffectParameter::Hints"/>
|
<enum-type name="TitleCommand"/>
|
||||||
<enum-type name="Phonon::MediaController::Feature" flags="Phonon::MediaController::Features"/>
|
</object-type>
|
||||||
<enum-type name="Phonon::MediaSource::Type"/>
|
<object-type name="BackendInterface">
|
||||||
<enum-type name="Phonon::VideoWidget::AspectRatio"/>
|
<enum-type name="Class"/>
|
||||||
<enum-type name="Phonon::VideoWidget::ScaleMode"/>
|
</object-type>
|
||||||
<enum-type name="Phonon::VolumeFaderEffect::FadeCurve"/>
|
<object-type name="EffectInterface"/>
|
||||||
|
<object-type name="MediaNode"/>
|
||||||
|
|
||||||
<object-type name="Phonon::AbstractVideoOutput"/>
|
<object-type name="MediaObjectInterface"/>
|
||||||
<object-type name="Phonon::AddonInterface"/>
|
<object-type name="PlatformPlugin"/>
|
||||||
<object-type name="Phonon::BackendInterface"/>
|
<object-type name="StreamInterface"/>
|
||||||
<object-type name="Phonon::EffectInterface"/>
|
<object-type name="VideoWidgetInterface"/>
|
||||||
<object-type name="Phonon::MediaNode"/>
|
<object-type name="VolumeFaderInterface"/>
|
||||||
|
|
||||||
<object-type name="Phonon::MediaObjectInterface"/>
|
<value-type name="EffectParameter">
|
||||||
<object-type name="Phonon::PlatformPlugin"/>
|
<enum-type name="Hint" flags="Hints"/>
|
||||||
<object-type name="Phonon::StreamInterface"/>
|
<!-- ### Internal methods and ctors -->
|
||||||
<object-type name="Phonon::VideoWidgetInterface"/>
|
<modify-function signature="EffectParameter()" remove="all"/>
|
||||||
<object-type name="Phonon::VolumeFaderInterface"/>
|
<modify-function signature="operator<(const Phonon::EffectParameter &)const" remove="all"/>
|
||||||
|
<modify-function signature="operator>(const Phonon::EffectParameter &)const" remove="all"/>
|
||||||
<value-type name="Phonon::EffectParameter">
|
<modify-function signature="id()const" remove="all"/>
|
||||||
<modify-function signature="EffectParameter()" remove="all"/> <!-- internal -->
|
|
||||||
<modify-function signature="operator<(const Phonon::EffectParameter &)const" remove="all"/> <!-- internal -->
|
|
||||||
<modify-function signature="operator>(const Phonon::EffectParameter &)const" remove="all"/> <!-- internal -->
|
|
||||||
<modify-function signature="id()const" remove="all"/> <!-- internal -->
|
|
||||||
<modify-function signature="operator=(Phonon::EffectParameter)" remove="all"/> <!-- Covered by copy constructor -->
|
|
||||||
<modify-function signature="EffectParameter(Phonon::EffectParameter)" remove="all"/>
|
|
||||||
<modify-function signature="operator==(Phonon::EffectParameter)const" remove="all"/>
|
<modify-function signature="operator==(Phonon::EffectParameter)const" remove="all"/>
|
||||||
|
<!-- ### -->
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="Phonon::MediaSource">
|
<value-type name="MediaSource">
|
||||||
<modify-function signature="operator=(Phonon::MediaSource)" remove="all"/> <!-- Covered by copy constructor -->
|
<enum-type name="Type"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="Phonon::Path">
|
<value-type name="Path">
|
||||||
<modify-function signature="disconnect()" rename="disconnectPath"/>
|
<modify-function signature="disconnect()" rename="disconnectPath"/>
|
||||||
<modify-function signature="operator=(Phonon::Path)" remove="all"/> <!-- Covered by copy constructor -->
|
|
||||||
<modify-function signature="insertEffect(Phonon::EffectDescription,Phonon::Effect*)">
|
<modify-function signature="insertEffect(Phonon::EffectDescription,Phonon::Effect*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<parent index="this" action="add"/>
|
<parent index="this" action="add"/>
|
||||||
|
|
@ -120,57 +169,122 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="Phonon::ObjectDescription" generate="no"/>
|
<value-type name="ObjectDescription" generate="no"/>
|
||||||
<value-type name="Phonon::EffectDescription">
|
<value-type name="EffectDescription">
|
||||||
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
|
<modify-function signature="operator==(Phonon::ObjectDescription)const">
|
||||||
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
|
<modify-argument index="1">
|
||||||
<modify-function signature="fromIndex(int)" remove="all"/>
|
<replace-type modified-type="Phonon::EffectDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::EffectDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="fromIndex(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="EffectDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="Phonon::AudioOutputDevice">
|
<value-type name="AudioOutputDevice">
|
||||||
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
|
<modify-function signature="operator==(Phonon::ObjectDescription)const">
|
||||||
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
|
<modify-argument index="1">
|
||||||
<modify-function signature="fromIndex(int)" remove="all"/>
|
<replace-type modified-type="Phonon::AudioOutputDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::AudioOutputDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="fromIndex(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="AudioOutputDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
<value-type name="AudioCaptureDevice">
|
||||||
|
<modify-function signature="operator==(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::AudioCaptureDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::AudioCaptureDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="fromIndex(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="AudioCaptureDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</value-type>
|
||||||
|
<value-type name="AudioChannelDescription">
|
||||||
|
<modify-function signature="operator==(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::AudioChannelDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::AudioChannelDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="fromIndex(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="AudioChannelDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</value-type>
|
||||||
|
<value-type name="SubtitleDescription">
|
||||||
|
<modify-function signature="operator==(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::SubtitleDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::SubtitleDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="fromIndex(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="SubtitleDescription"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</value-type>
|
||||||
|
<object-type name="ObjectDescriptionModel" generate="no"/>
|
||||||
|
<object-type name="EffectDescriptionModel" />
|
||||||
|
<object-type name="AudioOutputDeviceModel" />
|
||||||
|
|
||||||
<value-type name="Phonon::AudioCaptureDevice">
|
<object-type name="AbstractAudioOutput"/>
|
||||||
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
|
<object-type name="AbstractMediaStream"/>
|
||||||
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
|
<object-type name="AudioOutput"/>
|
||||||
<modify-function signature="fromIndex(int)" remove="all"/>
|
<object-type name="Effect"/>
|
||||||
</value-type>
|
<object-type name="EffectWidget"/>
|
||||||
<value-type name="Phonon::AudioChannelDescription">
|
<object-type name="MediaController">
|
||||||
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
|
<enum-type name="Feature" flags="Features"/>
|
||||||
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
|
<enum-type name="NavigationMenu"/>
|
||||||
<modify-function signature="fromIndex(int)" remove="all"/>
|
</object-type>
|
||||||
</value-type>
|
<object-type name="MediaObject" />
|
||||||
<value-type name="Phonon::SubtitleDescription">
|
<object-type name="SeekSlider">
|
||||||
<modify-function signature="operator==(Phonon::ObjectDescription)const" remove="all"/>
|
|
||||||
<modify-function signature="operator!=(Phonon::ObjectDescription)const" remove="all"/>
|
|
||||||
<modify-function signature="fromIndex(int)" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
|
|
||||||
<object-type name="Phonon::ObjectDescriptionModel" generate="no"/>
|
|
||||||
<object-type name="Phonon::EffectDescriptionModel" />
|
|
||||||
<object-type name="Phonon::AudioOutputDeviceModel" />
|
|
||||||
|
|
||||||
<object-type name="Phonon::AbstractAudioOutput"/>
|
|
||||||
<object-type name="Phonon::AbstractMediaStream"/>
|
|
||||||
<object-type name="Phonon::AudioOutput"/>
|
|
||||||
<object-type name="Phonon::Effect"/>
|
|
||||||
<object-type name="Phonon::EffectWidget"/>
|
|
||||||
<object-type name="Phonon::MediaController"/>
|
|
||||||
<object-type name="Phonon::MediaObject" />
|
|
||||||
<object-type name="Phonon::SeekSlider">
|
|
||||||
<modify-function signature="setMediaObject(Phonon::MediaObject*)">
|
<modify-function signature="setMediaObject(Phonon::MediaObject*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<parent index="this" action="add"/>
|
<parent index="this" action="add"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="Phonon::VideoPlayer"/>
|
<object-type name="VideoPlayer"/>
|
||||||
<object-type name="Phonon::VideoWidget"/>
|
<object-type name="VideoWidget">
|
||||||
<object-type name="Phonon::VolumeFaderEffect"/>
|
<enum-type name="AspectRatio"/>
|
||||||
<object-type name="Phonon::VolumeSlider">
|
<enum-type name="ScaleMode"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="VolumeFaderEffect">
|
||||||
|
<enum-type name="FadeCurve"/>
|
||||||
|
</object-type>
|
||||||
|
<object-type name="VolumeSlider">
|
||||||
<modify-function signature="setAudioOutput(Phonon::AudioOutput*)">
|
<modify-function signature="setAudioOutput(Phonon::AudioOutput*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<parent index="this" action="add"/>
|
<parent index="this" action="add"/>
|
||||||
|
|
@ -178,4 +292,24 @@
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
|
<!-- ### The following entries may be present in the system or not. Keep this section organized. -->
|
||||||
|
<value-type name="VideoCaptureDevice">
|
||||||
|
<modify-function signature="operator==(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::VideoCaptureDevice" />
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="operator!=(Phonon::ObjectDescription)const">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<replace-type modified-type="Phonon::VideoCaptureDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<modify-function signature="fromIndex(int)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="VideoCaptureDevice"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
</value-type>
|
||||||
|
<!-- ### -->
|
||||||
|
</namespace-type>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
147
PySide/pysideqtesttouch.h
Normal file
147
PySide/pysideqtesttouch.h
Normal file
|
|
@ -0,0 +1,147 @@
|
||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
** All rights reserved.
|
||||||
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||||
|
**
|
||||||
|
** This file is part of the QtTest module of the Qt Toolkit.
|
||||||
|
**
|
||||||
|
** $QT_BEGIN_LICENSE:LGPL$
|
||||||
|
** Commercial Usage
|
||||||
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||||
|
** accordance with the Qt Commercial License Agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Nokia.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||||
|
** General Public License version 2.1 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
||||||
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||||
|
**
|
||||||
|
** In addition, as a special exception, Nokia gives you certain additional
|
||||||
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||||
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3.0 as published by the Free Software
|
||||||
|
** Foundation and appearing in the file LICENSE.GPL included in the
|
||||||
|
** packaging of this file. Please review the following information to
|
||||||
|
** ensure the GNU General Public License version 3.0 requirements will be
|
||||||
|
** met: http://www.gnu.org/copyleft/gpl.html.
|
||||||
|
**
|
||||||
|
** If you have questions regarding the use of this file, please contact
|
||||||
|
** Nokia at qt-info@nokia.com.
|
||||||
|
** $QT_END_LICENSE$
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef PYSIDEQTESTTOUCH_H
|
||||||
|
#define PYSIDEQTESTTOUCH_H
|
||||||
|
|
||||||
|
#include <QtTest/qtest_global.h>
|
||||||
|
#include <QtTest/qtestassert.h>
|
||||||
|
#include <QtTest/qtestsystem.h>
|
||||||
|
#include <QtTest/qtestspontaneevent.h>
|
||||||
|
#include <QtTest/qtesttouch.h>
|
||||||
|
|
||||||
|
#include <QtCore/qmap.h>
|
||||||
|
#include <QtGui/qevent.h>
|
||||||
|
#include <QtGui/qwidget.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
namespace QTest
|
||||||
|
{
|
||||||
|
|
||||||
|
class PySideQTouchEventSequence
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~PySideQTouchEventSequence()
|
||||||
|
{
|
||||||
|
commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideQTouchEventSequence* press(int touchId, const QPoint &pt, QWidget *widget = 0)
|
||||||
|
{
|
||||||
|
QTouchEvent::TouchPoint &p = point(touchId);
|
||||||
|
p.setScreenPos(mapToScreen(widget, pt));
|
||||||
|
p.setState(Qt::TouchPointPressed);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideQTouchEventSequence* move(int touchId, const QPoint &pt, QWidget *widget = 0)
|
||||||
|
{
|
||||||
|
QTouchEvent::TouchPoint &p = point(touchId);
|
||||||
|
p.setScreenPos(mapToScreen(widget, pt));
|
||||||
|
p.setState(Qt::TouchPointMoved);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideQTouchEventSequence* release(int touchId, const QPoint &pt, QWidget *widget = 0)
|
||||||
|
{
|
||||||
|
QTouchEvent::TouchPoint &p = point(touchId);
|
||||||
|
p.setScreenPos(mapToScreen(widget, pt));
|
||||||
|
p.setState(Qt::TouchPointReleased);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideQTouchEventSequence* stationary(int touchId)
|
||||||
|
{
|
||||||
|
QTouchEvent::TouchPoint &p = point(touchId);
|
||||||
|
p.setState(Qt::TouchPointStationary);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void commit()
|
||||||
|
{
|
||||||
|
qt_translateRawTouchEvent(targetWidget, deviceType, points.values());
|
||||||
|
targetWidget = 0;
|
||||||
|
points.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
PySideQTouchEventSequence(QWidget *widget, QTouchEvent::DeviceType aDeviceType)
|
||||||
|
: targetWidget(widget), deviceType(aDeviceType)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideQTouchEventSequence(const PySideQTouchEventSequence &v);
|
||||||
|
|
||||||
|
void operator=(const PySideQTouchEventSequence&);
|
||||||
|
|
||||||
|
QTouchEvent::TouchPoint &point(int touchId)
|
||||||
|
{
|
||||||
|
if (!points.contains(touchId))
|
||||||
|
points[touchId] = QTouchEvent::TouchPoint(touchId);
|
||||||
|
return points[touchId];
|
||||||
|
}
|
||||||
|
|
||||||
|
QPoint mapToScreen(QWidget *widget, const QPoint &pt)
|
||||||
|
{
|
||||||
|
if (widget)
|
||||||
|
return widget->mapToGlobal(pt);
|
||||||
|
return targetWidget ? targetWidget->mapToGlobal(pt) : pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMap<int, QTouchEvent::TouchPoint> points;
|
||||||
|
QWidget *targetWidget;
|
||||||
|
QTouchEvent::DeviceType deviceType;
|
||||||
|
friend PySideQTouchEventSequence* generateTouchEvent(QWidget *, QTouchEvent::DeviceType);
|
||||||
|
};
|
||||||
|
|
||||||
|
inline
|
||||||
|
PySideQTouchEventSequence* generateTouchEvent(QWidget *widget = 0,
|
||||||
|
QTouchEvent::DeviceType deviceType = QTouchEvent::TouchScreen)
|
||||||
|
{
|
||||||
|
return new PySideQTouchEventSequence(widget, deviceType);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // PYSIDEQTESTTOUCH_H
|
||||||
27
PySide/pysidewtypes.h
Normal file
27
PySide/pysidewtypes.h
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#ifndef __PYSIDEWTYPES__
|
||||||
|
#define __PYSIDEWTYPES__
|
||||||
|
|
||||||
|
typedef struct HWND__ *HWND;
|
||||||
|
typedef unsigned UINT;
|
||||||
|
typedef long LONG;
|
||||||
|
typedef unsigned long DWORD;
|
||||||
|
typedef UINT WPARAM;
|
||||||
|
typedef LONG LPARAM;
|
||||||
|
|
||||||
|
struct POINT
|
||||||
|
{
|
||||||
|
LONG x;
|
||||||
|
LONG y;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct MSG
|
||||||
|
{
|
||||||
|
HWND hwnd;
|
||||||
|
UINT message;
|
||||||
|
WPARAM wParam;
|
||||||
|
LPARAM lParam;
|
||||||
|
DWORD time;
|
||||||
|
POINT pt;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
33
PySide/qpytextobject.cpp
Normal file
33
PySide/qpytextobject.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the PySide project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "qpytextobject.h"
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class QPyTextObject
|
||||||
|
\brief Workaround to make possible use QTextObjectInterface on PySide.
|
||||||
|
\ingroup richtext-processing
|
||||||
|
Due to the technical details of how to bind C++ classes to Python, you need to use this class when you need to implement
|
||||||
|
your own QTextObjectInterface rather than create a class inheriting from QObject and QTextObjectInterface.
|
||||||
|
|
||||||
|
\sa QTextObjectInterface
|
||||||
|
*/
|
||||||
40
PySide/qpytextobject.h
Normal file
40
PySide/qpytextobject.h
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the PySide project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef QPYTEXTOBJECT
|
||||||
|
#define QPYTEXTOBJECT
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QTextObjectInterface>
|
||||||
|
|
||||||
|
class QPyTextObject : public QObject, public QTextObjectInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_INTERFACES(QTextObjectInterface)
|
||||||
|
public:
|
||||||
|
QPyTextObject(QObject* parent = 0) : QObject(parent) {}
|
||||||
|
void drawObject(QPainter* painter, const QRectF& rect, QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0;
|
||||||
|
QSizeF intrinsicSize(QTextDocument* doc, int posInDocument, const QTextFormat& format ) = 0;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,50 +1,109 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
This file is part of PySide project.
|
||||||
|
Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
Contact: PySide team <contact@pyside.org>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
-->
|
||||||
<typesystem>
|
<typesystem>
|
||||||
|
<template name="replace_child">
|
||||||
|
$CHILD_TYPE* oldChild = %CPPSELF.$FUNCTION_GET_OLD();
|
||||||
|
if (oldChild && (oldChild != $CPPARG)) {
|
||||||
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[$CHILD_TYPE*](oldChild));
|
||||||
|
Shiboken::Object::setParent(0, pyChild);
|
||||||
|
Shiboken::Object::releaseOwnership(pyChild);
|
||||||
|
}
|
||||||
|
Shiboken::Object::setParent(%PYSELF, $PYARG);
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- Templates to fix bool* parameters -->
|
<!-- Templates to fix bool* parameters -->
|
||||||
|
<template name="tuple_retval_ok">
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[bool](ok_));
|
||||||
|
</template>
|
||||||
<template name="fix_bool*">
|
<template name="fix_bool*">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_args,bool*">
|
<template name="fix_args,bool*">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &ok_);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &ok_);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_arg,bool*,arg">
|
<template name="fix_arg,bool*,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, &ok_, %3);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, &ok_, %3);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_bool*,arg">
|
<template name="fix_bool*,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_bool*,arg,arg">
|
<template name="fix_bool*,arg,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2, %3);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2, %3);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_bool*,arg,arg,arg">
|
<template name="fix_bool*,arg,arg,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2, %3, %4);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2, %3, %4);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
|
</template>
|
||||||
|
<template name="fix_bool*,arg,arg,arg,arg">
|
||||||
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2, %3, %4, %5);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg">
|
<template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, %7, &ok_, %9);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, %7, &ok_, %9);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg">
|
<template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, &ok_, %8);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, &ok_, %8);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_arg,arg,arg,arg,arg,bool*,arg">
|
<template name="fix_arg,arg,arg,arg,arg,bool*,arg">
|
||||||
bool ok_;
|
bool ok_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, &ok_, %7);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, &ok_, %7);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_retval_ok"/>
|
||||||
</template>
|
</template>
|
||||||
<template name="get_slice">
|
<template name="get_slice">
|
||||||
%TYPE* sequence;
|
%TYPE* sequence;
|
||||||
|
|
@ -74,61 +133,104 @@
|
||||||
|
|
||||||
<template name="fix_args,QRectF*">
|
<template name="fix_args,QRectF*">
|
||||||
QRectF rect_;
|
QRectF rect_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
|
%PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_args,QRect*">
|
<template name="fix_args,QRect*">
|
||||||
QRect rect_;
|
QRect rect_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
|
%PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_char*">
|
<template name="fix_char*">
|
||||||
char val_;
|
char val_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&val_);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&val_);
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, val_);
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[char](val_));
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_int*,int*,int*,int*">
|
<template name="tuple_abcd_same_type">
|
||||||
int a, b, c, d;
|
%PYARG_0 = PyTuple_New(4);
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d);
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[$TYPE](a));
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[$TYPE](b));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[$TYPE](c));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[$TYPE](d));
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_qreal*,qreal*,qreal*,qreal*">
|
<template name="fix_number*,number*,number*,number*">
|
||||||
qreal a, b, c, d;
|
$TYPE a, b, c, d;
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
|
%CPPSELF->::%TYPE::%FUNCTION_NAME(&a, &b, &c, &d);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_abcd_same_type"/>
|
||||||
|
</template>
|
||||||
|
<template name="fix_number*,number*,number*,number*,args">
|
||||||
|
$TYPE a, b, c, d;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%CPPSELF->::%TYPE::%FUNCTION_NAME(&a, &b, &c, &d, %ARGUMENT_NAMES);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
<insert-template name="tuple_abcd_same_type"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_int*,int*,int*,int*,int*">
|
<template name="fix_native_return_number*,number*,number*,number*">
|
||||||
int a, b, c, d, e;
|
PyObject* _obj = %PYARG_0.object();
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e);
|
if (!PySequence_Check(_obj)
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
|
|| PySequence_Fast_GET_SIZE(_obj) != 4
|
||||||
|
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 0))
|
||||||
|
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 1))
|
||||||
|
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 2))
|
||||||
|
|| !SbkNumber_Check(PySequence_Fast_GET_ITEM(_obj, 3))) {
|
||||||
|
PyErr_SetString(PyExc_TypeError, "Sequence of 4 numbers expected");
|
||||||
|
} else {
|
||||||
|
*%1 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 0));
|
||||||
|
*%2 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 1));
|
||||||
|
*%3 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 2));
|
||||||
|
*%4 = %CONVERTTOCPP[$TYPE](PySequence_Fast_GET_ITEM(_obj, 3));
|
||||||
|
}
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*">
|
|
||||||
qreal a, b, c, d, e;
|
<template name="fix_number*,number*,number*,number*,number*">
|
||||||
|
$TYPE a, b, c, d, e;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e);
|
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e);
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(5);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[$TYPE](a));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[$TYPE](b));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[$TYPE](c));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[$TYPE](d));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 4, %CONVERTTOPYTHON[$TYPE](e));
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="read_wrapper">
|
<template name="read_wrapper">
|
||||||
char _data[%2];
|
Shiboken::AutoArrayPointer<char> _data(%2);
|
||||||
qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2);
|
qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2);
|
||||||
|
QByteArray ba;
|
||||||
if (_size > 0)
|
if (_size > 0)
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size));
|
ba = QByteArray(_data, _size);
|
||||||
else
|
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](ba);
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray());
|
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_return_args,int*">
|
|
||||||
RETURNTYPE _ret;
|
<template name="fix_args,number*,number*">
|
||||||
int _arg;
|
$TYPE a, b;
|
||||||
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_arg);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret, _arg);
|
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &a, &b);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[$TYPE](a));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[$TYPE](b));
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_virtual_method_return_value_and_bool*">
|
<template name="fix_virtual_method_return_value_and_bool*">
|
||||||
AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
|
Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
|
||||||
AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
|
Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
|
||||||
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ret_);
|
%RETURN_TYPE %out = %CONVERTTOCPP[%RETURN_TYPE](_py_ret_);
|
||||||
*%2 = %CONVERTTOCPP[bool](_py_ok_);
|
*%2 = %CONVERTTOCPP[bool](_py_ok_);
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -136,8 +238,191 @@
|
||||||
<template name="fix_arg,int*,int*">
|
<template name="fix_arg,int*,int*">
|
||||||
%RETURN_TYPE _ret;
|
%RETURN_TYPE _ret;
|
||||||
int a, b;
|
int a, b;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
_ret = %CPPSELF.%FUNCTION_NAME(%1, &a, &b);
|
_ret = %CPPSELF.%FUNCTION_NAME(%1, &a, &b);
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret, a, b);
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(3);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](_ret));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[int](a));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[int](b));
|
||||||
</template>
|
</template>
|
||||||
</typesystem>
|
|
||||||
|
|
||||||
|
<template name="return_QString">
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[QString](%1);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="return_tuple_QValidator_QString_int">
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(3);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](%1));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[%ARG2_TYPE](%2));
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="return_for_QFileDialog">
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, &%5, %6);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = PyTuple_New(2);
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_));
|
||||||
|
PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG5_TYPE](%5));
|
||||||
|
</template>
|
||||||
|
<template name="set_qapp_parent_for_orphan">
|
||||||
|
if (%PYARG_0 && (%PYARG_0 != Py_None)) {
|
||||||
|
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
||||||
|
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
||||||
|
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
<!-- templates for __repr__ -->
|
||||||
|
<template name="repr_code">
|
||||||
|
QString format = QString().sprintf("%s(%REPR_FORMAT)", ((PyObject*)%PYSELF)->ob_type->tp_name, %REPR_ARGS);
|
||||||
|
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
|
||||||
|
</template>
|
||||||
|
<template name="repr_code_matrix">
|
||||||
|
QString format= QString("%1((").arg(((PyObject*)%PYSELF)->ob_type->tp_name);
|
||||||
|
|
||||||
|
QList< %MATRIX_TYPE > cppArgs;
|
||||||
|
%MATRIX_TYPE data[%MATRIX_SIZE];
|
||||||
|
%CPPSELF.copyDataTo(data);
|
||||||
|
int matrixSize = %MATRIX_SIZE;
|
||||||
|
for(int size=0; size < matrixSize; size++) {
|
||||||
|
if (size > 0)
|
||||||
|
format += ", ";
|
||||||
|
format += QString::number(data[size]);
|
||||||
|
}
|
||||||
|
format += "))";
|
||||||
|
|
||||||
|
%PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="return_internal_pointer">
|
||||||
|
%PYARG_0 = reinterpret_cast<PyObject*>(%CPPSELF.%FUNCTION_NAME());
|
||||||
|
if (!%PYARG_0)
|
||||||
|
%PYARG_0 = Py_None;
|
||||||
|
Py_INCREF(%PYARG_0);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- templates for __reduce__ -->
|
||||||
|
<template name="reduce_code">
|
||||||
|
%PYARG_0 = Py_BuildValue("(N(%REDUCE_FORMAT))", PyObject_Type(%PYSELF), %REDUCE_ARGS);
|
||||||
|
</template>
|
||||||
|
<template name="reduce_code_matrix">
|
||||||
|
QList< %MATRIX_TYPE > cppArgs;
|
||||||
|
%MATRIX_TYPE data[%MATRIX_SIZE];
|
||||||
|
%CPPSELF.copyDataTo(data);
|
||||||
|
int matrixSize = %MATRIX_SIZE;
|
||||||
|
for(int size=0; size < matrixSize; size++)
|
||||||
|
cppArgs.append(data[size]);
|
||||||
|
|
||||||
|
PyObject *type = PyObject_Type(%PYSELF);
|
||||||
|
PyObject *args = Py_BuildValue("(N)", %CONVERTTOPYTHON[QList<%MATRIX_TYPE> ](cppArgs));
|
||||||
|
%PYARG_0 = Py_BuildValue("(NN)", type, args);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Matrix Aux functions -->
|
||||||
|
<template name="matrix_constructor">
|
||||||
|
if (PySequence_Size(%PYARG_1) == %SIZE) {
|
||||||
|
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_1, "Failed to parse sequence on %TYPE constructor."));
|
||||||
|
qreal values[%SIZE];
|
||||||
|
for(int i=0; i < %SIZE; i++) {
|
||||||
|
PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
|
||||||
|
values[i] = %CONVERTTOCPP[qreal](pv);
|
||||||
|
}
|
||||||
|
%0 = new %TYPE(values);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="matrix_data_function">
|
||||||
|
const qreal* data = %CPPSELF.constData();
|
||||||
|
PyObject *pyData = PyTuple_New(%MATRIX_SIZE);
|
||||||
|
if (data) {
|
||||||
|
for(int i=0; i < %MATRIX_SIZE; i++)
|
||||||
|
PyTuple_SET_ITEM(pyData, i, %CONVERTTOPYTHON[qreal](data[i]));
|
||||||
|
}
|
||||||
|
return pyData;
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="matrix_fill_function">
|
||||||
|
qreal value = %CONVERTTOCPP[qreal](%PYARG_1);
|
||||||
|
%CPPSELF.fill(value);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="matrix_transposed_function">
|
||||||
|
%TRANSPOSED_TYPE transp = %CPPSELF.transposed();
|
||||||
|
return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](transp);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Replace '#' for the argument number you want. -->
|
||||||
|
<template name="return_argument">
|
||||||
|
Py_INCREF(%PYARG_#);
|
||||||
|
%PYARG_0 = %PYARG_#;
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Iterator -->
|
||||||
|
<template name="__iter__">
|
||||||
|
Py_INCREF(%PYSELF);
|
||||||
|
%PYARG_0 = %PYSELF;
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="__iter_parent__">
|
||||||
|
%CPPSELF_TYPE _tmp = %CPPSELF.begin();
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](_tmp);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="__next__">
|
||||||
|
if (!%CPPSELF.atEnd()) {
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](*%CPPSELF);
|
||||||
|
++(*%CPPSELF);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="convertFromMultiMap">
|
||||||
|
%RETURN_NAME = PyDict_New();
|
||||||
|
foreach(%KEY_TYPE _key, %MAP_NAME.keys()) {
|
||||||
|
Shiboken::AutoDecRef _pyValueList(PyList_New(0));
|
||||||
|
foreach(%VALUE_TYPE _value, %MAP_NAME.values(_key)) {
|
||||||
|
Shiboken::AutoDecRef _pyValue(%CONVERTTOPYTHON[%VALUE_TYPE](_value));
|
||||||
|
PyList_Append(_pyValueList, _pyValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef _pyKey(%CONVERTTOPYTHON[%KEY_TYPE](_key));
|
||||||
|
PyDict_SetItem(%RETURN_NAME, _pyKey, _pyValueList);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="to_tuple">
|
||||||
|
%PYARG_0 = Py_BuildValue("%TT_FORMAT", %TT_ARGS);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="cpplist_to_pylist_convertion">
|
||||||
|
PyObject* %out = PyList_New((int) %in.size());
|
||||||
|
%INTYPE::const_iterator it = %in.begin();
|
||||||
|
for (int idx = 0; it != %in.end(); ++it, ++idx) {
|
||||||
|
%INTYPE_0 cppItem(*it);
|
||||||
|
PyList_SET_ITEM(%out, idx, %CONVERTTOPYTHON[%INTYPE_0](cppItem));
|
||||||
|
}
|
||||||
|
return %out;
|
||||||
|
</template>
|
||||||
|
<template name="pyseq_to_cpplist_convertion">
|
||||||
|
for (int i = 0; i < PySequence_Size(%in); i++) {
|
||||||
|
Shiboken::AutoDecRef pyItem(PySequence_GetItem(%in, i));
|
||||||
|
%OUTTYPE_0 cppItem = %CONVERTTOCPP[%OUTTYPE_0](pyItem);
|
||||||
|
%out << cppItem;
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="checkPyCapsuleOrPyCObject_func">
|
||||||
|
static bool checkPyCapsuleOrPyCObject(PyObject* pyObj)
|
||||||
|
{
|
||||||
|
#ifdef IS_PY3K
|
||||||
|
return PyCapsule_CheckExact(pyObj);
|
||||||
|
#else
|
||||||
|
return PyCObject_Check(pyObj);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</typesystem>
|
||||||
|
|
|
||||||
54
cmake/Macros/FindQt4Extra.cmake
Normal file
54
cmake/Macros/FindQt4Extra.cmake
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#
|
||||||
|
# Try to find QtMultimedia
|
||||||
|
# TODO: Remove this hack when cmake support QtMultimedia module
|
||||||
|
if (NOT QT_QTMULTIMEDIA_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
|
||||||
|
find_path(QT_QTMULTIMEDIA_INCLUDE_DIR QtMultimedia
|
||||||
|
PATHS ${QT_HEADERS_DIR}/QtMultimedia
|
||||||
|
${QT_LIBRARY_DIR}/QtMultimedia.framework/Headers
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
find_library(QT_QTMULTIMEDIA_LIBRARY QtMultimedia PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
if (QT_QTMULTIMEDIA_INCLUDE_DIR AND QT_QTMULTIMEDIA_LIBRARY)
|
||||||
|
set(QT_QTMULTIMEDIA_FOUND ON)
|
||||||
|
else()
|
||||||
|
#Replace this on documentation
|
||||||
|
set(if_QtMultimedia "<!--")
|
||||||
|
set(end_QtMultimedia "-->")
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Try to find QtMaemo5 - it has to be done before QtGui to enable some QtMaemo5 flags
|
||||||
|
# TODO: Remove this hack when cmake support QtMaemo5 module
|
||||||
|
if (NOT QT_QTMAEMO5_FOUND AND ${QTVERSION} VERSION_GREATER 4.5.9)
|
||||||
|
find_path(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
|
||||||
|
PATHS ${QT_HEADERS_DIR}/QtMaemo5
|
||||||
|
${QT_LIBRARY_DIR}/QtMaemo5.framework/Headers
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
find_library(QT_QTMAEMO5_LIBRARY QtMaemo5 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
if (QT_QTMAEMO5_INCLUDE_DIR AND QT_QTMAEMO5_LIBRARY)
|
||||||
|
set(QT_QTMAEMO5_FOUND ON)
|
||||||
|
set(Q_WS_MAEMO_5 ON)
|
||||||
|
else()
|
||||||
|
#Replace this on documentation
|
||||||
|
set(if_Maemo5 "<!--")
|
||||||
|
set(end_Maemo5 "-->")
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Try to find QtDeclarative
|
||||||
|
# TODO: Remove this hack when cmake support QtDeclarative module
|
||||||
|
if (NOT QT_QTDECLARATIVE_FOUND AND ${QTVERSION} VERSION_GREATER 4.6.0)
|
||||||
|
find_path(QT_QTDECLARATIVE_INCLUDE_DIR QtDeclarative
|
||||||
|
PATHS ${QT_HEADERS_DIR}/QtDeclarative
|
||||||
|
${QT_LIBRARY_DIR}/QtDeclarative.framework/Headers
|
||||||
|
NO_DEFAULT_PATH)
|
||||||
|
find_library(QT_QTDECLARATIVE_LIBRARY QtDeclarative PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
|
||||||
|
if (QT_QTDECLARATIVE_INCLUDE_DIR AND QT_QTDECLARATIVE_LIBRARY)
|
||||||
|
set(QT_QTDECLARATIVE_FOUND ON)
|
||||||
|
else()
|
||||||
|
#Replace this on documentation
|
||||||
|
set(if_QtDeclarative "<!--")
|
||||||
|
set(end_QtDeclarative "-->")
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
127
cmake/Macros/PySideModules.cmake
Normal file
127
cmake/Macros/PySideModules.cmake
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources module_static_sources)
|
||||||
|
string(TOLOWER ${module_name} _module)
|
||||||
|
string(REGEX REPLACE ^qt "" _module ${_module})
|
||||||
|
|
||||||
|
if(${ARGC} GREATER 7)
|
||||||
|
set (typesystem_name ${ARGV7})
|
||||||
|
else()
|
||||||
|
set (typesystem_name "")
|
||||||
|
endif()
|
||||||
|
if(${ARGC} GREATER 8)
|
||||||
|
string(REPLACE ";" "\\;" dropped_entries "${${ARGV8}}")
|
||||||
|
else()
|
||||||
|
set (dropped_entries "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT EXISTS ${typesystem_name})
|
||||||
|
set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
|
||||||
|
else()
|
||||||
|
set(typesystem_path ${typesystem_name})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT ${${module_sources}}
|
||||||
|
COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS}
|
||||||
|
${pyside_BINARY_DIR}/pyside_global.h
|
||||||
|
--include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}
|
||||||
|
--typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
|
||||||
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
|
||||||
|
${typesystem_path}
|
||||||
|
--api-version=${SUPPORTED_QT_VERSION}
|
||||||
|
--drop-type-entries="${dropped_entries}"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
COMMENT "Running generator for ${module_name}...")
|
||||||
|
|
||||||
|
include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR})
|
||||||
|
add_library(${module_name} MODULE ${${module_sources}} ${${module_static_sources}})
|
||||||
|
set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
|
||||||
|
if(WIN32)
|
||||||
|
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
|
||||||
|
set(${module_name}_suffix ".pyd")
|
||||||
|
else()
|
||||||
|
set(${module_name}_suffix ${CMAKE_SHARED_MODULE_SUFFIX})
|
||||||
|
endif()
|
||||||
|
target_link_libraries(${module_name} ${${module_libraries}})
|
||||||
|
if(${module_deps})
|
||||||
|
add_dependencies(${module_name} ${${module_deps}})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# install
|
||||||
|
install(TARGETS ${module_name} LIBRARY DESTINATION ${SITE_PACKAGE}/PySide)
|
||||||
|
string(TOLOWER ${module_name} lower_module_name)
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module_name}/pyside_${lower_module_name}_python.h
|
||||||
|
DESTINATION include/PySide${pyside_SUFFIX}/${module_name}/)
|
||||||
|
file(GLOB typesystem_files ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_*.xml ${typesystem_path})
|
||||||
|
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
#macro(check_qt_class_with_namespace module namespace class optional_source_files dropped_entries [namespace] [module])
|
||||||
|
macro(check_qt_class module class optional_source_files dropped_entries)
|
||||||
|
if (${ARGC} GREATER 4)
|
||||||
|
set (namespace ${ARGV4})
|
||||||
|
string(TOLOWER ${namespace} _namespace)
|
||||||
|
else ()
|
||||||
|
set (namespace "")
|
||||||
|
endif ()
|
||||||
|
if (${ARGC} GREATER 5)
|
||||||
|
set (include_file ${ARGV5})
|
||||||
|
else ()
|
||||||
|
set (include_file ${class})
|
||||||
|
endif ()
|
||||||
|
string(TOLOWER ${class} _class)
|
||||||
|
string(TOUPPER ${module} _module)
|
||||||
|
if (_namespace)
|
||||||
|
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
|
||||||
|
else ()
|
||||||
|
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
|
||||||
|
endif ()
|
||||||
|
if (DEFINED PYSIDE_${class})
|
||||||
|
if (PYSIDE_${class})
|
||||||
|
list(APPEND ${optional_source_files} ${_cppfile})
|
||||||
|
else()
|
||||||
|
list(APPEND ${dropped_entries} PySide.${module}.${class})
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if (NOT ${namespace} STREQUAL "" )
|
||||||
|
set (NAMESPACE_USE "using namespace ${namespace};")
|
||||||
|
else ()
|
||||||
|
set (NAMESPACE_USE "")
|
||||||
|
endif ()
|
||||||
|
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx)
|
||||||
|
file(WRITE ${SRC_FILE}
|
||||||
|
"#include <${include_file}>\n"
|
||||||
|
"${NAMESPACE_USE}\n"
|
||||||
|
"int main() { sizeof(${class}); }\n"
|
||||||
|
)
|
||||||
|
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
|
||||||
|
${SRC_FILE}
|
||||||
|
CMAKE_FLAGS
|
||||||
|
"-DLINK_LIBRARIES=${QT_${_module}_LIBRARY}"
|
||||||
|
"-DLINK_DIRECTORIES=${QT_LIBRARY_DIR}"
|
||||||
|
"-DINCLUDE_DIRECTORIES=${QT_INCLUDE_DIR};${QT_${_module}_INCLUDE_DIR}"
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCheckQtClassTest.log ${OUTPUT})
|
||||||
|
|
||||||
|
set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?")
|
||||||
|
if(Q_WORKS)
|
||||||
|
message(STATUS "Checking for ${class} in ${module} -- found")
|
||||||
|
list(APPEND ${optional_source_files} ${_cppfile})
|
||||||
|
else()
|
||||||
|
message(STATUS "Checking for ${class} in ${module} -- not found")
|
||||||
|
list(APPEND ${dropped_entries} PySide.${module}.${class})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
# Only add subdirectory if the associated Qt module is found.
|
||||||
|
macro(HAS_QT_MODULE var name)
|
||||||
|
if (NOT DISABLE_${name} AND ${var})
|
||||||
|
add_subdirectory(${name})
|
||||||
|
else()
|
||||||
|
# Used on documentation to skip modules
|
||||||
|
set("if_${name}" "<!--" PARENT_SCOPE)
|
||||||
|
set("end_${name}" "-->" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
@ -1,89 +1,60 @@
|
||||||
find_program(graphviz_exec dot)
|
project(doc)
|
||||||
|
|
||||||
if (QT_SRC_DIR)
|
set(DOC_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/qdoc3-output")
|
||||||
|
configure_file("pyside.qdocconf.in" "pyside.qdocconf" @ONLY)
|
||||||
|
|
||||||
if (NOT ${graphviz_exec} STREQUAL graphviz_exec-NOTFOUND)
|
add_custom_target(qdoc3
|
||||||
|
COMMAND qdoc3 pyside.qdocconf
|
||||||
|
COMMENT "Running qdoc3 against Qt source code..."
|
||||||
|
SOURCE "pyside.qdocconf")
|
||||||
|
|
||||||
|
|
||||||
|
find_program(SPHINX_BUILD NAMES sphinx-build)
|
||||||
|
if (${SPHINX_BUILD} MATCHES "SPHINX_BUILD-NOTFOUND")
|
||||||
|
message(FATAL_ERROR "sphinx-build command not found.")
|
||||||
|
endif()
|
||||||
add_custom_target(apidoc
|
add_custom_target(apidoc
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst
|
||||||
COMMAND sphinx-build -b html ${CMAKE_CURRENT_BINARY_DIR}/rst htmldocs
|
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b html ${CMAKE_CURRENT_BINARY_DIR}/rst html
|
||||||
)
|
)
|
||||||
|
|
||||||
# create conf.py based on conf.py.in
|
# create conf.py based on conf.py.in
|
||||||
configure_file("conf.py.in" "rst/conf.py" @ONLY)
|
configure_file("conf.py.in" "rst/conf.py" @ONLY)
|
||||||
|
configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY)
|
||||||
|
|
||||||
# copy pyside.qdocconf to qt source dir.
|
add_custom_target("docrsts"
|
||||||
configure_file("pyside.qdocconf" "${QT_SRC_DIR}/tools/qdoc3/test/pyside.qdocconf" @ONLY)
|
COMMAND ${SHIBOKEN_BINARY} --generator-set=qtdoc
|
||||||
set(DOC_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/qt4xmldoc")
|
${pyside_BINARY_DIR}/pyside_global.h
|
||||||
set(ENV{QTDIR} ${QT_SRC_DIR} )
|
--include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}"
|
||||||
|
--api-version=${SUPPORTED_QT_VERSION}
|
||||||
add_custom_target(qdoc3
|
--typesystem-paths="${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}${PATH_SEP}${QtHelp_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}${PATH_SEP}${QtMultimedia_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtOpenGL_SOURCE_DIR}${PATH_SEP}${QtScript_SOURCE_DIR}${PATH_SEP}${QtScriptTools_SOURCE_DIR}${PATH_SEP}${QtSql_SOURCE_DIR}${PATH_SEP}${QtSvg_SOURCE_DIR}${PATH_SEP}${QtTest_SOURCE_DIR}${PATH_SEP}${QtUiTools_SOURCE_DIR}${PATH_SEP}${QtWebKit_SOURCE_DIR}${PATH_SEP}${QtXml_SOURCE_DIR}${PATH_SEP}${QtXmlPatterns_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}"
|
||||||
COMMAND QTDIR=${QT_SRC_DIR} qdoc3 pyside.qdocconf
|
|
||||||
WORKING_DIRECTORY "${QT_SRC_DIR}/tools/qdoc3/test"
|
|
||||||
COMMENT "Running qdoc3 against Qt source code..."
|
|
||||||
SOURCE "pyside.qdocconf")
|
|
||||||
|
|
||||||
macro(create_doc module typesystem_path)
|
|
||||||
string(REGEX REPLACE "^Qt" "" module_name ${module})
|
|
||||||
string(TOLOWER ${module_name} module_name)
|
|
||||||
add_custom_target("${module}-apidoc"
|
|
||||||
COMMAND ${GENERATOR} --generatorSet=qtdoc
|
|
||||||
${pyside_BINARY_DIR}/global.h
|
|
||||||
--include-paths=${QT_INCLUDE_DIR}:${QT_QTCORE_INCLUDE_DIR}
|
|
||||||
--typesystem-paths=${pyside_SOURCE_DIR}:${${module}_BINARY_DIR}:${typesystem_path}
|
|
||||||
${pyside_SOURCE_DIR}/${module}/typesystem_${module_name}.xml
|
|
||||||
--library-source-dir=${QT_SRC_DIR}
|
--library-source-dir=${QT_SRC_DIR}
|
||||||
--documentation-only
|
--documentation-only
|
||||||
--documentation-data-dir=${DOC_DATA_DIR}
|
--documentation-data-dir=${DOC_DATA_DIR}
|
||||||
--documentation-out-dir=${CMAKE_CURRENT_BINARY_DIR}/rst
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst
|
||||||
--documentation-code-snippets-dir=${CMAKE_CURRENT_SOURCE_DIR}/codesnippets
|
--documentation-code-snippets-dir=${CMAKE_CURRENT_SOURCE_DIR}/codesnippets${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}/codesnippets/examples
|
||||||
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
|
--documentation-extra-sections-dir=${CMAKE_CURRENT_SOURCE_DIR}/extras
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
|
||||||
COMMENT "Running generator to generate documentation of ${module}..."
|
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
|
||||||
|
COMMENT "Running generator to generate documentation..."
|
||||||
)
|
)
|
||||||
add_dependencies("${module}-apidoc" qdoc3)
|
add_dependencies(apidoc docrsts)
|
||||||
add_dependencies(apidoc "${module}-apidoc")
|
add_dependencies(docrsts qdoc3)
|
||||||
endmacro(create_doc module)
|
|
||||||
|
|
||||||
create_doc(QtCore "")
|
# #create devhelp file
|
||||||
create_doc(QtGui "${QtCore_SOURCE_DIR}")
|
# add_custom_target(apidevhelp
|
||||||
create_doc(QtHelp "${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtHelp_SOURCE_DIR}")
|
# COMMAND python;${CMAKE_CURRENT_SOURCE_DIR}/pyhtml2devhelp.py;${CMAKE_BINARY_DIR}/apidoc/html;index.html >
|
||||||
create_doc(QtNetwork "${QtCore_SOURCE_DIR}")
|
# ${CMAKE_BINARY_DIR}/apidoc/html/PySide.devhelp;${BINDING_API_VERSION}&&;
|
||||||
create_doc(QtOpengl "${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtOpenGL_SOURCE_DIR}")
|
# gzip;-9v;-f;${CMAKE_BINARY_DIR}/apidoc/html/PySide.devhelp
|
||||||
create_doc(QtSql "${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtSql_SOURCE_DIR}")
|
# COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/share/devhelp/books"
|
||||||
create_doc(QtSvg "${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
# COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_INSTALL_PREFIX}/share/doc/${BINDING_NAME}/html" "${CMAKE_INSTALL_PREFIX}/share/devhelp/books/${BINDING_NAME}"
|
||||||
create_doc(QtUitools "${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtXml_SOURCE_DIR}:${QtUiTools_SOURCE_DIR}")
|
# )
|
||||||
create_doc(QtXml "${QtCore_SOURCE_DIR}")
|
|
||||||
create_doc(QtWebKit "${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtNetwork_SOURCE_DIR}")
|
|
||||||
create_doc(QtMultimedia "${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
|
||||||
create_doc(QtScript "${QtCore_SOURCE_DIR}")
|
|
||||||
create_doc(QtScriptTools "${QtCore_SOURCE_DIR}:${QtScript_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
|
||||||
create_doc(QtTest "${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
|
||||||
create_doc(QtXmlPatterns "${QtCore_SOURCE_DIR}")
|
|
||||||
create_doc(phonon "${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
|
|
||||||
create_doc(QtDeclarative "${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtNetwork_SOURCE_DIR}")
|
|
||||||
|
|
||||||
#create devhelp file
|
|
||||||
add_custom_target(apidevhelp
|
|
||||||
COMMAND python;${CMAKE_CURRENT_SOURCE_DIR}/pyhtml2devhelp.py;${CMAKE_BINARY_DIR}/apidoc/html;index.html >
|
|
||||||
${CMAKE_BINARY_DIR}/apidoc/html/PySide.devhelp;${BINDING_API_VERSION}&&;
|
|
||||||
gzip;-9v;-f;${CMAKE_BINARY_DIR}/apidoc/html/PySide.devhelp
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/share/devhelp/books"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_INSTALL_PREFIX}/share/doc/${BINDING_NAME}/html" "${CMAKE_INSTALL_PREFIX}/share/devhelp/books/${BINDING_NAME}"
|
|
||||||
)
|
|
||||||
|
|
||||||
#install files
|
#install files
|
||||||
add_custom_target(apidocinstall
|
add_custom_target(apidocinstall
|
||||||
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/share/doc/${BINDING_NAME} && cp -rv ${CMAKE_BINARY_DIR}/apidoc/* ${CMAKE_INSTALL_PREFIX}/share/doc/${BINDING_NAME}
|
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION} && cp -rv ${CMAKE_CURRENT_BINARY_DIR}/html/* ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(apidocinstall apidevhelp)
|
add_dependencies(apidocinstall apidoc)
|
||||||
|
# add_dependencies(apidocinstall apidevhelp)
|
||||||
else (NOT ${graphviz_exec} STREQUAL graphviz_exec-NOTFOUND)
|
|
||||||
message(STATUS "Missing graphviz tool (dot), apidoc generation targets disabled.")
|
|
||||||
endif (NOT ${graphviz_exec} STREQUAL graphviz_exec-NOTFOUND)
|
|
||||||
|
|
||||||
else (QT_SRC_DIR)
|
|
||||||
message(STATUS "QT_SRC_DIR variable not set, apidoc generation targets disabled.")
|
|
||||||
endif (QT_SRC_DIR)
|
|
||||||
|
|
||||||
|
|
|
||||||
0
doc/_static/.gitignore
vendored
0
doc/_static/.gitignore
vendored
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue