Compare commits
581 commits
1.0.0-beta
...
master
| 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 |
914 changed files with 24348 additions and 27353 deletions
|
|
@ -5,8 +5,7 @@ project(pysidebindings)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Macros/
|
||||||
${CMAKE_MODULE_PATH})
|
${CMAKE_MODULE_PATH})
|
||||||
find_package(GeneratorRunner 0.6.4 REQUIRED)
|
find_package(Shiboken 1.1.1 REQUIRED)
|
||||||
find_package(Shiboken 1.0.0 REQUIRED)
|
|
||||||
find_package(Qt4 4.5.0 REQUIRED)
|
find_package(Qt4 4.5.0 REQUIRED)
|
||||||
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
|
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
|
||||||
include(FindQt4Extra)
|
include(FindQt4Extra)
|
||||||
|
|
@ -32,7 +31,7 @@ endif()
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
|
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
|
||||||
else()
|
else()
|
||||||
if(CMAKE_HOST_UNIX)
|
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()
|
endif()
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
|
|
@ -62,10 +61,10 @@ endif()
|
||||||
|
|
||||||
set(BINDING_NAME PySide)
|
set(BINDING_NAME PySide)
|
||||||
set(BINDING_API_MAJOR_VERSION "1")
|
set(BINDING_API_MAJOR_VERSION "1")
|
||||||
set(BINDING_API_MINOR_VERSION "0")
|
set(BINDING_API_MINOR_VERSION "1")
|
||||||
set(BINDING_API_MICRO_VERSION "0")
|
set(BINDING_API_MICRO_VERSION "1")
|
||||||
set(BINDING_API_RELEASE_LEVEL "beta") # alpha, beta, candidate, or final
|
set(BINDING_API_RELEASE_LEVEL "final") # alpha, beta, rc, or final
|
||||||
set(BINDING_API_SERIAL 4) # leave as 0 when release level is final
|
set(BINDING_API_SERIAL 1) # leave as 0 when release level is final
|
||||||
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version" FORCE)
|
set(BINDING_API_VERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}" CACHE STRING "PySide version" FORCE)
|
||||||
if (BINDING_API_RELEASE_LEVEL STREQUAL "final")
|
if (BINDING_API_RELEASE_LEVEL STREQUAL "final")
|
||||||
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
|
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
|
||||||
|
|
@ -117,11 +116,7 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Define supported Qt Version
|
# Define supported Qt Version
|
||||||
if(${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
|
set(SUPPORTED_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}")
|
||||||
set(SUPPORTED_QT_VERSION 4.7)
|
|
||||||
else()
|
|
||||||
set(SUPPORTED_QT_VERSION 4.6)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
|
set(BINDING_VERSION ${BINDING_API_VERSION}.${QT_VERSION_MAJOR}.${QT_VERSION_MINOR})
|
||||||
|
|
||||||
|
|
@ -146,7 +141,7 @@ add_custom_target(dist
|
||||||
if (NOT SITE_PACKAGE)
|
if (NOT SITE_PACKAGE)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "from distutils import sysconfig; \\
|
COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} -c "from distutils import sysconfig; \\
|
||||||
print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_PREFIX}')"
|
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)
|
||||||
|
|
@ -156,7 +151,14 @@ if (NOT SITE_PACKAGE)
|
||||||
endif()
|
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)
|
||||||
|
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)
|
if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,14 @@
|
||||||
project(pyside)
|
project(pyside)
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py" "${CMAKE_CURRENT_BINARY_DIR}/private.py"
|
|
||||||
DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
|
|
||||||
|
|
||||||
include(PySideModules)
|
include(PySideModules)
|
||||||
|
|
||||||
# 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"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/__init__.py.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/__init__.py" @ONLY)
|
||||||
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/private.py"
|
|
||||||
"${CMAKE_BINARY_DIR}/PySide/private.py")
|
|
||||||
|
|
||||||
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)
|
||||||
HAS_QT_MODULE(QT_QTNETWORK_FOUND QtNetwork)
|
HAS_QT_MODULE(QT_QTNETWORK_FOUND QtNetwork)
|
||||||
|
|
@ -21,9 +16,7 @@ HAS_QT_MODULE(QT_QTWEBKIT_FOUND QtWebKit)
|
||||||
HAS_QT_MODULE(QT_QTSVG_FOUND QtSvg)
|
HAS_QT_MODULE(QT_QTSVG_FOUND QtSvg)
|
||||||
HAS_QT_MODULE(QT_QTXML_FOUND QtXml)
|
HAS_QT_MODULE(QT_QTXML_FOUND QtXml)
|
||||||
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
|
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
|
||||||
if (GL_H)
|
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
|
||||||
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
|
|
||||||
endif()
|
|
||||||
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
|
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
|
||||||
if(QT_QTDESIGNER_FOUND)
|
if(QT_QTDESIGNER_FOUND)
|
||||||
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
|
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
|
||||||
|
|
@ -38,6 +31,10 @@ HAS_QT_MODULE(QT_PHONON_FOUND phonon)
|
||||||
HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
|
HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
|
||||||
|
|
||||||
# install
|
# 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
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
|
||||||
DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
|
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
|
||||||
|
|
@ -60,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
|
||||||
|
|
@ -135,9 +144,14 @@ ${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}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtCore_typesystem_path "")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_core.xml.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_core.xml" @ONLY)
|
||||||
|
|
||||||
|
set(QtCore_typesystem_path "${QtCore_SOURCE_DIR}")
|
||||||
|
|
||||||
set(QtCore_include_dirs ${CMAKE_CURRENT_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}
|
||||||
|
|
@ -155,4 +169,5 @@ create_pyside_module(QtCore
|
||||||
""
|
""
|
||||||
QtCore_typesystem_path
|
QtCore_typesystem_path
|
||||||
QtCore_SRC
|
QtCore_SRC
|
||||||
"")
|
QtCore_gluecode
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_core.xml)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ static Py_ssize_t SbkQByteArray_readbufferproc(PyObject* self, Py_ssize_t segmen
|
||||||
if (segment || !Shiboken::Object::isValid(self))
|
if (segment || !Shiboken::Object::isValid(self))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
QByteArray* cppSelf = Shiboken::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;
|
||||||
|
|
||||||
int Sbk_QCoreApplication_Init(PyObject* self, PyObject* args, PyObject*)
|
void QCoreApplication_constructor(PyObject* self, PyObject* args, QCoreApplicationWrapper** cptr)
|
||||||
{
|
{
|
||||||
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication >()))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
|
|
||||||
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 (!Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QCoreApplicationArgCount, &QCoreApplicationArgValues, "PySideApp")) {
|
*cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
|
||||||
PyErr_BadArgument();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
|
|
||||||
QCoreApplicationWrapper* cptr = new QCoreApplicationWrapper(QCoreApplicationArgCount, QCoreApplicationArgValues);
|
|
||||||
Shiboken::Object::setCppPointer(sbkSelf,
|
|
||||||
Shiboken::SbkType<QCoreApplication>(),
|
|
||||||
cptr);
|
|
||||||
|
|
||||||
Shiboken::Object::setValidCpp(sbkSelf, true);
|
|
||||||
Shiboken::Object::setHasCppWrapper(sbkSelf, true);
|
|
||||||
Shiboken::Object::releaseOwnership(sbkSelf);
|
|
||||||
|
|
||||||
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
|
|
||||||
PySide::Signal::updateSourceObject(self);
|
|
||||||
cptr->metaObject();
|
|
||||||
|
|
||||||
|
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
|
||||||
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
|
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
|
||||||
Py_INCREF(self);
|
Py_INCREF(self);
|
||||||
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
|
||||||
|
|
@ -8,18 +8,18 @@ static bool isDecorator(PyObject* method, PyObject* self)
|
||||||
reinterpret_cast<PyMethodObject*>(method)->im_func;
|
reinterpret_cast<PyMethodObject*>(method)->im_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
|
static bool getReceiver(QObject *source, const char* signal, PyObject* callback, QObject** receiver, PyObject** self, QByteArray* callbackSig)
|
||||||
{
|
{
|
||||||
bool forceGlobalReceiver = false;
|
bool forceGlobalReceiver = false;
|
||||||
if (PyMethod_Check(callback)) {
|
if (PyMethod_Check(callback)) {
|
||||||
*self = PyMethod_GET_SELF(callback);
|
*self = PyMethod_GET_SELF(callback);
|
||||||
if (Shiboken::Converter<QObject*>::checkType(*self))
|
if (%CHECKTYPE[QObject*](*self))
|
||||||
*receiver = Shiboken::Converter<QObject*>::toCpp(*self);
|
*receiver = %CONVERTTOCPP[QObject*](*self);
|
||||||
forceGlobalReceiver = isDecorator(callback, *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 && Shiboken::Converter<QObject*>::checkType(*self))
|
if (*self && %CHECKTYPE[QObject*](*self))
|
||||||
*receiver = Shiboken::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;
|
||||||
|
|
@ -27,9 +27,20 @@ static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
|
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;
|
||||||
|
|
@ -59,40 +70,48 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
|
||||||
return false;
|
return false;
|
||||||
signal++;
|
signal++;
|
||||||
|
|
||||||
if (!PySide::SignalManager::registerMetaMethod(source, signal, QMetaMethod::Signal))
|
int signalIndex = PySide::SignalManager::registerMetaMethodGetIndex(source, signal, QMetaMethod::Signal);
|
||||||
|
if (signalIndex == -1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int signalIndex = source->metaObject()->indexOfMethod(signal);
|
|
||||||
|
|
||||||
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::Signal::getCallbackSignature(signal, receiver, 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 && !Shiboken::Object::hasCppWrapper((SbkObject*)self)) {
|
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);
|
||||||
if (!PySide::SignalManager::registerMetaMethod(receiver, slot, QMetaMethod::Slot))
|
else
|
||||||
return false;
|
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)
|
if (usingGlobalReceiver)
|
||||||
signalManager.globalReceiverConnectNotify(source, slotIndex);
|
signalManager.notifyGlobalReceiver(receiver);
|
||||||
#ifndef AVOID_PROTECTED_HACK
|
#ifndef AVOID_PROTECTED_HACK
|
||||||
source->connectNotify(signal - 1);
|
source->connectNotify(signal - 1);
|
||||||
#else
|
#else
|
||||||
|
|
@ -103,6 +122,10 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -117,27 +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::Signal::getCallbackSignature(signal, receiver, callback, usingGlobalReceiver).toAscii();
|
int signalIndex = source->metaObject()->indexOfSignal(++signal);
|
||||||
QByteArray qtSlotName(callbackSig);
|
int slotIndex = -1;
|
||||||
qtSlotName = qtSlotName.prepend('1');
|
|
||||||
|
slotIndex = metaObject->indexOfSlot(callbackSig);
|
||||||
|
|
||||||
|
if (QMetaObject::disconnectOne(source, signalIndex, receiver, slotIndex)) {
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
if (QObject::disconnect(source, signal, receiver, qtSlotName.constData())) {
|
|
||||||
if (usingGlobalReceiver) {
|
|
||||||
int slotIndex = metaObject->indexOfSlot(callbackSig.constData());
|
|
||||||
signalManager.globalReceiverDisconnectNotify(source, slotIndex);
|
|
||||||
#ifndef AVOID_PROTECTED_HACK
|
#ifndef AVOID_PROTECTED_HACK
|
||||||
source->disconnectNotify(signal - 1);
|
source->disconnectNotify(callbackSig);
|
||||||
#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)->disconnectNotify(signal - 1);
|
reinterpret_cast<QObjectWrapper*>(source)->disconnectNotify(callbackSig);
|
||||||
#endif
|
#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,5 +0,0 @@
|
||||||
QList<QByteArray> version = QByteArray(qVersion()).split('.');
|
|
||||||
PyObject *pyQtVersion = Shiboken::makeTuple(version[0].toInt(), version[1].toInt(), version[2].toInt());
|
|
||||||
|
|
||||||
PyModule_AddStringConstant(module, "__version__", qVersion());
|
|
||||||
PyModule_AddObject(module, "__version_info__", pyQtVersion);
|
|
||||||
|
|
@ -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,35 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct Converter<QChar>
|
|
||||||
{
|
|
||||||
static bool checkType(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return PyString_Check(pyObj) && (PyString_Size(pyObj) == 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return (PyString_Check(pyObj) && (PyString_Size(pyObj) == 1))
|
|
||||||
|| pyObj == Py_None
|
|
||||||
|| PyInt_Check(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static QChar toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
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 QChar();
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* toPython(void* cppObj) { return toPython(*reinterpret_cast<QChar*>(cppObj)); }
|
|
||||||
static PyObject* toPython(const QChar& cppObj)
|
|
||||||
{
|
|
||||||
wchar_t c = (wchar_t)cppObj.unicode();
|
|
||||||
PyObject* pyObj = PyUnicode_FromWideChar(&c, 1);
|
|
||||||
return pyObj;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template <>
|
|
||||||
struct PythonConverter<QDate>
|
|
||||||
{
|
|
||||||
static bool isPythonConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
|
||||||
return pyObj && PyDate_Check(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDate* transformFromPython(PyObject* obj)
|
|
||||||
{
|
|
||||||
if (isPythonConvertible(obj)) {
|
|
||||||
int day = PyDateTime_GET_DAY(obj);
|
|
||||||
int month = PyDateTime_GET_MONTH(obj);
|
|
||||||
int year = PyDateTime_GET_YEAR(obj);
|
|
||||||
return new QDate(year, month, day);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* transformToPython(QDate* d)
|
|
||||||
{
|
|
||||||
if (d) {
|
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
|
||||||
return PyDate_FromDate(d->year(), d->month(), d->day());
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template <>
|
|
||||||
struct PythonConverter<QDateTime>
|
|
||||||
{
|
|
||||||
static bool isPythonConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
|
||||||
return pyObj && PyDateTime_Check(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static QDateTime* transformFromPython(PyObject* obj)
|
|
||||||
{
|
|
||||||
if (isPythonConvertible(obj)) {
|
|
||||||
int day = PyDateTime_GET_DAY(obj);
|
|
||||||
int month = PyDateTime_GET_MONTH(obj);
|
|
||||||
int year = PyDateTime_GET_YEAR(obj);
|
|
||||||
int hour = PyDateTime_DATE_GET_HOUR(obj);
|
|
||||||
int min = PyDateTime_DATE_GET_MINUTE(obj);
|
|
||||||
int sec = PyDateTime_DATE_GET_SECOND(obj);
|
|
||||||
int msec = PyDateTime_DATE_GET_MICROSECOND(obj);
|
|
||||||
return new QDateTime(QDate(year, month, day), QTime(hour, min, sec, msec));
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* transformToPython(QDateTime* d)
|
|
||||||
{
|
|
||||||
if (d) {
|
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
|
||||||
QDate date = d->date();
|
|
||||||
QTime time = d->time();
|
|
||||||
return PyDateTime_FromDateAndTime(date.year(), date.month(), date.day(), time.hour(), time.minute(), time.second(), time.msec());
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -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,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename T>
|
|
||||||
struct Converter<QStack<T> > : StdListConverter<QStack<T> > {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
inline PyTypeObject* SbkType<QString>()
|
|
||||||
{
|
|
||||||
return &PyUnicode_Type;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct Converter<QString>
|
|
||||||
{
|
|
||||||
static bool checkType(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return PyString_Check(pyObj) || PyUnicode_Check(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return PyString_Check(pyObj)
|
|
||||||
|| PyUnicode_Check(pyObj)
|
|
||||||
|| pyObj == Py_None;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
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<const char * >::toCpp(pyObj));
|
|
||||||
}
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* toPython(void* cppObj) { return toPython(*reinterpret_cast<QString*>(cppObj)); }
|
|
||||||
static PyObject* toPython(const QString& cppObj)
|
|
||||||
{
|
|
||||||
const int N = cppObj.length();
|
|
||||||
wchar_t* str = new wchar_t[N];
|
|
||||||
cppObj.toWCharArray(str);
|
|
||||||
PyObject* pyObj = PyUnicode_FromWideChar(str, N);
|
|
||||||
delete[] str;
|
|
||||||
return pyObj;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
namespace Shiboken
|
|
||||||
{
|
|
||||||
template<>
|
|
||||||
struct Converter<QStringList> : StdListConverter<QStringList> {};
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct Converter<QStringRef> : public Converter<QString>
|
|
||||||
{
|
|
||||||
static PyObject* toPython(void* cppObj) { return toPython(*reinterpret_cast<QStringRef*>(cppObj)); }
|
|
||||||
|
|
||||||
static PyObject* toPython(const QStringRef& cppObj)
|
|
||||||
{
|
|
||||||
return Converter<QString>::toPython(cppObj.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
static QStringRef toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return QStringRef();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template <>
|
|
||||||
struct PythonConverter<QTime>
|
|
||||||
{
|
|
||||||
static bool isPythonConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
|
||||||
return pyObj && PyTime_Check(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static QTime* transformFromPython(PyObject* obj)
|
|
||||||
{
|
|
||||||
if (isPythonConvertible(obj)) {
|
|
||||||
int hour = PyDateTime_TIME_GET_HOUR(obj);
|
|
||||||
int min = PyDateTime_TIME_GET_MINUTE(obj);
|
|
||||||
int sec = PyDateTime_TIME_GET_SECOND(obj);
|
|
||||||
int msec = PyDateTime_TIME_GET_MICROSECOND(obj);
|
|
||||||
return new QTime(hour, min, sec, msec);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* transformToPython(QTime* d)
|
|
||||||
{
|
|
||||||
if (d) {
|
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
|
||||||
return PyTime_FromTime(d->hour(), d->minute(), d->second(), d->msec());
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,213 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct Converter<QVariant>
|
|
||||||
{
|
|
||||||
static bool checkType(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return false; // lets avoid the chaos
|
|
||||||
}
|
|
||||||
|
|
||||||
// all types are convertible to QVariant
|
|
||||||
static bool isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char* resolveMetaType(PyTypeObject* type, int* typeId)
|
|
||||||
{
|
|
||||||
if (PyObject_TypeCheck(type, &SbkObjectType_Type)) {
|
|
||||||
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
|
|
||||||
const char* typeName = Shiboken::ObjectType::getOriginalName(sbkType);
|
|
||||||
if (!typeName)
|
|
||||||
return 0;
|
|
||||||
bool valueType = '*' != typeName[qstrlen(typeName) - 1];
|
|
||||||
|
|
||||||
// Do not convert user type of value
|
|
||||||
if (valueType && Shiboken::ObjectType::isUserType(type))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
int obTypeId = QMetaType::type(typeName);
|
|
||||||
if (obTypeId) {
|
|
||||||
*typeId = obTypeId;
|
|
||||||
return typeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do not resolve types to value type
|
|
||||||
if (valueType)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// find in base types
|
|
||||||
if (type->tp_base) {
|
|
||||||
return resolveMetaType(type->tp_base, typeId);
|
|
||||||
} else if (type->tp_bases) {
|
|
||||||
int size = PyTuple_GET_SIZE(type->tp_bases);
|
|
||||||
for(int i=0; i < size; i++){
|
|
||||||
const char* derivedName = resolveMetaType(reinterpret_cast<PyTypeObject*>(PyTuple_GET_ITEM(type->tp_bases, i)), typeId);
|
|
||||||
if (derivedName)
|
|
||||||
return derivedName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*typeId = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QVariant toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
using namespace Shiboken;
|
|
||||||
|
|
||||||
// Primitive types
|
|
||||||
if (Converter<bool>::checkType(pyObj)) {
|
|
||||||
// QVariant(bool)
|
|
||||||
return QVariant(Converter<bool>::toCpp(pyObj));
|
|
||||||
} else if (pyObj == Py_None) {
|
|
||||||
// QVariant()
|
|
||||||
return QVariant();
|
|
||||||
} else if (Converter<QString>::checkType(pyObj)) {
|
|
||||||
// QVariant(const char*)
|
|
||||||
return QVariant(Converter<QString>::toCpp(pyObj));
|
|
||||||
} else if (Converter<QByteArray>::checkType(pyObj)) {
|
|
||||||
// QVariant(QByteArray)
|
|
||||||
return QVariant(Converter<QByteArray>::toCpp(pyObj));
|
|
||||||
} else if (PyFloat_CheckExact(pyObj)) {
|
|
||||||
// QVariant(double)
|
|
||||||
return QVariant(Converter<double>::toCpp(pyObj));
|
|
||||||
} else if (PyInt_Check(pyObj)) {
|
|
||||||
// QVariant(int)
|
|
||||||
return QVariant(Converter<int>::toCpp(pyObj));
|
|
||||||
} else if (PyLong_CheckExact(pyObj)) {
|
|
||||||
// QVariant(qlonglong)
|
|
||||||
return QVariant(Converter<qlonglong>::toCpp(pyObj));
|
|
||||||
} else if (Shiboken::isShibokenEnum(pyObj)) {
|
|
||||||
// QVariant(enum)
|
|
||||||
return QVariant(Converter<int>::toCpp(pyObj));
|
|
||||||
} else if (PyDict_Check(pyObj)) {
|
|
||||||
return convertToVariantMap(pyObj);
|
|
||||||
} else if (PySequence_Check(pyObj)) {
|
|
||||||
return convertToVariantList(pyObj);
|
|
||||||
} else {
|
|
||||||
// a class supported by QVariant?
|
|
||||||
if (Shiboken::Object::checkType(pyObj)) {
|
|
||||||
int typeCode;
|
|
||||||
const char* typeName = resolveMetaType(pyObj->ob_type, &typeCode);
|
|
||||||
|
|
||||||
if (typeCode && typeName) {
|
|
||||||
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(typeName);
|
|
||||||
QVariant var(typeCode, (void*)0);
|
|
||||||
void* args[] = { var.data() };
|
|
||||||
tr->toCpp(pyObj, args);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Is a shiboken type not known by Qt
|
|
||||||
return QVariant::fromValue<PySide::PyObjectWrapper>(pyObj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* toPython(void* cppObj)
|
|
||||||
{
|
|
||||||
return toPython(*reinterpret_cast<QVariant*>(cppObj));
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* toPython(const QVariant& cppObj)
|
|
||||||
{
|
|
||||||
if (cppObj.isValid()) {
|
|
||||||
if (qstrcmp(cppObj.typeName(), "QVariantList") == 0)
|
|
||||||
return Converter<QList<QVariant> >::toPython(cppObj.value<QVariantList>());
|
|
||||||
|
|
||||||
if (qstrcmp(cppObj.typeName(), "QStringList") == 0)
|
|
||||||
return Converter<QList<QString> >::toPython(cppObj.value<QStringList>());
|
|
||||||
|
|
||||||
if (qstrcmp(cppObj.typeName(), "QVariantMap") == 0)
|
|
||||||
return Converter<QMap<QString, QVariant> >::toPython(cppObj.value<QVariantMap>());
|
|
||||||
|
|
||||||
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(cppObj.typeName());
|
|
||||||
if (tr)
|
|
||||||
return tr->toPython(const_cast<void*>(cppObj.data()));
|
|
||||||
}
|
|
||||||
Py_RETURN_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QVariant convertToValueList(PyObject* list)
|
|
||||||
{
|
|
||||||
if (PySequence_Size(list) < 1)
|
|
||||||
return QVariant();
|
|
||||||
|
|
||||||
Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
|
|
||||||
int typeId;
|
|
||||||
const char* typeName = resolveMetaType(element.cast<PyTypeObject*>(), &typeId);
|
|
||||||
if (typeName) {
|
|
||||||
QByteArray listTypeName("QList<");
|
|
||||||
listTypeName += typeName;
|
|
||||||
listTypeName += '>';
|
|
||||||
typeId = QMetaType::type(listTypeName);
|
|
||||||
if (typeId > 0) {
|
|
||||||
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(listTypeName);
|
|
||||||
if (!tr) {
|
|
||||||
qWarning() << "TypeResolver for :" << listTypeName << "not registered.";
|
|
||||||
} else {
|
|
||||||
QVariant var(typeId, (void*)0);
|
|
||||||
void* args[] = { var.data(), 0 };
|
|
||||||
tr->toCpp(list, args);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
static QVariant convertToVariantMap(PyObject* map)
|
|
||||||
{
|
|
||||||
PyObject *key, *value;
|
|
||||||
Py_ssize_t pos = 0;
|
|
||||||
AutoDecRef keys(PyDict_Keys(map));
|
|
||||||
bool keysIsString = isStringList(keys);
|
|
||||||
if (keysIsString) {
|
|
||||||
QMap<QString, QVariant> ret;
|
|
||||||
while (PyDict_Next(map, &pos, &key, &value))
|
|
||||||
ret.insert(Converter<QString>::toCpp(key), toCpp(value));
|
|
||||||
return QVariant(ret);
|
|
||||||
} else {
|
|
||||||
return toCpp(map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isStringList(PyObject *list)
|
|
||||||
{
|
|
||||||
bool allString = true;
|
|
||||||
AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
|
|
||||||
Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
|
|
||||||
for(int i=0; i < size; i++) {
|
|
||||||
PyObject* item = PySequence_Fast_GET_ITEM(fast.object(), i);
|
|
||||||
if (!Converter<QString>::checkType(item)) {
|
|
||||||
allString = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return allString;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QVariant convertToVariantList(PyObject* list)
|
|
||||||
{
|
|
||||||
bool allString = isStringList(list);
|
|
||||||
if (allString) {
|
|
||||||
QStringList lst = Converter<QList<QString> >::toCpp(list);
|
|
||||||
return QVariant(lst);
|
|
||||||
} else {
|
|
||||||
QVariant valueList = convertToValueList(list);
|
|
||||||
if (valueList.isValid())
|
|
||||||
return valueList;
|
|
||||||
QList<QVariant> lst;
|
|
||||||
AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
|
|
||||||
Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
|
|
||||||
for(int i=0; i < size; i++) {
|
|
||||||
PyObject* item = PySequence_Fast_GET_ITEM(fast.object(), i);
|
|
||||||
lst.append(toCpp(item));
|
|
||||||
}
|
|
||||||
return QVariant(lst);
|
|
||||||
}
|
|
||||||
Q_ASSERT(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct Converter<QVariant::Type>
|
|
||||||
{
|
|
||||||
static bool checkType(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return pyObj == Py_None || PyType_Check(pyObj) || Converter<QString>::checkType(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isConvertible(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return checkType(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static QVariant::Type toCpp(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
const char* typeName = 0;
|
|
||||||
if (pyObj == Py_None)
|
|
||||||
return QVariant::Invalid;
|
|
||||||
|
|
||||||
if (pyObj == reinterpret_cast<PyObject*>(&PyString_Type) || pyObj == reinterpret_cast<PyObject*>(&PyUnicode_Type))
|
|
||||||
typeName = "QString";
|
|
||||||
else if (pyObj == reinterpret_cast<PyObject*>(&PyFloat_Type))
|
|
||||||
typeName = "double"; // float is a UserType in QVariant.
|
|
||||||
else if (pyObj == reinterpret_cast<PyObject*>(&PyLong_Type))
|
|
||||||
typeName = "int"; // long is a UserType in QVariant.
|
|
||||||
else if (PyType_Check(pyObj)) {
|
|
||||||
if (pyObj->ob_type == &SbkObjectType_Type)
|
|
||||||
typeName = Shiboken::ObjectType::getOriginalName(reinterpret_cast<SbkObjectType*>(pyObj));
|
|
||||||
else
|
|
||||||
typeName = reinterpret_cast<PyTypeObject*>(pyObj)->tp_name;
|
|
||||||
}
|
|
||||||
else if (PyString_Check(pyObj))
|
|
||||||
typeName = PyString_AS_STRING(pyObj);
|
|
||||||
else if (PyUnicode_Check(pyObj))
|
|
||||||
typeName = PyString_AsString(pyObj);
|
|
||||||
else if (PyDict_Check(pyObj) && checkAllStringKeys(pyObj))
|
|
||||||
typeName = "QVariantMap";
|
|
||||||
else if (PySequence_Check(pyObj))
|
|
||||||
if (isStringList(pyObj))
|
|
||||||
typeName = "QStringList";
|
|
||||||
else
|
|
||||||
typeName = "QVariantList";
|
|
||||||
else
|
|
||||||
Q_ASSERT(false);
|
|
||||||
|
|
||||||
return QVariant::nameToType(typeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* toPython(void* cppObj) { return toPython(*reinterpret_cast<QVariant::Type*>(cppObj)); }
|
|
||||||
static PyObject* toPython(const QVariant::Type& cppObj)
|
|
||||||
{
|
|
||||||
const char* typeName = QVariant::typeToName(cppObj);
|
|
||||||
PyObject* pyObj;
|
|
||||||
if (!typeName) {
|
|
||||||
pyObj = Py_None;
|
|
||||||
} else {
|
|
||||||
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(typeName);
|
|
||||||
pyObj = tr ? reinterpret_cast<PyObject*>(tr->pythonType()) : Py_None;
|
|
||||||
}
|
|
||||||
Py_INCREF(pyObj);
|
|
||||||
return pyObj;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isStringList(PyObject* list)
|
|
||||||
{
|
|
||||||
bool allString = true;
|
|
||||||
AutoDecRef fast(PySequence_Fast(list, "Failed to convert QVariantList"));
|
|
||||||
Py_ssize_t size = PySequence_Fast_GET_SIZE(fast.object());
|
|
||||||
for(int i=0; i < size; i++) {
|
|
||||||
PyObject* item = PySequence_Fast_GET_ITEM(fast.object(), i);
|
|
||||||
if (!Converter<QString>::checkType(item)) {
|
|
||||||
allString = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return allString;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool checkAllStringKeys(PyObject* dict)
|
|
||||||
{
|
|
||||||
AutoDecRef keys(PyDict_Keys(dict));
|
|
||||||
return isStringList(keys);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template<typename T>
|
|
||||||
struct Converter<QVector<T> > : StdListConverter<QVector<T> > {};
|
|
||||||
}
|
|
||||||
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>
|
||||||
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,5 +1,7 @@
|
||||||
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
|
||||||
|
|
@ -21,7 +23,7 @@ ${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
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtDeclarative_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtDeclarative_SOURCE_DIR}${PATH_SEP}${QtGui_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}")
|
||||||
|
|
||||||
set(QtDeclarative_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtDeclarative_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
|
@ -49,13 +51,12 @@ set(QtDeclarative_libraries pyside
|
||||||
${QT_QTDECLARATIVE_LIBRARY})
|
${QT_QTDECLARATIVE_LIBRARY})
|
||||||
|
|
||||||
set(QtDeclarative_deps QtGui QtNetwork)
|
set(QtDeclarative_deps QtGui QtNetwork)
|
||||||
set(QtDeclarative_registerType "${CMAKE_CURRENT_SOURCE_DIR}/pysideqmlregistertype.cpp")
|
|
||||||
create_pyside_module(QtDeclarative
|
create_pyside_module(QtDeclarative
|
||||||
QtDeclarative_include_dirs
|
QtDeclarative_include_dirs
|
||||||
QtDeclarative_libraries
|
QtDeclarative_libraries
|
||||||
QtDeclarative_deps
|
QtDeclarative_deps
|
||||||
QtDeclarative_typesystem_path
|
QtDeclarative_typesystem_path
|
||||||
QtDeclarative_SRC
|
QtDeclarative_SRC
|
||||||
""
|
|
||||||
QtDeclarative_registerType)
|
QtDeclarative_registerType)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,7 @@ static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Ca
|
||||||
static PyObject* pyTypes[PYSIDE_MAX_QML_TYPES];
|
static PyObject* pyTypes[PYSIDE_MAX_QML_TYPES];
|
||||||
static void (*createFuncs[PYSIDE_MAX_QML_TYPES])(void*);
|
static void (*createFuncs[PYSIDE_MAX_QML_TYPES])(void*);
|
||||||
|
|
||||||
/// QDeclarativeItem will create objects using placement new then this pointer is non-null.
|
// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr
|
||||||
void* PySide::nextQmlElementMemoryAddr = 0;
|
|
||||||
// Mutex used to avoid race condition on PySide::nextQmlElementMemoryAddr
|
|
||||||
static QMutex nextQmlElementMutex;
|
static QMutex nextQmlElementMutex;
|
||||||
|
|
||||||
template<int N>
|
template<int N>
|
||||||
|
|
@ -63,12 +61,12 @@ struct ElementFactoryBase
|
||||||
static void createInto(void* memory)
|
static void createInto(void* memory)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&nextQmlElementMutex);
|
QMutexLocker locker(&nextQmlElementMutex);
|
||||||
PySide::nextQmlElementMemoryAddr = memory;
|
PySide::setNextQObjectMemoryAddr(memory);
|
||||||
Shiboken::GilState state;
|
Shiboken::GilState state;
|
||||||
PyObject* obj = PyObject_CallObject(pyTypes[N], 0);
|
PyObject* obj = PyObject_CallObject(pyTypes[N], 0);
|
||||||
if (!obj || PyErr_Occurred())
|
if (!obj || PyErr_Occurred())
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
PySide::nextQmlElementMemoryAddr = 0;
|
PySide::setNextQObjectMemoryAddr(0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -95,8 +93,9 @@ int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor,
|
||||||
{
|
{
|
||||||
using namespace Shiboken;
|
using namespace Shiboken;
|
||||||
|
|
||||||
static PyTypeObject* declarativeItemType = TypeResolver::get("QDeclarativeItem*")->pythonType();
|
static PyTypeObject* qobjectType = Shiboken::Conversions::getPythonTypeObject("QObject*");
|
||||||
assert(declarativeItemType);
|
static PyTypeObject* qdeclarativeType = Shiboken::Conversions::getPythonTypeObject("QDeclarativeItem*");
|
||||||
|
assert(qobjectType);
|
||||||
static int nextType = 0;
|
static int nextType = 0;
|
||||||
|
|
||||||
if (nextType >= PYSIDE_MAX_QML_TYPES) {
|
if (nextType >= PYSIDE_MAX_QML_TYPES) {
|
||||||
|
|
@ -104,28 +103,46 @@ int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pyObj->ob_type != &SbkObjectType_Type) {
|
if (!PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qobjectType)) {
|
||||||
PyErr_Format(PyExc_TypeError, "A shiboken-based python type expected, got %s.", pyObj->ob_type->tp_name);
|
PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.", qobjectType->tp_name, ((PyTypeObject*)pyObj)->tp_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)declarativeItemType)) {
|
bool isDeclarativeType = PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qdeclarativeType);
|
||||||
PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.", declarativeItemType->tp_name, ((PyTypeObject*)pyObj)->tp_name);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
|
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
|
||||||
Q_ASSERT(metaObject);
|
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... :-)
|
// All ready... now the ugly code begins... :-)
|
||||||
pyTypes[nextType] = pyObj;
|
pyTypes[nextType] = pyObj;
|
||||||
|
|
||||||
// Init proxy object static meta object
|
// Init proxy object static meta object
|
||||||
QDeclarativePrivate::RegisterType type;
|
QDeclarativePrivate::RegisterType type;
|
||||||
type.version = 0;
|
type.version = 0;
|
||||||
type.typeId = qMetaTypeId<QDeclarativeItem*>();
|
if (isDeclarativeType) {
|
||||||
type.listId = qMetaTypeId<QDeclarativeListProperty<QDeclarativeItem> >();
|
type.typeId = qMetaTypeId<QDeclarativeItem*>();
|
||||||
type.objectSize = sizeof(QDeclarativeItemWrapper);
|
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.create = createFuncs[nextType];
|
||||||
type.uri = uri;
|
type.uri = uri;
|
||||||
type.versionMajor = versionMajor;
|
type.versionMajor = versionMajor;
|
||||||
|
|
@ -133,13 +150,6 @@ int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor,
|
||||||
type.elementName = qmlName;
|
type.elementName = qmlName;
|
||||||
type.metaObject = metaObject;
|
type.metaObject = metaObject;
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
type.extensionObjectCreate = 0;
|
type.extensionObjectCreate = 0;
|
||||||
type.extensionMetaObject = 0;
|
type.extensionMetaObject = 0;
|
||||||
type.customParser = 0;
|
type.customParser = 0;
|
||||||
|
|
@ -190,12 +200,11 @@ void propListTpFree(void* self)
|
||||||
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
|
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
|
||||||
delete reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pySelf));
|
delete reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pySelf));
|
||||||
// calls base type constructor
|
// calls base type constructor
|
||||||
pySelf->ob_type->tp_base->tp_free(self);
|
Py_TYPE(pySelf)->tp_base->tp_free(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyTypeObject PropertyListType = {
|
PyTypeObject PropertyListType = {
|
||||||
PyObject_HEAD_INIT(0)
|
PyVarObject_HEAD_INIT(0, 0)
|
||||||
0, /*ob_size*/
|
|
||||||
"ListProperty", /*tp_name*/
|
"ListProperty", /*tp_name*/
|
||||||
sizeof(PySideProperty), /*tp_basicsize*/
|
sizeof(PySideProperty), /*tp_basicsize*/
|
||||||
0, /*tp_itemsize*/
|
0, /*tp_itemsize*/
|
||||||
|
|
@ -249,7 +258,10 @@ PyTypeObject PropertyListType = {
|
||||||
void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDeclarativeItem* item)
|
void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDeclarativeItem* item)
|
||||||
{
|
{
|
||||||
Shiboken::GilState state;
|
Shiboken::GilState state;
|
||||||
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, item));
|
|
||||||
|
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);
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
|
||||||
|
|
@ -262,42 +274,50 @@ void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDec
|
||||||
int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
||||||
{
|
{
|
||||||
Shiboken::GilState state;
|
Shiboken::GilState state;
|
||||||
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object));
|
|
||||||
|
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);
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
|
||||||
|
|
||||||
// Check return type
|
// Check return type
|
||||||
|
int cppResult = 0;
|
||||||
|
PythonToCppFunc pythonToCpp;
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
else if (Shiboken::Converter<int>::isConvertible(retVal))
|
else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<int>(), retVal)))
|
||||||
return Shiboken::Converter<int>::toCpp(retVal);
|
pythonToCpp(retVal, &cppResult);
|
||||||
|
return cppResult;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implementation of QDeclarativeListProperty<T>::AtFunction callback
|
// Implementation of QDeclarativeListProperty<T>::AtFunction callback
|
||||||
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
|
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
|
||||||
{
|
{
|
||||||
Shiboken::GilState state;
|
Shiboken::GilState state;
|
||||||
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, index));
|
|
||||||
|
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);
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
|
||||||
|
|
||||||
|
QDeclarativeItem* result = 0;
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
|
else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
|
||||||
return Shiboken::Converter<QDeclarativeItem*>::toCpp(retVal);
|
Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QDECLARATIVEITEM_IDX], retVal, &result);
|
||||||
|
return result;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implementation of QDeclarativeListProperty<T>::ClearFunction callback
|
// Implementation of QDeclarativeListProperty<T>::ClearFunction callback
|
||||||
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
||||||
{
|
{
|
||||||
Shiboken::GilState state;
|
Shiboken::GilState state;
|
||||||
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object));
|
|
||||||
|
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);
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
|
||||||
|
|
@ -313,7 +333,9 @@ static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Ca
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pp));
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pp));
|
||||||
QDeclarativeListProperty<QDeclarativeItem> declProp(Shiboken::Converter<QObject*>::toCpp(self), data, &propListAppender);
|
QObject* qobj;
|
||||||
|
Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], self, &qobj);
|
||||||
|
QDeclarativeListProperty<QDeclarativeItem> declProp(qobj, data, &propListAppender);
|
||||||
|
|
||||||
if (data->count)
|
if (data->count)
|
||||||
declProp.count = &propListCount;
|
declProp.count = &propListCount;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@
|
||||||
</inject-documentation>
|
</inject-documentation>
|
||||||
|
|
||||||
<inject-code class="target">
|
<inject-code class="target">
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[int](PySide::qmlRegisterType(%1, %2, %3, %4, %5));
|
int %0 = PySide::qmlRegisterType(%ARGUMENT_NAMES);
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[int](%0);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
|
|
||||||
|
|
@ -59,13 +60,13 @@
|
||||||
</enum-type>
|
</enum-type>
|
||||||
|
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
Shiboken::TypeResolver::createValueTypeResolver< QList<QObject*> >("QList<QObject*>");
|
PySide::initQmlSupport(module);
|
||||||
PySide::initQmlSupport(module);
|
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
||||||
<object-type name="QDeclarativeExtensionInterface"/>
|
<object-type name="QDeclarativeExtensionInterface"/>
|
||||||
<object-type name="QDeclarativeComponent">
|
<object-type name="QDeclarativeComponent">
|
||||||
<enum-type name="Status"/>
|
<enum-type name="Status"/>
|
||||||
|
<!-- This ctor isn't part of Qt public API -->
|
||||||
<modify-function signature="QDeclarativeComponent(QObject*)" remove="all" />
|
<modify-function signature="QDeclarativeComponent(QObject*)" remove="all" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QDeclarativeContext">
|
<object-type name="QDeclarativeContext">
|
||||||
|
|
@ -90,26 +91,44 @@
|
||||||
<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>
|
||||||
<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">
|
||||||
<enum-type name="ImageType" />
|
<enum-type name="ImageType" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QDeclarativeItem" polymorphic-id-expression="qgraphicsitem_cast<QDeclarativeItem*>(%1)">
|
<object-type name="QDeclarativeItem">
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="pysideqmlregistertype.h" location="local"/>
|
<include file-name="pysideqmlregistertype.h" location="local"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
<enum-type name="TransformOrigin" />
|
<enum-type name="TransformOrigin" />
|
||||||
<modify-function signature="QDeclarativeItem(QDeclarativeItem*)">
|
|
||||||
<inject-code class="target">
|
|
||||||
if (PySide::nextQmlElementMemoryAddr)
|
|
||||||
%0 = new (PySide::nextQmlElementMemoryAddr) ::QDeclarativePrivate::QDeclarativeElement<%TYPE>();
|
|
||||||
else
|
|
||||||
%0 = new %TYPE(%1);
|
|
||||||
</inject-code>
|
|
||||||
</modify-function>
|
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<value-type name="QDeclarativeListReference" />
|
<value-type name="QDeclarativeListReference" />
|
||||||
|
|
@ -127,7 +146,20 @@
|
||||||
<enum-type name="Type" />
|
<enum-type name="Type" />
|
||||||
</value-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">
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ if(ENABLE_X11)
|
||||||
${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/qx11embedcontainer_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedwidget_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11embedwidget_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(Q_WS_MAEMO_5)
|
if(Q_WS_MAEMO_5)
|
||||||
set(SPECIFIC_OS_FILES
|
set(SPECIFIC_OS_FILES
|
||||||
|
|
@ -15,9 +15,8 @@ if(ENABLE_X11)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|
@ -60,6 +59,31 @@ else()
|
||||||
)
|
)
|
||||||
endif ()
|
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")
|
qt4_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside_SOURCE_DIR}/qpytextobject.h")
|
||||||
|
|
||||||
set(QtGui_SRC
|
set(QtGui_SRC
|
||||||
|
|
@ -225,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
|
||||||
|
|
@ -378,29 +403,17 @@ ${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}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/typesystem_gui.xml.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml" @ONLY)
|
||||||
|
|
||||||
check_qt_class(QtGui QGtkStyle QtGui_SRC)
|
set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}")
|
||||||
check_qt_class(QtGui QSessionManager QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QSizeGrip QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QSystemTrayIcon QtGui_SRC)
|
|
||||||
|
|
||||||
check_qt_class(QtGui QAbstractPageSetupDialog QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QAbstractPrintDialog QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPageSetupDialog QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPrintDialog QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPrintPreviewWidget QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPrintPreviewDialog QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPrinter QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPrinterInfo QtGui_SRC)
|
|
||||||
check_qt_class(QtGui QPrintEngine QtGui_SRC)
|
|
||||||
|
|
||||||
set(QtGui_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}")
|
|
||||||
set(QtGui_include_dirs ${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}
|
${pyside_SOURCE_DIR}
|
||||||
|
|
@ -421,8 +434,7 @@ create_pyside_module(QtGui
|
||||||
QtGui_deps
|
QtGui_deps
|
||||||
QtGui_typesystem_path
|
QtGui_typesystem_path
|
||||||
QtGui_SRC
|
QtGui_SRC
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml"
|
""
|
||||||
QPYTEXTOBJECT_MOC)
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
|
||||||
|
|
||||||
|
|
||||||
install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)
|
install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)
|
||||||
|
|
|
||||||
|
|
@ -5,39 +5,18 @@ static int QApplicationArgCount;
|
||||||
static char** QApplicationArgValues;
|
static char** QApplicationArgValues;
|
||||||
static const char QAPP_MACRO[] = "qApp";
|
static const char QAPP_MACRO[] = "qApp";
|
||||||
|
|
||||||
int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*)
|
bool QApplicationConstructorStart(PyObject* argv)
|
||||||
{
|
{
|
||||||
if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType<QApplication>()))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Shiboken::sequenceToArgcArgv(PyTuple_GET_ITEM(args, 0), &QApplicationArgCount, &QApplicationArgValues, "PySideApp")) {
|
|
||||||
PyErr_BadArgument();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
SbkObject* sbkSelf = reinterpret_cast<SbkObject*>(self);
|
|
||||||
QApplicationWrapper* cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues);
|
|
||||||
Shiboken::Object::setCppPointer(sbkSelf,
|
|
||||||
Shiboken::SbkType<QApplication>(),
|
|
||||||
cptr);
|
|
||||||
Shiboken::Object::setValidCpp(sbkSelf, true);
|
|
||||||
Shiboken::Object::setHasCppWrapper(sbkSelf, true);
|
|
||||||
Shiboken::Object::releaseOwnership(sbkSelf);
|
|
||||||
Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr);
|
|
||||||
PySide::Signal::updateSourceObject(self);
|
|
||||||
cptr->metaObject();
|
|
||||||
|
|
||||||
|
void QApplicationConstructorEnd(PyObject* self)
|
||||||
|
{
|
||||||
// Verify if qApp is in main module
|
// Verify if qApp is in main module
|
||||||
PyObject* globalsDict = PyEval_GetGlobals();
|
PyObject* globalsDict = PyEval_GetGlobals();
|
||||||
if (globalsDict) {
|
if (globalsDict) {
|
||||||
|
|
@ -49,5 +28,23 @@ int Sbk_QApplication_Init(PyObject* self, PyObject* args, PyObject*)
|
||||||
PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self);
|
PyObject_SetAttrString(moduleQtGui, QAPP_MACRO, self);
|
||||||
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
|
PySide::registerCleanupFunction(&PySide::destroyQCoreApplication);
|
||||||
Py_INCREF(self);
|
Py_INCREF(self);
|
||||||
return 1;
|
}
|
||||||
|
|
||||||
|
static void QApplicationConstructor(PyObject* self, PyObject* argv, QApplicationWrapper** cptr)
|
||||||
|
{
|
||||||
|
if (QApplicationConstructorStart(argv)) {
|
||||||
|
*cptr = new QApplicationWrapper(QApplicationArgCount, QApplicationArgValues);
|
||||||
|
Shiboken::Object::releaseOwnership(reinterpret_cast<SbkObject*>(self));
|
||||||
|
QApplicationConstructorEnd(self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
static void QApplicationConstructor(PyObject* self, PyObject* argv, T extraArg, QApplicationWrapper** cptr)
|
||||||
|
{
|
||||||
|
if (QApplicationConstructorStart(argv)) {
|
||||||
|
*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,71 +0,0 @@
|
||||||
#ifndef QLAYOUT_HELP_FUNCTIONS
|
|
||||||
#define QLAYOUT_HELP_FUNCTIONS
|
|
||||||
|
|
||||||
void addLayoutOwnership(QLayout* layout, QLayoutItem* item);
|
|
||||||
|
|
||||||
inline QByteArray retrieveObjectName(PyObject* obj)
|
|
||||||
{
|
|
||||||
Shiboken::AutoDecRef objName(PyObject_Str(obj));
|
|
||||||
return PyString_AsString(objName);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void addLayoutOwnership(QLayout* layout, QWidget* widget)
|
|
||||||
{
|
|
||||||
//transfer ownership to parent widget
|
|
||||||
QWidget* parent = layout->parentWidget();
|
|
||||||
|
|
||||||
if (!parent) {
|
|
||||||
//keep the reference while the layout is orphan
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(layout));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(widget));
|
|
||||||
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyParent.object()), retrieveObjectName(pyParent).data(), pyChild, true);
|
|
||||||
} else {
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(widget));
|
|
||||||
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(Shiboken::Converter<QLayout*>::toPython(layout));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(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(Shiboken::Converter<QLayout*>::toPython(layout));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(other));
|
|
||||||
Shiboken::Object::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::Object::setParent(pyParent, pyChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
inline PyObject* addActionWithPyObject(QMenu* self, const QIcon& icon, const QString& text, PyObject* callback, const QKeySequence& shortcut)
|
inline PyObject* addActionWithPyObject(QMenu* self, const QIcon& icon, const QString& text, PyObject* callback, const QKeySequence& shortcut)
|
||||||
{
|
{
|
||||||
QAction* act = new QAction(text, self);
|
QAction* act = new QAction(text, self);
|
||||||
|
|
@ -11,7 +10,7 @@ inline PyObject* addActionWithPyObject(QMenu* self, const QIcon& icon, const QSt
|
||||||
|
|
||||||
self->addAction(act);
|
self->addAction(act);
|
||||||
|
|
||||||
PyObject* pyAct = Shiboken::Converter<QAction*>::toPython(act);
|
PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
|
||||||
Shiboken::AutoDecRef result(PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered()), callback));
|
Shiboken::AutoDecRef result(PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered()), callback));
|
||||||
if (result.isNull()) {
|
if (result.isNull()) {
|
||||||
Py_DECREF(pyAct);
|
Py_DECREF(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;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
static QString retrieveObjectName(PyObject *obj)
|
static QString retrieveObjectName(PyObject *obj)
|
||||||
{
|
{
|
||||||
Shiboken::AutoDecRef objName(PyObject_Str(obj));
|
Shiboken::AutoDecRef objName(PyObject_Str(obj));
|
||||||
return QString(PyString_AsString(objName));
|
return QString(Shiboken::String::toCString(objName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ static QString retrieveObjectName(PyObject *obj)
|
||||||
**/
|
**/
|
||||||
static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
||||||
{
|
{
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent));
|
Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QWidget*](parent));
|
||||||
|
|
||||||
for (int i=0; i < layout->count(); i++) {
|
for (int i=0; i < layout->count(); i++) {
|
||||||
QLayoutItem* item = layout->itemAt(i);
|
QLayoutItem* item = layout->itemAt(i);
|
||||||
|
|
@ -21,7 +21,7 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
||||||
if (w) {
|
if (w) {
|
||||||
QWidget* pw = w->parentWidget();
|
QWidget* pw = w->parentWidget();
|
||||||
if (pw != parent) {
|
if (pw != parent) {
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QWidget*>::toPython(w));
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QWidget*](w));
|
||||||
Shiboken::Object::setParent(pyParent, pyChild);
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -31,7 +31,7 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QLayout*>::toPython(layout));
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
Shiboken::Object::setParent(pyParent, pyChild);
|
Shiboken::Object::setParent(pyParent, pyChild);
|
||||||
//remove previous references
|
//remove previous references
|
||||||
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None);
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(pyChild.object()), qPrintable(retrieveObjectName(pyChild)), Py_None);
|
||||||
|
|
@ -46,7 +46,7 @@ static inline void qwidgetSetLayout(QWidget *self, QLayout *layout)
|
||||||
if (oldParent && oldParent != self) {
|
if (oldParent && oldParent != self) {
|
||||||
if (oldParent->isWidgetType()) {
|
if (oldParent->isWidgetType()) {
|
||||||
// remove old parent policy
|
// remove old parent policy
|
||||||
Shiboken::AutoDecRef pyLayout(Shiboken::Converter<QLayout*>::toPython(layout));
|
Shiboken::AutoDecRef pyLayout(%CONVERTTOPYTHON[QLayout*](layout));
|
||||||
Shiboken::Object::setParent(Py_None, pyLayout);
|
Shiboken::Object::setParent(Py_None, pyLayout);
|
||||||
} else {
|
} else {
|
||||||
PyErr_Format(PyExc_RuntimeError, "QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", when the QLayout already has a parent",
|
PyErr_Format(PyExc_RuntimeError, "QWidget::setLayout: Attempting to set QLayout \"%s\" on %s \"%s\", when the QLayout already has a parent",
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
template <>
|
|
||||||
struct Converter<WId>
|
|
||||||
{
|
|
||||||
static bool checkType(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool isConvertible(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
return PyCObject_Check(pyobj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline PyObject* toPython(void* cppobj)
|
|
||||||
{
|
|
||||||
// not supported
|
|
||||||
Q_ASSERT(true);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject* toPython(WId cppobj)
|
|
||||||
{
|
|
||||||
return PyCObject_FromVoidPtr(cppobj, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static WId toCpp(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
return (WId) PyCObject_AsVoidPtr(pyobj);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
namespace Shiboken {
|
|
||||||
inline bool Converter<QPixmap>::checkType(PyObject* pyObj)
|
|
||||||
{
|
|
||||||
return ValueTypeConverter<QPixmap>::checkType(pyObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool Converter<QPixmap>::isConvertible(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
if (ValueTypeConverter<QPixmap>::isConvertible(pyobj))
|
|
||||||
return true;
|
|
||||||
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<QPixmap>());
|
|
||||||
bool isVariant = Shiboken::Converter<QVariant>::checkType(pyobj);
|
|
||||||
if (isVariant) {
|
|
||||||
QVariant var(Shiboken::Converter<QVariant>::toCpp(pyobj));
|
|
||||||
return var.type() == QVariant::Pixmap;
|
|
||||||
} else if (Shiboken::Converter<QSize>::checkType(pyobj) || Shiboken::Converter<QString>::checkType(pyobj)) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return Shiboken::ObjectType::isExternalConvertible(shiboType, pyobj);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inline QPixmap Converter<QPixmap>::toCpp(PyObject* pyobj)
|
|
||||||
{
|
|
||||||
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<QPixmap>());
|
|
||||||
bool isVariant = Converter<QVariant>::checkType(pyobj);
|
|
||||||
if (isVariant) {
|
|
||||||
QVariant var(Converter<QVariant>::toCpp(pyobj));
|
|
||||||
return var.value<QPixmap>();
|
|
||||||
} else if (Converter<QSize>::checkType(pyobj)) {
|
|
||||||
return QPixmap(Shiboken::Converter<QSize >::toCpp(pyobj));
|
|
||||||
} else if (Converter<QString>::checkType(pyobj)) {
|
|
||||||
return QPixmap(Shiboken::Converter<QString >::toCpp(pyobj));
|
|
||||||
} else if (Shiboken::ObjectType::isExternalConvertible(shiboType, pyobj) && Shiboken::ObjectType::hasExternalCppConversions(shiboType)) {
|
|
||||||
QPixmap* cptr = reinterpret_cast<QPixmap*>(Shiboken::ObjectType::callExternalCppConversion(shiboType, 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -23,6 +23,10 @@
|
||||||
<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" >
|
||||||
|
<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" />
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,31 @@
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
-->
|
-->
|
||||||
<typesystem package="PySide.QtGui">
|
<typesystem package="PySide.QtGui">
|
||||||
<primitive-type name="Qt::HANDLE" target-lang-api-name="PyObject" />
|
|
||||||
<primitive-type name="WId" target-lang-api-name="PyObject">
|
<primitive-type name="WId" target-lang-api-name="PyObject">
|
||||||
<conversion-rule file="glue/wid_conversions.h"/>
|
<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>
|
</primitive-type>
|
||||||
|
<inject-code class="native" position="beginning">
|
||||||
|
<insert-template name="checkPyCapsuleOrPyCObject_func"/>
|
||||||
|
</inject-code>
|
||||||
<enum-type name="QPixmap::HBitmapFormat" />
|
<enum-type name="QPixmap::HBitmapFormat" />
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,21 @@
|
||||||
<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">
|
<object-type name="QX11EmbedContainer">
|
||||||
<enum-type name="Error"/>
|
<enum-type name="Error"/>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ set(QtHelp_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qthelp_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtHelp/qthelp_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtHelp_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtHelp_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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}
|
set(QtHelp_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ ${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
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtMaemo5_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtMaemo5_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
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}")
|
||||||
|
|
||||||
# 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)
|
||||||
|
|
|
||||||
|
|
@ -47,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*)">
|
||||||
|
|
@ -61,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>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ 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}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
set(QtMultimedia_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
||||||
|
|
||||||
set(QtMultimedia_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtMultimedia_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@
|
||||||
<object-type name="QAbstractVideoBuffer">
|
<object-type name="QAbstractVideoBuffer">
|
||||||
<enum-type name="HandleType"/>
|
<enum-type name="HandleType"/>
|
||||||
<enum-type name="MapMode"/>
|
<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"/>
|
||||||
|
|
@ -51,6 +53,7 @@
|
||||||
<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>
|
||||||
<object-type name="QAbstractVideoSurface">
|
<object-type name="QAbstractVideoSurface">
|
||||||
<enum-type name="Error"/>
|
<enum-type name="Error"/>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,15 @@ 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/qabstractnetworkcache_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qabstractsocket_wrapper.cpp
|
||||||
|
|
@ -32,6 +41,8 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkcookiejar_wrapper.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qnetworkdiskcache_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
|
||||||
|
|
@ -42,16 +53,10 @@ ${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
|
||||||
|
|
||||||
${QtNetwork_47_SRC}
|
${QtNetwork_47_SRC}
|
||||||
|
${QtNetwork_OPTIONAL_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
check_qt_class(QtNetwork QSslCertificate QtNetwork_SRC)
|
set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
check_qt_class(QtNetwork QSslCipher QtNetwork_SRC)
|
|
||||||
check_qt_class(QtNetwork QSslConfiguration QtNetwork_SRC)
|
|
||||||
check_qt_class(QtNetwork QSslError QtNetwork_SRC)
|
|
||||||
check_qt_class(QtNetwork QSslKey QtNetwork_SRC)
|
|
||||||
check_qt_class(QtNetwork QSslSocket QtNetwork_SRC)
|
|
||||||
|
|
||||||
set(QtNetwork_typesystem_path "${QtCore_SOURCE_DIR}")
|
|
||||||
set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtNetwork_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
|
|
@ -73,4 +78,6 @@ create_pyside_module(QtNetwork
|
||||||
QtNetwork_deps
|
QtNetwork_deps
|
||||||
QtNetwork_typesystem_path
|
QtNetwork_typesystem_path
|
||||||
QtNetwork_SRC
|
QtNetwork_SRC
|
||||||
"")
|
""
|
||||||
|
""
|
||||||
|
QtNetwork_DROPPED_ENTRIES)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
PySide::AutoArrayPointer<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);
|
|
||||||
|
|
@ -34,11 +34,10 @@
|
||||||
|
|
||||||
<rejection class="QIPv6Address" field-name="c"/>
|
<rejection class="QIPv6Address" field-name="c"/>
|
||||||
|
|
||||||
<value-type name="QSslCertificate"/>
|
|
||||||
<object-type name="QAbstractSocket">
|
<object-type name="QAbstractSocket">
|
||||||
<enum-type name="NetworkLayerProtocol"/>
|
<enum-type name="NetworkLayerProtocol"/>
|
||||||
<enum-type name="SocketError"/>
|
<enum-type name="SocketError"/>
|
||||||
<enum-type name="SocketOption"/>
|
<enum-type name="SocketOption" since="4.6"/>
|
||||||
<enum-type name="SocketState"/>
|
<enum-type name="SocketState"/>
|
||||||
<enum-type name="SocketType"/>
|
<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" />
|
||||||
|
|
@ -54,10 +53,6 @@
|
||||||
<enum-type name="State"/>
|
<enum-type name="State"/>
|
||||||
<enum-type name="TransferMode"/>
|
<enum-type name="TransferMode"/>
|
||||||
<enum-type name="TransferType"/>
|
<enum-type name="TransferType"/>
|
||||||
<extra-includes>
|
|
||||||
<include file-name="autoarraypointer.h" location="global"/>
|
|
||||||
</extra-includes>
|
|
||||||
|
|
||||||
<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" />
|
||||||
|
|
@ -89,11 +84,6 @@
|
||||||
<enum-type name="ConnectionMode"/>
|
<enum-type name="ConnectionMode"/>
|
||||||
<enum-type name="Error"/>
|
<enum-type name="Error"/>
|
||||||
<enum-type name="State"/>
|
<enum-type name="State"/>
|
||||||
<extra-includes>
|
|
||||||
<include file-name="autoarraypointer.h" location="global"/>
|
|
||||||
</extra-includes>
|
|
||||||
|
|
||||||
<modify-function signature="closeConnection()" remove="all"/>
|
|
||||||
<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">
|
||||||
|
|
@ -106,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">
|
||||||
|
|
@ -127,11 +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="QUdpSocket::BindMode"/>
|
<enum-type name="BindFlag" flags="BindMode"/>
|
||||||
<extra-includes>
|
|
||||||
<include file-name="autoarraypointer.h" location="global"/>
|
|
||||||
</extra-includes>
|
|
||||||
|
|
||||||
<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/>
|
||||||
|
|
@ -147,15 +136,27 @@
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="(data, address, port)"/>
|
<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="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 -->
|
||||||
|
|
@ -184,13 +185,16 @@
|
||||||
<enum-type name="Operation"/>
|
<enum-type name="Operation"/>
|
||||||
<modify-function signature="createRequest(QNetworkAccessManager::Operation, const QNetworkRequest&, QIODevice *)">
|
<modify-function signature="createRequest(QNetworkAccessManager::Operation, const QNetworkRequest&, QIODevice *)">
|
||||||
<modify-argument index="3" invalidate-after-use="yes"/>
|
<modify-argument index="3" invalidate-after-use="yes"/>
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="get(const QNetworkRequest&)" allow-thread="yes"/>
|
<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 &, QIODevice *)" allow-thread="yes"/>
|
||||||
<modify-function signature="post(const QNetworkRequest &, const QByteArray &)" 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 &, QIODevice *)" allow-thread="yes"/>
|
||||||
<modify-function signature="put(const QNetworkRequest &, const QByteArray &)" 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"/>
|
<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++"/>
|
||||||
|
|
@ -204,7 +208,10 @@
|
||||||
|
|
||||||
<value-type name="QHostAddress" hash-function="qHash">
|
<value-type name="QHostAddress" hash-function="qHash">
|
||||||
<enum-type name="SpecialAddress"/>
|
<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="setAddress(quint8*)" remove="all" />
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QHostInfo">
|
<value-type name="QHostInfo">
|
||||||
|
|
@ -219,21 +226,60 @@
|
||||||
<value-type name="QNetworkAddressEntry" />
|
<value-type name="QNetworkAddressEntry" />
|
||||||
|
|
||||||
<value-type name="QNetworkInterface">
|
<value-type name="QNetworkInterface">
|
||||||
<enum-type name="InterfaceFlag" flags="QNetworkInterface::InterfaceFlags"/>
|
<enum-type name="InterfaceFlag" flags="InterfaceFlags"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QNetworkProxy">
|
<value-type name="QNetworkProxy">
|
||||||
<enum-type name="Capability"/>
|
<enum-type name="Capability" flags="Capabilities" />
|
||||||
<enum-type name="ProxyType"/>
|
<enum-type name="ProxyType"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
|
<object-type name="QNetworkProxyFactory" />
|
||||||
|
<value-type name="QNetworkProxyQuery">
|
||||||
|
<enum-type name="QueryType" />
|
||||||
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QUrlInfo">
|
<value-type name="QUrlInfo">
|
||||||
<enum-type name="PermissionSpec"/>
|
<enum-type name="PermissionSpec"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QIPv6Address">
|
<value-type name="QIPv6Address">
|
||||||
<modify-function signature="operator[](int)const" remove="all" />
|
<add-function signature="__len__">
|
||||||
<modify-function signature="operator[](int)" remove="all" />
|
<inject-code class="target" position="beginning">
|
||||||
|
return 16;
|
||||||
|
</inject-code>
|
||||||
|
</add-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" />
|
||||||
|
|
@ -251,37 +297,20 @@
|
||||||
<enum-type name="KnownHeaders"/>
|
<enum-type name="KnownHeaders"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
|
|
||||||
<value-type name="QSslCipher"/>
|
|
||||||
<value-type name="QSslError">
|
|
||||||
<enum-type name="SslError"/>
|
|
||||||
</value-type>
|
|
||||||
<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"/>
|
||||||
-->
|
-->
|
||||||
<enum-type name="QSslCertificate::SubjectInfo"/>
|
<enum-type name="QSslCertificate::SubjectInfo"/>
|
||||||
|
|
||||||
<value-type name="QSslConfiguration"/>
|
|
||||||
|
|
||||||
<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="waitForEncrypted(int)" allow-thread="yes" />
|
|
||||||
</object-type>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Qt 4.7 -->
|
<!-- Qt 4.7 -->
|
||||||
<value-type name="QNetworkConfiguration" since="4.7">
|
<value-type name="QNetworkConfiguration" since="4.7">
|
||||||
<enum-type name="BearerType" />
|
<enum-type name="BearerType" />
|
||||||
<enum-type name="Purpose" since="4.7"/>
|
<enum-type name="Purpose" since="4.7"/>
|
||||||
<enum-type name="StateFlag" flags="QNetworkConfiguration::StateFlags" since="4.7"/>
|
<enum-type name="StateFlag" flags="StateFlags" since="4.7"/>
|
||||||
<enum-type name="Type" since="4.7"/>
|
<enum-type name="Type" since="4.7"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
<object-type name="QNetworkConfigurationManager" since="4.7">
|
<object-type name="QNetworkConfigurationManager" since="4.7">
|
||||||
<enum-type name="Capability" flags="QNetworkConfigurationManager::Capabilities" since="4.7"/>
|
<enum-type name="Capability" flags="Capabilities" since="4.7"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QNetworkSession" since="4.7">
|
<object-type name="QNetworkSession" since="4.7">
|
||||||
<enum-type name="SessionError" since="4.7"/>
|
<enum-type name="SessionError" since="4.7"/>
|
||||||
|
|
@ -293,4 +322,23 @@
|
||||||
<value-type name="QNetworkCacheMetaData"/>
|
<value-type name="QNetworkCacheMetaData"/>
|
||||||
|
|
||||||
<suppress-warning text="Shadowing: QAbstractSocket::*"/>
|
<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">
|
||||||
|
<enum-type name="SslMode"/>
|
||||||
|
<enum-type name="PeerVerifyMode"/>
|
||||||
|
<modify-function signature="connectToHostEncrypted(const QString&, quint16, QFlags<QIODevice::OpenModeFlag>)" allow-thread="yes" />
|
||||||
|
<modify-function signature="waitForEncrypted(int)" allow-thread="yes" />
|
||||||
|
</object-type>
|
||||||
|
<!-- The above entries may be present in the system or not. Keep this section organized. -->
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ set(QtOpenGL_SRC
|
||||||
${QtOpenGL_47_SRC}
|
${QtOpenGL_47_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtOpenGL_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtOpenGL_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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}
|
set(QtOpenGL_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,26 @@
|
||||||
<typesystem package="PySide.QtOpenGL">
|
<typesystem package="PySide.QtOpenGL">
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
|
<primitive-type name="GLbitfield"/>
|
||||||
|
<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"/>
|
||||||
|
|
||||||
<rejection class="QGLColormap::QGLColormapData"/>
|
<rejection class="QGLColormap::QGLColormapData"/>
|
||||||
<rejection class="QGLContext" field-name="currentCtx"/>
|
<rejection class="QGLContext" field-name="currentCtx"/>
|
||||||
|
|
||||||
<namespace-type name="QGL">
|
<namespace-type name="QGL">
|
||||||
<enum-type name="FormatOption" flags="QGL::FormatOptions" force-integer="yes"/>
|
<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>
|
||||||
|
|
@ -39,11 +54,12 @@
|
||||||
|
|
||||||
<value-type name="QGLFormat">
|
<value-type name="QGLFormat">
|
||||||
<enum-type name="OpenGLContextProfile" since="4.7"/>
|
<enum-type name="OpenGLContextProfile" since="4.7"/>
|
||||||
<enum-type name="OpenGLVersionFlag" flags="QGLFormat::OpenGLVersionFlags"/>
|
<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="QGLContext::BindOptions"/>
|
<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>
|
||||||
|
|
@ -51,16 +67,10 @@
|
||||||
<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>
|
||||||
<object-type name="QGLFramebufferObject">
|
<object-type name="QGLFramebufferObject">
|
||||||
<enum-type name="Attachment"/>
|
<enum-type name="Attachment"/>
|
||||||
|
|
@ -83,24 +93,582 @@
|
||||||
<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">
|
||||||
<enum-type name="ShaderTypeBit" flags="QGLShader::ShaderType"/>
|
<enum-type name="ShaderTypeBit" flags="ShaderType"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QGLShaderProgram">
|
|
||||||
<!-- use QMatrixZxY overloads -->
|
<template name="callArrayFunction">
|
||||||
<modify-function signature="setUniformValue(int, Array)" remove="all" />
|
int _size = PySequence_Size(%PYARG_2);
|
||||||
<modify-function signature="setUniformValue(const char*, Array)" remove="all" />
|
if (_size) {
|
||||||
<modify-function signature="setAttributeValue(int,const float*,int,int)" remove="all" />
|
$ATTR_TYPE *_list = new $ATTR_TYPE[_size];
|
||||||
<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" />
|
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_2, "Failed to parse sequence with type %VECTOR_TYPE."));
|
||||||
<modify-function signature="setAttributeArray(const char*, uint, const void*, int, int)" remove="all" since="4.7" />
|
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 -->
|
||||||
|
|
@ -110,25 +678,29 @@
|
||||||
<enum-type name="UsagePattern" 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)
|
|
||||||
size = %1.size();
|
|
||||||
%CPPSELF.allocate((const void*) %1.data(), 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)">
|
||||||
|
|
@ -144,21 +716,21 @@
|
||||||
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)
|
|
||||||
size = %2.size();
|
|
||||||
%CPPSELF.write(%1, (const void*) %2.data(), size);
|
%CPPSELF.write(%1, (const void*) %2.data(), size);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
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,10 +22,10 @@ ${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}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtScript_typesystem_path "${QtCore_SOURCE_DIR}")
|
set(QtScript_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
set(QtScript_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtScript_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScript
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -38,18 +38,78 @@
|
||||||
<enum-type name="Extension"/>
|
<enum-type name="Extension"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QScriptEngine">
|
<object-type name="QScriptEngine">
|
||||||
<enum-type name="QObjectWrapOption" flags="QScriptEngine::QObjectWrapOptions"/>
|
<enum-type name="QObjectWrapOption" flags="QObjectWrapOptions"/>
|
||||||
<enum-type name="ValueOwnership"/>
|
<enum-type name="ValueOwnership"/>
|
||||||
|
<!-- Not supported BUG #957-->
|
||||||
|
<modify-function signature="scriptValueFromQMetaObject()" remove="all" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QScriptExtensionInterface"/>
|
<object-type name="QScriptExtensionInterface"/>
|
||||||
<object-type name="QScriptExtensionPlugin"/>
|
<object-type name="QScriptExtensionPlugin"/>
|
||||||
<value-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">
|
||||||
<enum-type name="PropertyFlag" flags="QScriptValue::PropertyFlags"/>
|
<modify-argument index="1">
|
||||||
<enum-type name="ResolveFlag" flags="QScriptValue::ResolveFlags"/>
|
<remove-argument/>
|
||||||
<enum-type name="SpecialValue"/>
|
</modify-argument>
|
||||||
|
<inject-code class="target" position="beginning">
|
||||||
|
<insert-template name="fix_bool*"/>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
<object-type name="QScriptValueIterator"/>
|
<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,7 +5,7 @@ set(QtScriptTools_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/qscriptenginedebugger_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtScriptTools/qscriptenginedebugger_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtScriptTools_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtScript_SOURCE_DIR}${PATH_SEP}${QtScriptTools_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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}")
|
||||||
|
|
||||||
set(QtScriptTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtScriptTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
<object-type name="QScriptEngineDebugger">
|
<object-type name="QScriptEngineDebugger">
|
||||||
<enum-type name="DebuggerAction"/>
|
<enum-type name="DebuggerAction"/>
|
||||||
<enum-type name="DebuggerState"/>
|
<enum-type name="DebuggerState" since="4.6"/>
|
||||||
<enum-type name="DebuggerWidget"/>
|
<enum-type name="DebuggerWidget"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QScriptEngine" location="global"/>
|
<include file-name="QScriptEngine" location="global"/>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ set(QtSql_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSql/qtsql_module_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtSql_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtSql_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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}
|
set(QtSql_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<namespace-type name="QSql">
|
<namespace-type name="QSql">
|
||||||
<enum-type name="Location"/>
|
<enum-type name="Location"/>
|
||||||
<enum-type name="ParamTypeFlag" flags="QSql::ParamType"/>
|
<enum-type name="ParamTypeFlag" flags="ParamType"/>
|
||||||
<enum-type name="TableType"/>
|
<enum-type name="TableType"/>
|
||||||
<enum-type name="NumericalPrecisionPolicy"/>
|
<enum-type name="NumericalPrecisionPolicy"/>
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
|
|
@ -113,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">
|
||||||
|
|
@ -143,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" />
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ ${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
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtSvg_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${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}
|
set(QtSvg_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -27,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,11 +1,20 @@
|
||||||
project(QtTest)
|
project(QtTest)
|
||||||
|
|
||||||
|
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
|
||||||
|
set(QtTest_46_SRC "")
|
||||||
|
else()
|
||||||
|
set(QtTest_46_SRC
|
||||||
|
${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
|
||||||
|
${QtTest_46_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtTest_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${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}
|
set(QtTest_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -49,13 +49,15 @@
|
||||||
<rejection class="QTest" function-name="toString<uint>"/>
|
<rejection class="QTest" function-name="toString<uint>"/>
|
||||||
<rejection class="QTest" function-name="toString<ulong>"/>
|
<rejection class="QTest" function-name="toString<ulong>"/>
|
||||||
<rejection class="QTest" function-name="toString<ushort>"/>
|
<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"/>
|
<enum-type name="AttributeIndex" since="4.6"/>
|
||||||
<enum-type name="KeyAction"/>
|
<enum-type name="KeyAction"/>
|
||||||
<enum-type name="LogElementType"/>
|
<enum-type name="LogElementType" since="4.6"/>
|
||||||
<enum-type name="MouseAction"/>
|
<enum-type name="MouseAction"/>
|
||||||
<enum-type name="QBenchmarkMetric" since="4.7"/>
|
<enum-type name="QBenchmarkMetric" since="4.7"/>
|
||||||
<enum-type name="SkipMode"/>
|
<enum-type name="SkipMode"/>
|
||||||
|
|
@ -64,10 +66,36 @@
|
||||||
<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">-->
|
||||||
|
<rejection class="QTouchEventSequence"/>
|
||||||
|
<object-type name="PySideQTouchEventSequence" target-lang-name="QTouchEventSequence" since="4.6" >
|
||||||
|
<modify-function signature="press(int, const QPoint&, QWidget*)">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<define-ownership class="target" owner="default"/>
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
|
<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>
|
</namespace-type>
|
||||||
|
|
||||||
<rejection class="QTouchEventSequence"/>
|
|
||||||
|
|
||||||
<rejection class="QSignalSpy"/>
|
<rejection class="QSignalSpy"/>
|
||||||
<rejection class="QTestEventList"/>
|
<rejection class="QTestEventList"/>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ set(QtUiTools_SRC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/quiloader_wrapper.cpp
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtUiTools/quiloader_wrapper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtUiTools_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtXml_SOURCE_DIR}${PATH_SEP}${QtUiTools_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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}
|
set(QtUiTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
|
|
@ -23,10 +23,10 @@ set(QtUiTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
set(QtUiTools_libraries pyside
|
set(QtUiTools_libraries pyside
|
||||||
uiplugin
|
uiplugin
|
||||||
${SHIBOKEN_PYTHON_LIBRARIES}
|
${SHIBOKEN_PYTHON_LIBRARIES}
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTUITOOLS_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY}
|
|
||||||
${QT_QTDESIGNER_LIBRARY}
|
${QT_QTDESIGNER_LIBRARY}
|
||||||
${QT_QTUITOOLS_LIBRARY})
|
${QT_QTCORE_LIBRARY}
|
||||||
|
${QT_QTGUI_LIBRARY})
|
||||||
set(QtUiTools_deps QtGui QtXml)
|
set(QtUiTools_deps QtGui QtXml)
|
||||||
create_pyside_module(QtUiTools
|
create_pyside_module(QtUiTools
|
||||||
QtUiTools_include_dirs
|
QtUiTools_include_dirs
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,13 @@ inline void registerCustomWidget(PyObject* obj)
|
||||||
if (plugin == 0) {
|
if (plugin == 0) {
|
||||||
foreach(QObject* o, QPluginLoader::staticInstances()) {
|
foreach(QObject* o, QPluginLoader::staticInstances()) {
|
||||||
plugin = qobject_cast<PyCustomWidgets*>(o);
|
plugin = qobject_cast<PyCustomWidgets*>(o);
|
||||||
if (o)
|
if (plugin)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!plugin)
|
if (!plugin)
|
||||||
qDebug() << "Fail to load uiloader plugin";
|
qDebug() << "Failed to load uiloader plugin.";
|
||||||
else
|
else
|
||||||
plugin->registerWidgetType(obj);
|
plugin->registerWidgetType(obj);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
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,77 +0,0 @@
|
||||||
/*
|
|
||||||
* Based on code provided by:
|
|
||||||
* Antonio Valentino <antonio.valentino at tiscali.it>
|
|
||||||
* Frédéric <frederic.mantegazza at gbiloba.org>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <shiboken.h>
|
|
||||||
|
|
||||||
static void
|
|
||||||
_populate_parent(PyObject* pyParent, QObject *parent)
|
|
||||||
{
|
|
||||||
if (parent->children().isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
foreach(QObject *child, parent->children()) {
|
|
||||||
QString name(child->objectName());
|
|
||||||
if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
|
|
||||||
bool has_attr = PyObject_HasAttrString(pyParent, qPrintable(name));
|
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QObject*>::toPython(child));
|
|
||||||
if (!has_attr)
|
|
||||||
PyObject_SetAttrString(pyParent, qPrintable(name), pyChild);
|
|
||||||
|
|
||||||
Shiboken::Object::setParent(pyParent, pyChild);
|
|
||||||
_populate_parent(pyChild, qobject_cast<QObject*>(child));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject*
|
|
||||||
quiloader_load_ui_from_device(QUiLoader* self, QIODevice* dev, QWidget *parent)
|
|
||||||
{
|
|
||||||
QWidget *w = self->load(dev, parent);
|
|
||||||
if (w) {
|
|
||||||
QObject* _parent = parent;
|
|
||||||
if (!_parent)
|
|
||||||
_parent = w;
|
|
||||||
|
|
||||||
if (parent && parent->layout())
|
|
||||||
parent->layout()->deleteLater();
|
|
||||||
|
|
||||||
PyObject* pyParent = Shiboken::Converter<QWidget*>::toPython(w);
|
|
||||||
_populate_parent(pyParent, _parent);
|
|
||||||
|
|
||||||
return pyParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!PyErr_Occurred())
|
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyObject*
|
|
||||||
quiloader_load_ui(QUiLoader* self, const QString &ui_file, QWidget *parent)
|
|
||||||
{
|
|
||||||
QFile fd(ui_file);
|
|
||||||
|
|
||||||
if (fd.exists(ui_file) && fd.open(QFile::ReadOnly)) {
|
|
||||||
QWidget* w = self->load(&fd, parent);
|
|
||||||
fd.close();
|
|
||||||
if (w != 0) {
|
|
||||||
QObject *_parent = parent;
|
|
||||||
if (!_parent)
|
|
||||||
_parent = w;
|
|
||||||
|
|
||||||
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(_parent));
|
|
||||||
if (parent && parent->layout())
|
|
||||||
parent->layout()->deleteLater();
|
|
||||||
|
|
||||||
_populate_parent(pyParent, _parent);
|
|
||||||
|
|
||||||
return Shiboken::Converter<QWidget*>::toPython(w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!PyErr_Occurred())
|
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!--
|
<!--
|
||||||
This file is part of PySide project.
|
This file is part of PySide project.
|
||||||
Copyright (C) 2009-2010 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>
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="glue/plugins.h" location="local"/>
|
<include file-name="glue/plugins.h" location="local"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
|
<inject-code class="native" position="beginning" file="glue/uitools_loadui.cpp"/>
|
||||||
<inject-code>
|
<inject-code>
|
||||||
Q_IMPORT_PLUGIN(uiplugin);
|
Q_IMPORT_PLUGIN(uiplugin);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
|
|
@ -69,62 +70,57 @@
|
||||||
%CPPSELF.addPluginPath(""); // force reload widgets
|
%CPPSELF.addPluginPath(""); // force reload widgets
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
<modify-function signature="createAction(QObject *, const QString&)">
|
<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*)">
|
||||||
<extra-includes>
|
|
||||||
<include file-name="glue/uitools_loadui.h" location="local"/>
|
|
||||||
</extra-includes>
|
|
||||||
<modify-argument index="2">
|
<modify-argument index="2">
|
||||||
<replace-default-expression with="0" />
|
<replace-default-expression with="0" />
|
||||||
<rename to="parentWidget" />
|
<rename to="parentWidget" />
|
||||||
</modify-argument>
|
</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>
|
||||||
//Avoid calling the original function: %CPPSELF.load
|
// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
|
||||||
%PYARG_0 = quiloader_load_ui_from_device(%CPPSELF, %1, %2);
|
%PYARG_0 = QUiLoadedLoadUiFromDevice(%CPPSELF, %1, %2);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
||||||
<!-- Syntax sugar -->
|
<!-- Syntax sugar -->
|
||||||
<add-function signature="load(QString, QWidget*)" return-type="QWidget*">
|
<add-function signature="load(QString, QWidget*)" return-type="QWidget*">
|
||||||
<extra-includes>
|
|
||||||
<include file-name="glue/uitools_loadui.h" location="local"/>
|
|
||||||
</extra-includes>
|
|
||||||
<modify-argument index="2">
|
<modify-argument index="2">
|
||||||
<replace-default-expression with="0" />
|
<replace-default-expression with="0" />
|
||||||
<rename to="parentWidget" />
|
<rename to="parentWidget" />
|
||||||
</modify-argument>
|
</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>
|
||||||
//Avoid calling the original function: %CPPSELF.load
|
// Avoid calling the original function: %CPPSELF.%FUNCTION_NAME()
|
||||||
%PYARG_0 = quiloader_load_ui(%CPPSELF, %1, %2);
|
%PYARG_0 = QUiLoaderLoadUiFromFileName(%CPPSELF, %1, %2);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</add-function>
|
</add-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ 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 ()
|
endif ()
|
||||||
|
|
@ -20,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
|
||||||
|
|
@ -31,7 +37,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp
|
||||||
${QtWebKit_46_SRC}
|
${QtWebKit_46_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtWebKit_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtNetwork_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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}
|
set(QtWebkit_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebkit/
|
||||||
${QT_INCLUDE_DIR}
|
${QT_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,10 @@
|
||||||
|
|
||||||
<namespace-type name="WebCore"/>
|
<namespace-type name="WebCore"/>
|
||||||
|
|
||||||
<!-- 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">
|
||||||
<reference-count action="add"/>
|
<reference-count action="set"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
<modify-function signature="page() const">
|
<modify-function signature="page() const">
|
||||||
|
|
@ -47,15 +44,26 @@
|
||||||
<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"/>
|
<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>
|
||||||
<modify-function signature="print(QPrinter*)const" rename="print_" />
|
<modify-function signature="print(QPrinter*)const" rename="print_" />
|
||||||
<!-- TODO QMultiMap isn't implemented yet -->
|
<modify-function signature="metaData()const">
|
||||||
<modify-function signature="metaData()const" remove="all" />
|
<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">
|
||||||
|
|
@ -65,32 +73,120 @@
|
||||||
<enum-type name="WebGraphic"/>
|
<enum-type name="WebGraphic"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QWebPage">
|
<object-type name="QWebPage">
|
||||||
<enum-type name="ErrorDomain"/>
|
<enum-type name="FindFlag" flags="FindFlags"/>
|
||||||
<enum-type name="FindFlag" flags="QWebPage::FindFlags"/>
|
|
||||||
<enum-type name="LinkDelegationPolicy"/>
|
<enum-type name="LinkDelegationPolicy"/>
|
||||||
<enum-type name="NavigationType"/>
|
<enum-type name="NavigationType"/>
|
||||||
<enum-type name="WebAction"/>
|
<enum-type name="WebAction"/>
|
||||||
<enum-type name="WebWindowType"/>
|
<enum-type name="WebWindowType"/>
|
||||||
<!-- Qt 4.6 -->
|
<!-- Qt 4.6 -->
|
||||||
<enum-type name="ErrorDomain"/>
|
<enum-type name="ErrorDomain" since="4.6"/>
|
||||||
<enum-type name="Extension"/>
|
<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-function signature="javaScriptPrompt(QWebFrame*,const QString &,const QString &,QString*)">
|
||||||
<modify-argument index="return">
|
|
||||||
<replace-type modified-type="PyObject"/>
|
|
||||||
</modify-argument>
|
|
||||||
<modify-argument index="4">
|
<modify-argument index="4">
|
||||||
<remove-argument />
|
<remove-argument />
|
||||||
|
<conversion-rule class="native">
|
||||||
|
QString _local;
|
||||||
|
QString* %4 = &_local;
|
||||||
|
</conversion-rule>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="(retval, result)"/>
|
<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-argument>
|
||||||
<inject-code class="target" position="end">
|
|
||||||
QString str;
|
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, &str);
|
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, str);
|
|
||||||
</inject-code>
|
|
||||||
</modify-function>
|
</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>
|
||||||
<object-type name="QWebHistory"/>
|
<object-type name="QWebHistory"/>
|
||||||
<object-type name="QWebHistoryInterface"/>
|
<object-type name="QWebHistoryInterface"/>
|
||||||
|
|
@ -98,6 +194,12 @@
|
||||||
<enum-type name="Extension"/>
|
<enum-type name="Extension"/>
|
||||||
<value-type name="Plugin"/>
|
<value-type name="Plugin"/>
|
||||||
<value-type name="MimeType"/>
|
<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>
|
</object-type>
|
||||||
<value-type name="QWebDatabase"/>
|
<value-type name="QWebDatabase"/>
|
||||||
<value-type name="QWebHistoryItem"/>
|
<value-type name="QWebHistoryItem"/>
|
||||||
|
|
@ -105,10 +207,26 @@
|
||||||
<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">
|
||||||
<enum-type name="StyleResolveStrategy"/>
|
<enum-type name="StyleResolveStrategy"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="QWebElementCollection"/>
|
<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>
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ ${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
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtXml_typesystem_path "${QtCore_SOURCE_DIR}")
|
set(QtXml_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
set(QtXml_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtXml_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtXml
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -27,33 +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"/>
|
||||||
|
|
||||||
<value-type name="QDomAttr">
|
<value-type name="QDomAttr" />
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
<value-type name="QDomCDATASection" />
|
||||||
</value-type>
|
<value-type name="QDomCharacterData" />
|
||||||
|
<value-type name="QDomComment" />
|
||||||
<value-type name="QDomCDATASection">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomCharacterData">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomComment">
|
|
||||||
<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;
|
||||||
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_errorMsg_, &_errorLine_, &_errorColumn_);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _errorColumn_);
|
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_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"/>
|
|
||||||
|
|
||||||
<!-- 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">
|
||||||
|
|
@ -217,22 +210,10 @@
|
||||||
</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" />
|
||||||
</value-type>
|
<value-type name="QDomEntity" />
|
||||||
|
<value-type name="QDomEntityReference" />
|
||||||
<value-type name="QDomDocumentType">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomEntity">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomEntityReference">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomImplementation">
|
<value-type name="QDomImplementation">
|
||||||
<enum-type name="InvalidDataPolicy"/>
|
<enum-type name="InvalidDataPolicy"/>
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
@ -247,30 +228,13 @@
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QDomNodeList" />
|
<value-type name="QDomNodeList" />
|
||||||
|
<value-type name="QDomNotation" />
|
||||||
|
<value-type name="QDomProcessingInstruction" />
|
||||||
|
|
||||||
<value-type name="QDomNotation">
|
<value-type name="QDomText" />
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomProcessingInstruction">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<value-type name="QDomText">
|
|
||||||
<modify-function signature="nodeType()const" remove="all"/>
|
|
||||||
</value-type>
|
|
||||||
|
|
||||||
<object-type name="QXmlParseException"/>
|
<object-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"/>
|
||||||
|
|
||||||
<object-type name="QXmlNamespaceSupport"/>
|
<object-type name="QXmlNamespaceSupport"/>
|
||||||
|
|
@ -308,9 +272,13 @@
|
||||||
</conversion-rule>
|
</conversion-rule>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
||||||
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _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>
|
||||||
|
|
@ -331,25 +299,19 @@
|
||||||
</conversion-rule>
|
</conversion-rule>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
||||||
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _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">
|
|
||||||
<enum-type name="Error" />
|
|
||||||
<enum-type name="TokenType" />
|
|
||||||
</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"/>
|
||||||
|
|
@ -452,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,7 +26,7 @@ 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}")
|
set(QtXmlPatterns_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}")
|
||||||
set(QtXmlPatterns_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(QtXmlPatterns_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTXMLPATTERNS_INCLUDE_DIR}
|
${QT_QTXMLPATTERNS_INCLUDE_DIR}
|
||||||
|
|
|
||||||
|
|
@ -21,15 +21,16 @@
|
||||||
<typesystem package="PySide.QtXmlPatterns">
|
<typesystem package="PySide.QtXmlPatterns">
|
||||||
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
<load-typesystem name="typesystem_core.xml" generate="no"/>
|
||||||
|
|
||||||
<object-type name="QXmlSchema"/> <!-- Qt scoped pointer does not allow declare this as value type -->
|
<object-type name="QXmlSchema" since="4.6" /> <!-- Qt scoped pointer does not allow declare this as value type -->
|
||||||
<object-type name="QXmlSchemaValidator">
|
<object-type name="QXmlSchemaValidator" since="4.6">
|
||||||
<modify-function signature="schema() const">
|
<modify-function signature="schema() const">
|
||||||
<modify-argument index="return">
|
<modify-argument index="return">
|
||||||
<replace-type modified-type="QXmlSchema*"/>
|
<replace-type modified-type="QXmlSchema*"/>
|
||||||
<define-ownership owner="target"/>
|
<define-ownership owner="target"/>
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code>
|
<inject-code>
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QXmlSchema*](new QXmlSchema(%CPPSELF.schema()));
|
QXmlSchema* %0 = new QXmlSchema(%CPPSELF.schema());
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[QXmlSchema*](%0);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
@ -44,6 +45,7 @@
|
||||||
<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" />
|
||||||
|
|
@ -55,14 +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">
|
||||||
<enum-type name="Axis"/>
|
|
||||||
<enum-type name="DocumentOrder" />
|
<enum-type name="DocumentOrder" />
|
||||||
<enum-type name="NodeKind" />
|
<enum-type name="NodeKind" />
|
||||||
<modify-function signature="internalPointer()const" remove="all" />
|
<!-- ### Qt internal methods -->
|
||||||
<!-- 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" />
|
||||||
|
|
@ -76,15 +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" />
|
<enum-type name="QueryLanguage" />
|
||||||
|
<modify-function signature="evaluateTo(QStringList*)const" remove="all" />
|
||||||
|
<modify-function signature="evaluateTo(QString*)const" remove="all" />
|
||||||
|
<!-- ### -->
|
||||||
</value-type>
|
</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,5 +1,3 @@
|
||||||
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
|
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
|
||||||
import private
|
|
||||||
|
|
||||||
__version__ = "@BINDING_API_VERSION_FULL@"
|
__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@)
|
__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_RELEASE_LEVEL@", @BINDING_API_SERIAL@)
|
||||||
|
|
|
||||||
1197
PySide/global.h.in
1197
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-2010 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>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ if (NOT QT_PHONON_INCLUDE_DIR AND CMAKE_HOST_APPLE)
|
||||||
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
|
set(QT_PHONON_INCLUDE_DIR "${QT_LIBRARY_DIR}/phonon.framework/Headers")
|
||||||
endif ()
|
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
|
||||||
|
|
@ -42,11 +46,10 @@ ${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}
|
||||||
)
|
)
|
||||||
|
|
||||||
check_qt_class("phonon" "VideoCaptureDevice" phonon_SRC "Phonon" "ObjectDescription")
|
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_typesystem_path "${QtCore_SOURCE_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${phonon_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}")
|
|
||||||
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
set(phonon_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_QTCORE_INCLUDE_DIR}
|
${QT_QTCORE_INCLUDE_DIR}
|
||||||
${QT_QTGUI_INCLUDE_DIR}
|
${QT_QTGUI_INCLUDE_DIR}
|
||||||
|
|
@ -70,4 +73,6 @@ create_pyside_module(phonon
|
||||||
phonon_deps
|
phonon_deps
|
||||||
phonon_typesystem_path
|
phonon_typesystem_path
|
||||||
phonon_SRC
|
phonon_SRC
|
||||||
"")
|
""
|
||||||
|
""
|
||||||
|
phonon_DROPPED_ENTRIES)
|
||||||
|
|
|
||||||
|
|
@ -78,10 +78,12 @@
|
||||||
<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">
|
<inject-code class="target" position="end">
|
||||||
PySideSignal* signal_item;
|
PySideSignal* signal_item;
|
||||||
|
|
||||||
|
|
@ -102,6 +104,7 @@
|
||||||
<enum-type name="MetaData"/>
|
<enum-type name="MetaData"/>
|
||||||
<enum-type name="ObjectDescriptionType"/>
|
<enum-type name="ObjectDescriptionType"/>
|
||||||
<enum-type name="State"/>
|
<enum-type name="State"/>
|
||||||
|
<enum-type name="CaptureCategory"/>
|
||||||
|
|
||||||
<object-type name="AbstractVideoOutput"/>
|
<object-type name="AbstractVideoOutput"/>
|
||||||
<object-type name="AddonInterface">
|
<object-type name="AddonInterface">
|
||||||
|
|
@ -126,22 +129,20 @@
|
||||||
<object-type name="VolumeFaderInterface"/>
|
<object-type name="VolumeFaderInterface"/>
|
||||||
|
|
||||||
<value-type name="EffectParameter">
|
<value-type name="EffectParameter">
|
||||||
<enum-type name="Hint" flags="Phonon::EffectParameter::Hints"/>
|
<enum-type name="Hint" flags="Hints"/>
|
||||||
<modify-function signature="EffectParameter()" remove="all"/> <!-- internal -->
|
<!-- ### Internal methods and ctors -->
|
||||||
<modify-function signature="operator<(const Phonon::EffectParameter &)const" remove="all"/> <!-- internal -->
|
<modify-function signature="EffectParameter()" remove="all"/>
|
||||||
<modify-function signature="operator>(const Phonon::EffectParameter &)const" remove="all"/> <!-- internal -->
|
<modify-function signature="operator<(const Phonon::EffectParameter &)const" remove="all"/>
|
||||||
<modify-function signature="id()const" remove="all"/> <!-- internal -->
|
<modify-function signature="operator>(const Phonon::EffectParameter &)const" remove="all"/>
|
||||||
<modify-function signature="operator=(Phonon::EffectParameter)" remove="all"/> <!-- Covered by copy constructor -->
|
<modify-function signature="id()const" remove="all"/>
|
||||||
<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="MediaSource">
|
<value-type name="MediaSource">
|
||||||
<enum-type name="Type"/>
|
<enum-type name="Type"/>
|
||||||
<modify-function signature="operator=(Phonon::MediaSource)" remove="all"/> <!-- Covered by copy constructor -->
|
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="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"/>
|
||||||
|
|
@ -170,37 +171,90 @@
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="ObjectDescription" generate="no"/>
|
<value-type name="ObjectDescription" generate="no"/>
|
||||||
<value-type name="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="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">
|
<value-type name="AudioCaptureDevice">
|
||||||
<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::AudioCaptureDevice"/>
|
||||||
</value-type>
|
</modify-argument>
|
||||||
<value-type name="VideoCaptureDevice">
|
</modify-function>
|
||||||
<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::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>
|
||||||
<value-type name="AudioChannelDescription">
|
<value-type name="AudioChannelDescription">
|
||||||
<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::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>
|
||||||
<value-type name="SubtitleDescription">
|
<value-type name="SubtitleDescription">
|
||||||
<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::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>
|
</value-type>
|
||||||
|
|
||||||
|
|
||||||
<object-type name="ObjectDescriptionModel" generate="no"/>
|
<object-type name="ObjectDescriptionModel" generate="no"/>
|
||||||
<object-type name="EffectDescriptionModel" />
|
<object-type name="EffectDescriptionModel" />
|
||||||
<object-type name="AudioOutputDeviceModel" />
|
<object-type name="AudioOutputDeviceModel" />
|
||||||
|
|
@ -211,7 +265,8 @@
|
||||||
<object-type name="Effect"/>
|
<object-type name="Effect"/>
|
||||||
<object-type name="EffectWidget"/>
|
<object-type name="EffectWidget"/>
|
||||||
<object-type name="MediaController">
|
<object-type name="MediaController">
|
||||||
<enum-type name="Feature" flags="Phonon::MediaController::Features"/>
|
<enum-type name="Feature" flags="Features"/>
|
||||||
|
<enum-type name="NavigationMenu"/>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="MediaObject" />
|
<object-type name="MediaObject" />
|
||||||
<object-type name="SeekSlider">
|
<object-type name="SeekSlider">
|
||||||
|
|
@ -236,6 +291,25 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
</namespace-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>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
import atexit
|
|
||||||
from QtCore import __moduleShutdown
|
|
||||||
|
|
||||||
atexit.register(__moduleShutdown)
|
|
||||||
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
|
||||||
|
|
@ -21,58 +21,89 @@
|
||||||
<typesystem>
|
<typesystem>
|
||||||
<template name="replace_child">
|
<template name="replace_child">
|
||||||
$CHILD_TYPE* oldChild = %CPPSELF.$FUNCTION_GET_OLD();
|
$CHILD_TYPE* oldChild = %CPPSELF.$FUNCTION_GET_OLD();
|
||||||
if (oldChild) {
|
if (oldChild && (oldChild != $CPPARG)) {
|
||||||
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[$CHILD_TYPE*](oldChild));
|
Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[$CHILD_TYPE*](oldChild));
|
||||||
Shiboken::Object::setParent(NULL, pyChild);
|
Shiboken::Object::setParent(0, pyChild);
|
||||||
|
Shiboken::Object::releaseOwnership(pyChild);
|
||||||
}
|
}
|
||||||
Shiboken::Object::setParent(%PYSELF, $PYARG);
|
Shiboken::Object::setParent(%PYSELF, $PYARG);
|
||||||
</template>
|
</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;
|
||||||
|
|
@ -102,56 +133,99 @@
|
||||||
|
|
||||||
<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_;
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&val_);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, val_);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&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*">
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e);
|
$TYPE a, b, c, d, e;
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%CPPSELF.%FUNCTION_NAME(&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">
|
||||||
PySide::AutoArrayPointer<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*">
|
||||||
|
|
@ -162,10 +236,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_arg,int*,int*">
|
<template name="fix_arg,int*,int*">
|
||||||
%RETURN_TYPE _ret;
|
%RETURN_TYPE _ret;
|
||||||
int a, b;
|
int a, b;
|
||||||
_ret = %CPPSELF.%FUNCTION_NAME(%1, &a, &b);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret, a, b);
|
_ret = %CPPSELF.%FUNCTION_NAME(%1, &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>
|
||||||
|
|
||||||
<template name="return_QString">
|
<template name="return_QString">
|
||||||
|
|
@ -173,19 +252,59 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="return_tuple_QValidator_QString_int">
|
<template name="return_tuple_QValidator_QString_int">
|
||||||
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, %1, %2);
|
%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>
|
||||||
|
|
||||||
<template name="return_for_QFileDialog">
|
<template name="return_for_QFileDialog">
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5);
|
%BEGIN_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, %4);
|
%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>
|
||||||
<template name="set_qapp_parent_for_orphan">
|
<template name="set_qapp_parent_for_orphan">
|
||||||
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
if (%PYARG_0 && (%PYARG_0 != Py_None)) {
|
||||||
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
||||||
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
|
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
||||||
|
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
|
||||||
|
}
|
||||||
</template>
|
</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__ -->
|
<!-- templates for __reduce__ -->
|
||||||
<template name="reduce_code">
|
<template name="reduce_code">
|
||||||
%PYARG_0 = Py_BuildValue("(N(%REDUCE_FORMAT))", PyObject_Type(%PYSELF), %REDUCE_ARGS);
|
%PYARG_0 = Py_BuildValue("(N(%REDUCE_FORMAT))", PyObject_Type(%PYSELF), %REDUCE_ARGS);
|
||||||
|
|
@ -206,7 +325,7 @@
|
||||||
<!-- Matrix Aux functions -->
|
<!-- Matrix Aux functions -->
|
||||||
<template name="matrix_constructor">
|
<template name="matrix_constructor">
|
||||||
if (PySequence_Size(%PYARG_1) == %SIZE) {
|
if (PySequence_Size(%PYARG_1) == %SIZE) {
|
||||||
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_1, "Fail to parse sequnce on %TYPE constructor."));
|
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_1, "Failed to parse sequence on %TYPE constructor."));
|
||||||
qreal values[%SIZE];
|
qreal values[%SIZE];
|
||||||
for(int i=0; i < %SIZE; i++) {
|
for(int i=0; i < %SIZE; i++) {
|
||||||
PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
|
PyObject *pv = PySequence_Fast_GET_ITEM(fast.object(), i);
|
||||||
|
|
@ -232,7 +351,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="matrix_transposed_function">
|
<template name="matrix_transposed_function">
|
||||||
return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](%CPPSELF.transposed());
|
%TRANSPOSED_TYPE transp = %CPPSELF.transposed();
|
||||||
|
return %CONVERTTOPYTHON[%TRANSPOSED_TYPE](transp);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Replace '#' for the argument number you want. -->
|
<!-- Replace '#' for the argument number you want. -->
|
||||||
|
|
@ -241,5 +361,68 @@
|
||||||
%PYARG_0 = %PYARG_#;
|
%PYARG_0 = %PYARG_#;
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</typesystem>
|
<!-- 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>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,18 @@
|
||||||
macro(create_pyside_module module_name module_include_dir module_libraries module_deps module_typesystem_path module_sources typesystem_name)
|
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(TOLOWER ${module_name} _module)
|
||||||
string(REGEX REPLACE ^qt "" _module ${_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})
|
if (NOT EXISTS ${typesystem_name})
|
||||||
set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
|
set(typesystem_path ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_${_module}.xml)
|
||||||
else()
|
else()
|
||||||
|
|
@ -8,25 +20,26 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${${module_sources}}
|
add_custom_command(OUTPUT ${${module_sources}}
|
||||||
COMMAND ${GENERATORRUNNER_BINARY} ${GENERATOR_EXTRA_FLAGS}
|
COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS}
|
||||||
${CMAKE_BINARY_DIR}/PySide/global.h
|
${pyside_BINARY_DIR}/pyside_global.h
|
||||||
--include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}
|
--include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}
|
||||||
--typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
|
--typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}
|
||||||
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
|
||||||
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
|
--license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
|
||||||
${typesystem_path}
|
${typesystem_path}
|
||||||
--api-version=${SUPPORTED_QT_VERSION}
|
--api-version=${SUPPORTED_QT_VERSION}
|
||||||
|
--drop-type-entries="${dropped_entries}"
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Running generator for ${module_name}...")
|
COMMENT "Running generator for ${module_name}...")
|
||||||
|
|
||||||
include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR})
|
include_directories(${module_name} ${${module_include_dir}} ${pyside_SOURCE_DIR})
|
||||||
add_library(${module_name} MODULE ${${module_sources}} ${${ARGN}})
|
add_library(${module_name} MODULE ${${module_sources}} ${${module_static_sources}})
|
||||||
set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
|
set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
|
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
|
||||||
set(${module_name}_suffix ".pyd")
|
set(${module_name}_suffix ".pyd")
|
||||||
else()
|
else()
|
||||||
set(${module_name}_suffix ".so")
|
set(${module_name}_suffix ${CMAKE_SHARED_MODULE_SUFFIX})
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(${module_name} ${${module_libraries}})
|
target_link_libraries(${module_name} ${${module_libraries}})
|
||||||
if(${module_deps})
|
if(${module_deps})
|
||||||
|
|
@ -43,29 +56,31 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
|
||||||
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
|
install(FILES ${typesystem_files} DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
#macro(check_qt_class_with_namespace module namespace class global_sources [namespace])
|
#macro(check_qt_class_with_namespace module namespace class optional_source_files dropped_entries [namespace] [module])
|
||||||
macro(check_qt_class module class global_sources)
|
macro(check_qt_class module class optional_source_files dropped_entries)
|
||||||
if (${ARGC} GREATER 3)
|
if (${ARGC} GREATER 4)
|
||||||
set (namespace ${ARGV3})
|
set (namespace ${ARGV4})
|
||||||
string(TOLOWER ${namespace} _namespace)
|
string(TOLOWER ${namespace} _namespace)
|
||||||
else ()
|
else ()
|
||||||
set (namespace "")
|
set (namespace "")
|
||||||
endif ()
|
endif ()
|
||||||
if (${ARGC} GREATER 4)
|
if (${ARGC} GREATER 5)
|
||||||
set (include_file ${ARGV4})
|
set (include_file ${ARGV5})
|
||||||
else ()
|
else ()
|
||||||
set (include_file ${module})
|
set (include_file ${class})
|
||||||
endif ()
|
endif ()
|
||||||
string(TOLOWER ${class} _class)
|
string(TOLOWER ${class} _class)
|
||||||
string(TOUPPER ${module} _module)
|
string(TOUPPER ${module} _module)
|
||||||
if (${namespace})
|
if (_namespace)
|
||||||
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
|
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_namespace}_${_class}_wrapper.cpp)
|
||||||
else ()
|
else ()
|
||||||
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
|
set(_cppfile ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module}/${_class}_wrapper.cpp)
|
||||||
endif ()
|
endif ()
|
||||||
if (DEFINED PYSIDE_${class})
|
if (DEFINED PYSIDE_${class})
|
||||||
if (PYSIDE_${class})
|
if (PYSIDE_${class})
|
||||||
list(APPEND ${global_sources} ${_cppfile})
|
list(APPEND ${optional_source_files} ${_cppfile})
|
||||||
|
else()
|
||||||
|
list(APPEND ${dropped_entries} PySide.${module}.${class})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if (NOT ${namespace} STREQUAL "" )
|
if (NOT ${namespace} STREQUAL "" )
|
||||||
|
|
@ -76,9 +91,8 @@ macro(check_qt_class module class global_sources)
|
||||||
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx)
|
set(SRC_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/test${class}.cxx)
|
||||||
file(WRITE ${SRC_FILE}
|
file(WRITE ${SRC_FILE}
|
||||||
"#include <${include_file}>\n"
|
"#include <${include_file}>\n"
|
||||||
"#include <typeinfo>\n"
|
|
||||||
"${NAMESPACE_USE}\n"
|
"${NAMESPACE_USE}\n"
|
||||||
"int main() { typeid(${class}); }\n"
|
"int main() { sizeof(${class}); }\n"
|
||||||
)
|
)
|
||||||
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
|
try_compile(Q_WORKS ${CMAKE_BINARY_DIR}
|
||||||
${SRC_FILE}
|
${SRC_FILE}
|
||||||
|
|
@ -92,9 +106,10 @@ macro(check_qt_class module class global_sources)
|
||||||
set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?")
|
set("PYSIDE_${class}" ${Q_WORKS} CACHE STRING "Has ${class} class been found?")
|
||||||
if(Q_WORKS)
|
if(Q_WORKS)
|
||||||
message(STATUS "Checking for ${class} in ${module} -- found")
|
message(STATUS "Checking for ${class} in ${module} -- found")
|
||||||
list(APPEND ${global_sources} ${_cppfile})
|
list(APPEND ${optional_source_files} ${_cppfile})
|
||||||
else()
|
else()
|
||||||
message(STATUS "Checking for ${class} in ${module} -- not found")
|
message(STATUS "Checking for ${class} in ${module} -- not found")
|
||||||
|
list(APPEND ${dropped_entries} PySide.${module}.${class})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,14 @@ add_custom_target(qdoc3
|
||||||
COMMENT "Running qdoc3 against Qt source code..."
|
COMMENT "Running qdoc3 against Qt source code..."
|
||||||
SOURCE "pyside.qdocconf")
|
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 html
|
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
|
||||||
|
|
@ -18,8 +23,8 @@ configure_file("conf.py.in" "rst/conf.py" @ONLY)
|
||||||
configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY)
|
configure_file(typesystem_doc.xml.in typesystem_doc.xml @ONLY)
|
||||||
|
|
||||||
add_custom_target("docrsts"
|
add_custom_target("docrsts"
|
||||||
COMMAND ${GENERATORRUNNER_BINARY} --generatorSet=qtdoc
|
COMMAND ${SHIBOKEN_BINARY} --generator-set=qtdoc
|
||||||
${pyside_BINARY_DIR}/global.h
|
${pyside_BINARY_DIR}/pyside_global.h
|
||||||
--include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}"
|
--include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}"
|
||||||
--api-version=${SUPPORTED_QT_VERSION}
|
--api-version=${SUPPORTED_QT_VERSION}
|
||||||
--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}"
|
--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}"
|
||||||
|
|
@ -27,7 +32,7 @@ add_custom_target("docrsts"
|
||||||
--documentation-only
|
--documentation-only
|
||||||
--documentation-data-dir=${DOC_DATA_DIR}
|
--documentation-data-dir=${DOC_DATA_DIR}
|
||||||
--output-directory=${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
|
||||||
--documentation-extra-sections-dir=${CMAKE_CURRENT_SOURCE_DIR}/extras
|
--documentation-extra-sections-dir=${CMAKE_CURRENT_SOURCE_DIR}/extras
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
|
||||||
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
|
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
|
||||||
|
|
|
||||||
24
doc/_templates/index.html
vendored
24
doc/_templates/index.html
vendored
|
|
@ -11,8 +11,19 @@
|
||||||
|
|
||||||
<p>PySide is built using the <a href="http://www.pyside.org/docs/shiboken">Shiboken</a> binding generator.</p>
|
<p>PySide is built using the <a href="http://www.pyside.org/docs/shiboken">Shiboken</a> binding generator.</p>
|
||||||
|
|
||||||
|
<h2>Notes</h2>
|
||||||
|
|
||||||
|
<h3>About 0 vs None</h3>
|
||||||
|
|
||||||
|
<p>The PySide class reference documentation is automatically generated from the original Qt documentation for C++, some parts were tuned to fit the Python world. However, it's not possible to rewrite all Qt docs as it would require a really huge effort, so if the documentation says you can use 0 on an QObject argument, interpret it as None.</p>
|
||||||
|
|
||||||
|
<h3>About keyword arguments</h3>
|
||||||
|
|
||||||
|
<p>Only optional arguments can be used as keyword arguments.</p>
|
||||||
|
|
||||||
<h2>Modules</h2>
|
<h2>Modules</h2>
|
||||||
<table class="contentstable" align="center" style="margin-left: 30px"><tr>
|
|
||||||
|
<table class="contentstable" align="center" ><tr>
|
||||||
<td width="50%">
|
<td width="50%">
|
||||||
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtCore/index") }}">QtCore</a><br/>
|
<p class="biglink"><a class="biglink" href="{{ pathto("PySide/QtCore/index") }}">QtCore</a><br/>
|
||||||
<span class="linkdescr">core non-GUI functionality</span></p>
|
<span class="linkdescr">core non-GUI functionality</span></p>
|
||||||
|
|
@ -49,5 +60,16 @@
|
||||||
content in Qt applications</span></p>
|
content in Qt applications</span></p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<h2>Tutorials and examples</h2>
|
||||||
|
|
||||||
|
<p>A collection of <a href="{{ pathto("tutorials/index") }}">tutorials</a> and "walkthrough" guides are provided with PySide to help new users get started with PySide development. These documents were ported from C++ to Python and cover a range of topics, from basic use of widgets to step-by-step <a href="{{ pathto("tutorials/index") }}">tutorials</a> that show how an application is put together.</p>
|
||||||
|
|
||||||
|
<h2>Other stuff</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="pysideapi2.html">PySide API 2</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="pysideversion.html">Getting PySide and Qt version</a></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
41
doc/_templates/layout.html
vendored
Normal file
41
doc/_templates/layout.html
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{% extends "!layout.html" %}
|
||||||
|
|
||||||
|
# Invert sidebars
|
||||||
|
{%- block sidebar1 %}{{ sidebar() }}{%- endblock %}
|
||||||
|
{%- block sidebar2 %}{%- endblock %}
|
||||||
|
|
||||||
|
{%- block header %}
|
||||||
|
<div id="container">
|
||||||
|
<div class="header">
|
||||||
|
<div class="header_container">
|
||||||
|
<div class="logo"><a href="http://www.pyside.org"><img alt="PySide" src="{{ pathto('_static/pysidelogo.png', 1) }}" width="199" height="102" /></a></div>
|
||||||
|
<div class="related">
|
||||||
|
<ul>
|
||||||
|
{%- block rootrellink %}
|
||||||
|
<li><a href="{{ pathto( 'index' ) }}">{{ shorttitle|e }}</a></li>
|
||||||
|
{%- endblock %}
|
||||||
|
{%- for parent in parents %}
|
||||||
|
<li>{{ reldelim1 }} <a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a></li>
|
||||||
|
{%- endfor %}
|
||||||
|
{%- block relbaritems %} {% endblock %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%- endblock -%}
|
||||||
|
|
||||||
|
{%- block footer %}
|
||||||
|
<div class="footer">
|
||||||
|
<a href="http://www.indt.org.br"><img src="{{ pathto('_static/logo_indt.jpg', 1) }}" alt="Indt" border="0" /></a>
|
||||||
|
<a href="http://www.openbossa.org"><img src="{{ pathto('_static/logo_openbossa.png', 1) }}" alt="Openbossa" border="0" /></a>
|
||||||
|
<a href="http://qt.nokia.com/"><img src="{{ pathto('_static/logo_qt.png', 1) }}" alt="Qt" border="0" /></a>
|
||||||
|
<a href="http://www.python.org"><img src="{{ pathto('_static/logo_python.jpg', 1) }}" alt="Python" border="0" /></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%- endblock %}
|
||||||
|
|
||||||
|
# No top relbar.
|
||||||
|
{%- block relbar1 %}{%- endblock %}
|
||||||
|
|
||||||
|
# No bottom relbar.
|
||||||
|
{%- block relbar2 %}{%- endblock %}
|
||||||
26
doc/_themes/pysidedocs/defindex.html
vendored
26
doc/_themes/pysidedocs/defindex.html
vendored
|
|
@ -1,26 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% set title = _('Overview') %}
|
|
||||||
{% block body %}
|
|
||||||
<h1>{{ docstitle|e }}</h1>
|
|
||||||
<p>
|
|
||||||
Welcome! This is
|
|
||||||
{% block description %}the documentation for {{ project|e }}
|
|
||||||
{{ release|e }}{% if last_updated %}, last updated {{ last_updated|e }}{% endif %}{% endblock %}.
|
|
||||||
</p>
|
|
||||||
{% block tables %}
|
|
||||||
<p><strong>{{ _('Indices and tables:') }}</strong></p>
|
|
||||||
<table class="contentstable" align="center"><tr>
|
|
||||||
<td width="50%">
|
|
||||||
<p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{{ _('Complete Table of Contents') }}</a><br>
|
|
||||||
<span class="linkdescr">{{ _('lists all sections and subsections') }}</span></p>
|
|
||||||
<p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{{ _('Search Page') }}</a><br>
|
|
||||||
<span class="linkdescr">{{ _('search this documentation') }}</span></p>
|
|
||||||
</td><td width="50%">
|
|
||||||
<p class="biglink"><a class="biglink" href="{{ pathto("modindex") }}">{{ _('Global Module Index') }}</a><br>
|
|
||||||
<span class="linkdescr">{{ _('quick access to all modules') }}</span></p>
|
|
||||||
<p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{{ _('General Index') }}</a><br>
|
|
||||||
<span class="linkdescr">{{ _('all functions, classes, terms') }}</span></p>
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
{% endblock %}
|
|
||||||
{% endblock %}
|
|
||||||
46
doc/_themes/pysidedocs/genindex-single.html
vendored
46
doc/_themes/pysidedocs/genindex-single.html
vendored
|
|
@ -1,46 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% set title = _('Index') %}
|
|
||||||
{% block body %}
|
|
||||||
|
|
||||||
<h1 id="index">{% trans key=key %}Index – {{ key }}{% endtrans %}</h1>
|
|
||||||
|
|
||||||
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
|
|
||||||
<dl>
|
|
||||||
{%- set breakat = count // 2 %}
|
|
||||||
{%- set numcols = 1 %}
|
|
||||||
{%- set numitems = 0 %}
|
|
||||||
{% for entryname, (links, subitems) in entries %}
|
|
||||||
<dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname|e }}</a>
|
|
||||||
{%- for link in links[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
|
|
||||||
{%- else -%}
|
|
||||||
{{ entryname|e }}
|
|
||||||
{%- endif -%}</dt>
|
|
||||||
{%- if subitems %}
|
|
||||||
<dd><dl>
|
|
||||||
{%- for subentryname, subentrylinks in subitems %}
|
|
||||||
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
|
|
||||||
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
|
|
||||||
</dt>
|
|
||||||
{%- endfor %}
|
|
||||||
</dl></dd>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- set numitems = numitems + 1 + (subitems|length) -%}
|
|
||||||
{%- if numcols < 2 and numitems > breakat -%}
|
|
||||||
{%- set numcols = numcols+1 -%}
|
|
||||||
</dl></td><td width="33%" valign="top"><dl>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor %}
|
|
||||||
</dl></td></tr></table>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block sidebarrel %}
|
|
||||||
<h4>Index</h4>
|
|
||||||
<p>{% for key, dummy in genindexentries -%}
|
|
||||||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
|
|
||||||
{% if not loop.last %}| {% endif %}
|
|
||||||
{%- endfor %}</p>
|
|
||||||
|
|
||||||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p>
|
|
||||||
{{ super() }}
|
|
||||||
{% endblock %}
|
|
||||||
30
doc/_themes/pysidedocs/genindex-split.html
vendored
30
doc/_themes/pysidedocs/genindex-split.html
vendored
|
|
@ -1,30 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% set title = _('Index') %}
|
|
||||||
{% block body %}
|
|
||||||
|
|
||||||
<h1 id="index">{{ _('Index') }}</h1>
|
|
||||||
|
|
||||||
<p>{{ _('Index pages by letter') }}:</p>
|
|
||||||
|
|
||||||
<p>{% for key, dummy in genindexentries -%}
|
|
||||||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
|
|
||||||
{% if not loop.last %}| {% endif %}
|
|
||||||
{%- endfor %}</p>
|
|
||||||
|
|
||||||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong>
|
|
||||||
({{ _('can be huge') }})</a></p>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block sidebarrel %}
|
|
||||||
{% if split_index %}
|
|
||||||
<h4>Index</h4>
|
|
||||||
<p>{% for key, dummy in genindexentries -%}
|
|
||||||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
|
|
||||||
{% if not loop.last %}| {% endif %}
|
|
||||||
{%- endfor %}</p>
|
|
||||||
|
|
||||||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p>
|
|
||||||
{% endif %}
|
|
||||||
{{ super() }}
|
|
||||||
{% endblock %}
|
|
||||||
57
doc/_themes/pysidedocs/genindex.html
vendored
57
doc/_themes/pysidedocs/genindex.html
vendored
|
|
@ -1,57 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% set title = _('Index') %}
|
|
||||||
{% block body %}
|
|
||||||
|
|
||||||
<h1 id="index">{{ _('Index') }}</h1>
|
|
||||||
|
|
||||||
{% for key, dummy in genindexentries -%}
|
|
||||||
<a href="#{{ key }}"><strong>{{ key }}</strong></a> {% if not loop.last %}| {% endif %}
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
{% for key, entries in genindexentries %}
|
|
||||||
<h2 id="{{ key }}">{{ key }}</h2>
|
|
||||||
<table width="100%" class="indextable"><tr><td width="33%" valign="top">
|
|
||||||
<dl>
|
|
||||||
{%- set breakat = genindexcounts[loop.index0] // 2 %}
|
|
||||||
{%- set numcols = 1 %}
|
|
||||||
{%- set numitems = 0 %}
|
|
||||||
{% for entryname, (links, subitems) in entries %}
|
|
||||||
<dt>{%- if links -%}<a href="{{ links[0] }}">{{ entryname|e }}</a>
|
|
||||||
{%- for link in links[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
|
|
||||||
{%- else -%}
|
|
||||||
{{ entryname|e }}
|
|
||||||
{%- endif -%}</dt>
|
|
||||||
{%- if subitems %}
|
|
||||||
<dd><dl>
|
|
||||||
{%- for subentryname, subentrylinks in subitems %}
|
|
||||||
<dt><a href="{{ subentrylinks[0] }}">{{ subentryname|e }}</a>
|
|
||||||
{%- for link in subentrylinks[1:] %}, <a href="{{ link }}">[{{ loop.index }}]</a>{% endfor -%}
|
|
||||||
</dt>
|
|
||||||
{%- endfor %}
|
|
||||||
</dl></dd>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- set numitems = numitems + 1 + (subitems|length) -%}
|
|
||||||
{%- if numcols < 2 and numitems > breakat -%}
|
|
||||||
{%- set numcols = numcols+1 -%}
|
|
||||||
</dl></td><td width="33%" valign="top"><dl>
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor %}
|
|
||||||
</dl></td></tr></table>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block sidebarrel %}
|
|
||||||
{% if split_index %}
|
|
||||||
<h4>{{ _('Index') }}</h4>
|
|
||||||
<p>{% for key, dummy in genindexentries -%}
|
|
||||||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a>
|
|
||||||
{% if not loop.last %}| {% endif %}
|
|
||||||
{%- endfor %}</p>
|
|
||||||
|
|
||||||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p>
|
|
||||||
{% endif %}
|
|
||||||
{{ super() }}
|
|
||||||
{% endblock %}
|
|
||||||
147
doc/_themes/pysidedocs/layout.html
vendored
147
doc/_themes/pysidedocs/layout.html
vendored
|
|
@ -1,147 +0,0 @@
|
||||||
{%- block doctype -%}
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
{%- endblock %}
|
|
||||||
{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %}
|
|
||||||
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
|
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
{{ metatags }}
|
|
||||||
<title>{{ title }} — {{ project }}</title>
|
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/pysidedocs.css', 1) }}" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
|
||||||
|
|
||||||
{%- if not embedded %}
|
|
||||||
<script type="text/javascript">
|
|
||||||
var DOCUMENTATION_OPTIONS = {
|
|
||||||
URL_ROOT: '{{ pathto("", 1) }}',
|
|
||||||
VERSION: '{{ release|e }}',
|
|
||||||
COLLAPSE_MODINDEX: false,
|
|
||||||
FILE_SUFFIX: '{{ file_suffix }}',
|
|
||||||
HAS_SOURCE: {{ has_source|lower }}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
{%- for scriptfile in script_files %}
|
|
||||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
|
||||||
{%- endfor %}
|
|
||||||
{%- if pagename == "screenshots" %}
|
|
||||||
{%- endif %}
|
|
||||||
<!--[if lt IE 7]>
|
|
||||||
<style media="screen" type="text/css">
|
|
||||||
#container {
|
|
||||||
height:100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
{%- if use_opensearch %}
|
|
||||||
<link rel="search" type="application/opensearchdescription+xml"
|
|
||||||
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
|
||||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if favicon %}
|
|
||||||
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
|
|
||||||
{%- endif %}
|
|
||||||
{%- endif %}
|
|
||||||
{%- block linktags %}
|
|
||||||
{%- if hasdoc('about') %}
|
|
||||||
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- if hasdoc('genindex') %}
|
|
||||||
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- if hasdoc('search') %}
|
|
||||||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- if hasdoc('copyright') %}
|
|
||||||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
|
|
||||||
{%- endif %}
|
|
||||||
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
|
|
||||||
{%- if parents %}
|
|
||||||
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- if next %}
|
|
||||||
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- if prev %}
|
|
||||||
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- endblock %}
|
|
||||||
{%- block extrahead %} {% endblock %}
|
|
||||||
</head>
|
|
||||||
<body id="{{ pagename }}">
|
|
||||||
{%- block header %}{% endblock %}
|
|
||||||
|
|
||||||
<div id="container">
|
|
||||||
<div id="header">
|
|
||||||
<div id="header_container">
|
|
||||||
<div id="logo"></div>
|
|
||||||
<ul id="relbar">
|
|
||||||
{%- for rellink in rellinks %}
|
|
||||||
<li class="right">
|
|
||||||
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}"
|
|
||||||
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
|
|
||||||
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
|
|
||||||
{%- endfor %}
|
|
||||||
{%- block rootrellink %}
|
|
||||||
<li><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
|
|
||||||
{%- endblock %}
|
|
||||||
{%- for parent in parents %}
|
|
||||||
<li><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
|
|
||||||
{%- endfor %}
|
|
||||||
{%- block relbaritems %} {% endblock %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="body" >
|
|
||||||
<div id="sidebar">
|
|
||||||
{%- block sidebartoc %}
|
|
||||||
{%- if display_toc %}
|
|
||||||
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
|
|
||||||
{{ toc }}
|
|
||||||
{%- endif %}
|
|
||||||
{%- endblock %}
|
|
||||||
{%- block sidebarrel %}
|
|
||||||
{%- if prev %}
|
|
||||||
<h3>{{ _('Previous topic') }}</h3>
|
|
||||||
<p class="topless"><a href="{{ prev.link|e }}"
|
|
||||||
title="{{ _('previous chapter') }}">{{ prev.title }}</a></p>
|
|
||||||
{%- endif %}
|
|
||||||
{%- if next %}
|
|
||||||
<h3>{{ _('Next topic') }}</h3>
|
|
||||||
<p class="topless"><a href="{{ next.link|e }}"
|
|
||||||
title="{{ _('next chapter') }}">{{ next.title }}</a></p>
|
|
||||||
{%- endif %}
|
|
||||||
{%- endblock %}
|
|
||||||
|
|
||||||
<div id="search_box">
|
|
||||||
<h3>Quick search</h3>
|
|
||||||
<form action="{{ pathto('search') }}" method="get">
|
|
||||||
<input type="text" name="q" id="q" />
|
|
||||||
<input type="submit" value="Go" id="search_button" />
|
|
||||||
<input type="hidden" name="check_keywords" value="yes" />
|
|
||||||
<input type="hidden" name="area" value="default" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{%- block document %}
|
|
||||||
{% block body %} {% endblock %}
|
|
||||||
{%- endblock %}
|
|
||||||
</div> <!-- container -->
|
|
||||||
|
|
||||||
{%- block footer %}
|
|
||||||
<div id="footer">
|
|
||||||
<a href="http://www.indt.org.br"><img src="{{ pathto('_static/logo_indt.jpg', 1) }}" alt="Indt" border="0" /></a>
|
|
||||||
<a href="http://www.openbossa.org"><img src="{{ pathto('_static/logo_openbossa.png', 1) }}" alt="Openbossa" border="0" /></a>
|
|
||||||
<a href="http://qt.nokia.com/"><img src="{{ pathto('_static/logo_qt.png', 1) }}" alt="Qt" border="0" /></a>
|
|
||||||
<a href="http://www.python.org"><img src="{{ pathto('_static/logo_python.jpg', 1) }}" alt="Python" border="0" /></a>
|
|
||||||
</div>
|
|
||||||
{%- endblock %}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
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