Compare commits
554 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
703b460815 | ||
|
|
e6ac7155a0 | ||
|
|
ef09666f25 | ||
|
|
6311d46d0d | ||
|
|
3b4b9e4716 | ||
|
|
ceb3d27fbf | ||
|
|
4ab3bc368e | ||
|
|
ad3a8ed9ce | ||
|
|
cccee9c2c9 | ||
|
|
f9c9effbf7 | ||
|
|
caec341176 | ||
|
|
660e5e2966 | ||
|
|
f4e0aae844 | ||
|
|
d01a8a8f6e | ||
|
|
dda8cdc8fc | ||
|
|
990d1b3651 | ||
|
|
c495e61e03 | ||
|
|
0293a3ce36 | ||
|
|
6cdd438491 | ||
|
|
530ec26bea | ||
|
|
bea3664c38 | ||
|
|
6f1d896ed2 | ||
|
|
44eab232ed | ||
|
|
612b27132d | ||
|
|
0e0b99f43a | ||
|
|
b261ff4642 | ||
|
|
01b90a3a58 | ||
|
|
5cc288b679 | ||
|
|
f40f69f6e1 | ||
|
|
9d4b14d31b | ||
|
|
405c26c30d | ||
|
|
8a28ab0783 | ||
|
|
d64e0a5567 | ||
|
|
ca1c387257 | ||
|
|
038b184c85 | ||
|
|
aea22e98b9 | ||
|
|
96b4196d58 | ||
|
|
1650d802a4 | ||
|
|
7ecfb3e921 | ||
|
|
39d9b90429 | ||
|
|
8bf041b713 | ||
|
|
22e4c53b55 | ||
|
|
5b276074c8 | ||
|
|
774f01761b | ||
|
|
74754b1e13 | ||
|
|
12fe2a44f8 | ||
|
|
20af27cac5 | ||
|
|
d38ba8cbb8 | ||
|
|
3a8ee64d1f | ||
|
|
11356a142b | ||
|
|
81beeae90d | ||
|
|
f918fdb490 | ||
|
|
4f873e6f79 | ||
|
|
57ff5a58c8 | ||
|
|
74f8e9ab0a | ||
|
|
c1ece5e4d9 | ||
|
|
ac1b61deb9 | ||
|
|
017fbee08f | ||
|
|
9c2a629a96 | ||
|
|
be2e9569dd | ||
|
|
af629d13fc | ||
|
|
5644a87c28 | ||
|
|
b355cfc5dd | ||
|
|
85e5866c43 | ||
|
|
b16f252af6 | ||
|
|
11b3bd6bc8 | ||
|
|
38e6275aad | ||
|
|
d9ce3c55f6 | ||
|
|
6abeac0c1f | ||
|
|
2535688f04 | ||
|
|
55fb3a133d | ||
|
|
3c2505a625 | ||
|
|
f1b330231a | ||
|
|
239ae999fa | ||
|
|
b2ec5cf607 | ||
|
|
a69b5adfed | ||
|
|
0c2b68c904 | ||
|
|
2e98f87d20 | ||
|
|
33bf95628f | ||
|
|
f893043a91 | ||
|
|
0a41e336ba | ||
|
|
b6e0977d86 | ||
|
|
33301b9744 | ||
|
|
58e3040802 | ||
|
|
628f203802 | ||
|
|
b10a254814 | ||
|
|
107ee51732 | ||
|
|
2fd0e8fcb8 | ||
|
|
6dea41cee4 | ||
|
|
6591448440 | ||
|
|
28592411f4 | ||
|
|
50e4abe0c2 | ||
|
|
1112473783 | ||
|
|
f66c09e387 | ||
|
|
d18945fcf4 | ||
|
|
eaae6e4dcf | ||
|
|
3a4369cf80 | ||
|
|
4e5b5b2f18 | ||
|
|
597d3ab0a4 | ||
|
|
cc5431f108 | ||
|
|
6138fb93d4 | ||
|
|
ed5563bfce | ||
|
|
ab4ecfa72f | ||
|
|
96c8551a49 | ||
|
|
c9e2c1ad8a | ||
|
|
f1a737a220 | ||
|
|
505cf202fb | ||
|
|
fd45794c3a | ||
|
|
07285f0d28 | ||
|
|
51ea3a5230 | ||
|
|
8c5281ae10 | ||
|
|
df39c3a97d | ||
|
|
10f88e23f7 | ||
|
|
930d1f279a | ||
|
|
aa86eae914 | ||
|
|
489cd2402e | ||
|
|
3f3f52a960 | ||
|
|
7220804be6 | ||
|
|
7f611d1c53 | ||
|
|
aa9e8ca7ef | ||
|
|
db40ec67b1 | ||
|
|
2b1df1698c | ||
|
|
07229012b7 | ||
|
|
933669eeb7 | ||
|
|
1be25c54bb | ||
|
|
ee602e80f1 | ||
|
|
82f4f13d27 | ||
|
|
35b252ab2b | ||
|
|
ba2510c52a | ||
|
|
45bf56e831 | ||
|
|
a698807fd0 | ||
|
|
e48aa92103 | ||
|
|
82612584c6 | ||
|
|
99b07e3221 | ||
|
|
00b1216fb9 | ||
|
|
21dc823972 | ||
|
|
2b78766cdc | ||
|
|
80c1011721 | ||
|
|
0d2705eb11 | ||
|
|
0b1eea7116 | ||
|
|
8127218741 | ||
|
|
046bccece9 | ||
|
|
bec5ca48fd | ||
|
|
75154e2f2f | ||
|
|
606a90d406 | ||
|
|
9408505a24 | ||
|
|
2e985afb3a | ||
|
|
35630f32ff | ||
|
|
30444ccab7 | ||
|
|
2aeac5e05b | ||
|
|
774223adbd | ||
|
|
959aa385f5 | ||
|
|
05431cbfc0 | ||
|
|
1abf8c6149 | ||
|
|
04be2b1ca2 | ||
|
|
fe06dba43c | ||
|
|
cef6db9548 | ||
|
|
b112512793 | ||
|
|
6e16fd86f4 | ||
|
|
40277720ae | ||
|
|
b9fd78a65f | ||
|
|
d5fd41d8ee | ||
|
|
a3628e8752 | ||
|
|
eb133c76b8 | ||
|
|
a859097f56 | ||
|
|
3546a3674f | ||
|
|
75d27311e5 | ||
|
|
ba448baf4d | ||
|
|
e1a137d33e | ||
|
|
82fc89093c | ||
|
|
29cd3b1351 | ||
|
|
5860f786a0 | ||
|
|
5ae1e6460b | ||
|
|
bf4e4cdb89 | ||
|
|
5a408b2b9d | ||
|
|
a8b02e046b | ||
|
|
7780ccddc1 | ||
|
|
ac377b7fbd | ||
|
|
63c4cb9f9e | ||
|
|
70a776c6ff | ||
|
|
f4128e89ed | ||
|
|
b552641feb | ||
|
|
c08b1ba563 | ||
|
|
0c4fbcf5ad | ||
|
|
4d90463624 | ||
|
|
a5249a70e1 | ||
|
|
3669f32af8 | ||
|
|
78e120ec02 | ||
|
|
fc331f37e3 | ||
|
|
99c62a3a09 | ||
|
|
18e0ece1c9 | ||
|
|
54e97b8e14 | ||
|
|
450d1a98a5 | ||
|
|
7fb34b3685 | ||
|
|
8ca58af304 | ||
|
|
6e95894d10 | ||
|
|
2d5207b32c | ||
|
|
206474a5a3 | ||
|
|
964eb13adf | ||
|
|
29c263eeb8 | ||
|
|
f70ff13351 | ||
|
|
a31fb14a1f | ||
|
|
84b4f2da0a | ||
|
|
99ca556810 | ||
|
|
0dd57ef4a5 | ||
|
|
645c80134f | ||
|
|
06051ca647 | ||
|
|
3590ad14d5 | ||
|
|
95dd5c0861 | ||
|
|
34f0fe99da | ||
|
|
4175398b07 | ||
|
|
9b793705fe | ||
|
|
f5669ba342 | ||
|
|
a0d7bab4be | ||
|
|
393ddb46fa | ||
|
|
13d505c9c0 | ||
|
|
9ebe4ba6af | ||
|
|
e9c7505375 | ||
|
|
ee7b26545b | ||
|
|
49ba9c9cd5 | ||
|
|
af37aaf259 | ||
|
|
011db01f65 | ||
|
|
1cc2ccbcd8 | ||
|
|
2130c2dce5 | ||
|
|
d34e154190 | ||
|
|
3b4499891c | ||
|
|
fa34fa2720 | ||
|
|
b32b614d1b | ||
|
|
a68d4b04f3 | ||
|
|
955316b5ca | ||
|
|
75bcc4dbdd | ||
|
|
aa8c4f6b2e | ||
|
|
1ccb6de499 | ||
|
|
8d9bf59fb1 | ||
|
|
2179e02862 | ||
|
|
afc0bb1fee | ||
|
|
de6a90bdcb | ||
|
|
1f013e75e3 | ||
|
|
5349174a3c | ||
|
|
cbdafab9e7 | ||
|
|
3d3dc46531 | ||
|
|
eb6145b96b | ||
|
|
101671f474 | ||
|
|
d7185772bc | ||
|
|
0c63e37820 | ||
|
|
6b3a7f904f | ||
|
|
7d35681fce | ||
|
|
a07d192625 | ||
|
|
cd1dbb0b9d | ||
|
|
1efb6aeacc | ||
|
|
db9547be72 | ||
|
|
c36b1ff7e7 | ||
|
|
df742a5905 | ||
|
|
709420df8e | ||
|
|
6700ddb9cb | ||
|
|
3fb374e271 | ||
|
|
e6b3d26d74 | ||
|
|
6cd49a79f6 | ||
|
|
8807a885e6 | ||
|
|
406293f5aa | ||
|
|
04a2f23988 | ||
|
|
13f6d71f20 | ||
|
|
a5b785fff4 | ||
|
|
1374006206 | ||
|
|
a230b243d0 | ||
|
|
2400157808 | ||
|
|
e24401e586 | ||
|
|
1d842f57a2 | ||
|
|
39c32e3712 | ||
|
|
30c19e9c41 | ||
|
|
8408da40ca | ||
|
|
96750087d9 | ||
|
|
59ab3c3049 | ||
|
|
46fc033929 | ||
|
|
a0b43fbc23 | ||
|
|
94310a7b19 | ||
|
|
d71a6a8c3a | ||
|
|
a5e20dfd75 | ||
|
|
3e69981b4b | ||
|
|
c269e0db00 | ||
|
|
1c0279fa25 | ||
|
|
1e149f3de4 | ||
|
|
741bc56e4b | ||
|
|
c8a11c179a | ||
|
|
d0ad9d27aa | ||
|
|
6da3e78014 | ||
|
|
7abf74adb9 | ||
|
|
9f73d5ecf1 | ||
|
|
e7413828a1 | ||
|
|
a0c72f28c6 | ||
|
|
f3961387a9 | ||
|
|
85f65194ef | ||
|
|
3b9481c24c | ||
|
|
40718156a6 | ||
|
|
51e9dfc428 | ||
|
|
8e7845be18 | ||
|
|
2c6a44feee | ||
|
|
a513d831cd | ||
|
|
8e0e7ef0b6 | ||
|
|
62448f99e7 | ||
|
|
ee17f8c970 | ||
|
|
d984cf24cc | ||
|
|
e39188d636 | ||
|
|
bbba1cc470 | ||
|
|
9ffb2ef542 | ||
|
|
4239b56710 | ||
|
|
f8bc57c61c | ||
|
|
9024884495 | ||
|
|
c50d08e4c8 | ||
|
|
3cd2cad128 | ||
|
|
6f8f728241 | ||
|
|
f645a79f03 | ||
|
|
2f4a1f634c | ||
|
|
e07b306bb4 | ||
|
|
7849b4262f | ||
|
|
4749d14642 | ||
|
|
26ae1259a9 | ||
|
|
78ca4c0749 | ||
|
|
02f9ca5417 | ||
|
|
189717cdb1 | ||
|
|
2bd54857ed | ||
|
|
8ce3644a13 | ||
|
|
13d9f714c5 | ||
|
|
a6f0d0cb52 | ||
|
|
fb3bae60f4 | ||
|
|
880e6a28b6 | ||
|
|
b1a1f61c64 | ||
|
|
9a7733ef8c | ||
|
|
a571d9bd98 | ||
|
|
008798b0e3 | ||
|
|
25026120a1 | ||
|
|
4c149aef4e | ||
|
|
957fa171a9 | ||
|
|
f0e364ff28 | ||
|
|
73f21eb1bb | ||
|
|
bd43c1e0b2 | ||
|
|
04a26bd3bb | ||
|
|
ca81d9a32c | ||
|
|
094de67591 | ||
|
|
b94f5359b0 | ||
|
|
97a16f10ab | ||
|
|
eedc03ebb5 | ||
|
|
17f2d83e0e | ||
|
|
2ed86dc435 | ||
|
|
8ac29700ce | ||
|
|
ee92e460f1 | ||
|
|
35168cb86a | ||
|
|
daffd9831a | ||
|
|
9c21263251 | ||
|
|
f804d84297 | ||
|
|
361c887da0 | ||
|
|
75f799872b | ||
|
|
1ab21c4b28 | ||
|
|
98ede2df71 | ||
|
|
d9482626e6 | ||
|
|
dd8de65f73 | ||
|
|
2efb33d2fc | ||
|
|
5ef2f26ec2 | ||
|
|
4305a54b42 | ||
|
|
e0cf4b000d | ||
|
|
adfaf21063 | ||
|
|
691841f829 | ||
|
|
47957530f9 | ||
|
|
a7cebb5917 | ||
|
|
0ad9c484df | ||
|
|
0298a34289 | ||
|
|
7b4d24f094 | ||
|
|
7d80ac8e29 | ||
|
|
26d6f4a39e | ||
|
|
42e149598e | ||
|
|
8eb529bda3 | ||
|
|
c3d180fdc2 | ||
|
|
b9dd824866 | ||
|
|
42c9f80b06 | ||
|
|
bda10df1da | ||
|
|
7909d294f5 | ||
|
|
f25d227d6e | ||
|
|
7fd8eba136 | ||
|
|
95d546696e | ||
|
|
2248c1b944 | ||
|
|
8fa461559c | ||
|
|
06755f06ba | ||
|
|
5a87a51c11 | ||
|
|
323b37beda | ||
|
|
0fe1c15cbf | ||
|
|
88c38236d4 | ||
|
|
8e4b414844 | ||
|
|
9b3d0b2ef2 | ||
|
|
8a50e91e6f | ||
|
|
90178e21dd | ||
|
|
6b1f0b8ca7 | ||
|
|
4e79ce7b25 | ||
|
|
ac325f24e4 | ||
|
|
d44aa5c310 | ||
|
|
2f6af8142d | ||
|
|
233c0333e6 | ||
|
|
ac767473a2 | ||
|
|
8ab8950ccc | ||
|
|
8d1e058fa1 | ||
|
|
a4ab1c7e99 | ||
|
|
2d65e48fa8 | ||
|
|
f5d4b6e678 | ||
|
|
ee80967d24 | ||
|
|
7b4968abab | ||
|
|
b52148fd85 | ||
|
|
fa118ae670 | ||
|
|
709895f2fb | ||
|
|
295b965d3c | ||
|
|
d7269670ee | ||
|
|
c19ab39cbf | ||
|
|
1b1a83dc30 | ||
|
|
87977cc320 | ||
|
|
3270dde028 | ||
|
|
a44fcc6dba | ||
|
|
43a8f4089e | ||
|
|
f2c537eeaa | ||
|
|
9ca80b5d3a | ||
|
|
e17795d35b | ||
|
|
2a43919024 | ||
|
|
4af09f10ad | ||
|
|
3c3caf154e | ||
|
|
5112a89ca9 | ||
|
|
1a65a287fb | ||
|
|
1f6e877f8d | ||
|
|
629c0c383b | ||
|
|
c5fffa6f24 | ||
|
|
286f9c6d09 | ||
|
|
9a4c439d7f | ||
|
|
a4d7d8f80d | ||
|
|
1cce4bafd3 | ||
|
|
08a0298fe0 | ||
|
|
9284703855 | ||
|
|
bcba2a3b32 | ||
|
|
b9679215b8 | ||
|
|
7f533799d4 | ||
|
|
f7a2ab3d66 | ||
|
|
6a83c87283 | ||
|
|
1a3418c8d1 | ||
|
|
3b026ad4c9 | ||
|
|
50e6f7671d | ||
|
|
499051fd2a | ||
|
|
fb6186d270 | ||
|
|
0d9a584a1c | ||
|
|
530a3d23c5 | ||
|
|
8243565f81 | ||
|
|
867c2bd259 | ||
|
|
ae02222d57 | ||
|
|
a78108efe3 | ||
|
|
7e1b76e054 | ||
|
|
b5331e5c56 | ||
|
|
c8111dc99a | ||
|
|
85947c03d9 | ||
|
|
b8fcead629 | ||
|
|
ed0d9cf820 | ||
|
|
814bc522ce | ||
|
|
fb9fdba329 | ||
|
|
0f6a504dfb | ||
|
|
efdedcdd01 | ||
|
|
4d014eaa80 | ||
|
|
a1cf8f03b2 | ||
|
|
5151af6de1 | ||
|
|
d3894ed861 | ||
|
|
932d9bced9 | ||
|
|
fb9c1a97fe | ||
|
|
753d2bd1f6 | ||
|
|
53e649629b | ||
|
|
6383832408 | ||
|
|
ed1c0014f9 | ||
|
|
32681f7b70 | ||
|
|
15dd2e07ed | ||
|
|
3774752f0c | ||
|
|
269e8450dc | ||
|
|
374e2fcf88 | ||
|
|
da1759fe98 | ||
|
|
39a5a09145 | ||
|
|
ea83c5e554 | ||
|
|
f9587fcad2 | ||
|
|
27b53151bf | ||
|
|
eb0d211417 | ||
|
|
a38db0fe03 | ||
|
|
d0d4ba1564 | ||
|
|
249a87808a | ||
|
|
bc9ddff514 | ||
|
|
9d6d30cb6a | ||
|
|
7810dcd829 | ||
|
|
e8c0ba238a | ||
|
|
4b6cc4d478 | ||
|
|
db4d324497 | ||
|
|
7144634e35 | ||
|
|
25264046e8 | ||
|
|
ecbc9ebcfa | ||
|
|
fa89170f62 | ||
|
|
a74d92adce | ||
|
|
656be4ec98 | ||
|
|
6cf55675dc | ||
|
|
fc471bed0f | ||
|
|
401f394179 | ||
|
|
af0860ba4a | ||
|
|
c4185280ba | ||
|
|
4b0eaa7796 | ||
|
|
67b868ccb9 | ||
|
|
48b25047c9 | ||
|
|
04ac69ce52 | ||
|
|
ab19244c22 | ||
|
|
37fb36e1ff | ||
|
|
bb39c847d3 | ||
|
|
14a5405837 | ||
|
|
fbc06244e0 | ||
|
|
116a0b159f | ||
|
|
00bfc9ba7b | ||
|
|
d2d9f6bac9 | ||
|
|
499ef3bbb4 | ||
|
|
8545117cff | ||
|
|
c634b05def | ||
|
|
dd1184ac4d | ||
|
|
3b61f88a1f | ||
|
|
53e472c5ef | ||
|
|
ca914c9f63 | ||
|
|
9a4738457d | ||
|
|
d3e5c54d8a | ||
|
|
97740beab9 | ||
|
|
634cde193e | ||
|
|
c53ec3c17e | ||
|
|
539b906eb2 | ||
|
|
fd9c8c8d76 | ||
|
|
ffc853c88b | ||
|
|
44d4d96ec3 | ||
|
|
46bbefb1cc | ||
|
|
e3796fa3e7 | ||
|
|
6b720050ef | ||
|
|
4630f41f6a | ||
|
|
154560c9c5 | ||
|
|
e62b0364f1 | ||
|
|
9b2bf0a267 | ||
|
|
643742cbcf | ||
|
|
dc732da7a8 | ||
|
|
1422aed616 | ||
|
|
1464dc1022 | ||
|
|
b548a6f173 | ||
|
|
0a5e353ad0 | ||
|
|
ed1c4c72b9 | ||
|
|
2d595e22b0 | ||
|
|
ec0aeb6fce | ||
|
|
12bc3f5c12 | ||
|
|
35ab7bf679 | ||
|
|
a612c9ee58 | ||
|
|
afe4fcf695 | ||
|
|
d51aacabd1 | ||
|
|
7ee87cc8f2 | ||
|
|
59b4f2b59d | ||
|
|
e20a97a480 | ||
|
|
9e26b5f39d | ||
|
|
113b8efdaf | ||
|
|
0d60daf1e1 |
888 changed files with 24018 additions and 26645 deletions
|
|
@ -5,9 +5,10 @@ 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.3 REQUIRED)
|
find_package(GeneratorRunner 0.6.12 REQUIRED)
|
||||||
find_package(Shiboken 1.0.0 REQUIRED)
|
find_package(Shiboken 1.0.6 REQUIRED)
|
||||||
find_package(Qt4 4.5.0 REQUIRED)
|
find_package(Qt4 4.5.0 REQUIRED)
|
||||||
|
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
|
||||||
include(FindQt4Extra)
|
include(FindQt4Extra)
|
||||||
|
|
||||||
set(XVFB_EXEC "")
|
set(XVFB_EXEC "")
|
||||||
|
|
@ -15,11 +16,12 @@ option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping
|
||||||
if(USE_XVFB)
|
if(USE_XVFB)
|
||||||
find_program(XVFB_RUN NAMES xvfb-run)
|
find_program(XVFB_RUN NAMES xvfb-run)
|
||||||
if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
|
if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
|
||||||
set(XVFB_EXEC ${XVFB_RUN})
|
set(XVFB_EXEC ${XVFB_RUN} -a)
|
||||||
message(STATUS "Using xvfb-run to perform QtGui tests.")
|
message(STATUS "Using xvfb-run to perform QtGui tests.")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_TESTS "Build tests." TRUE)
|
||||||
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
|
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
|
||||||
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
|
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
|
||||||
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
|
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
|
||||||
|
|
@ -55,14 +57,23 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
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 "0")
|
||||||
set(BINDING_API_MICRO_VERSION "0")
|
set(BINDING_API_MICRO_VERSION "6")
|
||||||
|
set(BINDING_API_RELEASE_LEVEL "final") # alpha, beta, rc, or final
|
||||||
|
set(BINDING_API_SERIAL 1) # leave as 0 when release level is final
|
||||||
set(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")
|
||||||
|
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}"
|
||||||
|
CACHE STRING "PySide version [full]" FORCE)
|
||||||
|
else()
|
||||||
|
set(BINDING_API_VERSION_FULL "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}.${BINDING_API_MICRO_VERSION}~${BINDING_API_RELEASE_LEVEL}${BINDING_API_SERIAL}"
|
||||||
|
CACHE STRING "PySide version [full]" FORCE)
|
||||||
|
endif()
|
||||||
set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
|
set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
|
||||||
if(ENABLE_VERSION_SUFFIX)
|
if(ENABLE_VERSION_SUFFIX)
|
||||||
set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
|
set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
|
||||||
|
|
@ -106,11 +117,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})
|
||||||
|
|
||||||
|
|
@ -122,7 +129,7 @@ add_custom_target(uninstall "${CMAKE_COMMAND}"
|
||||||
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||||
|
|
||||||
|
|
||||||
set(ARCHIVE_NAME pyside-qt${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}+${BINDING_API_VERSION})
|
set(ARCHIVE_NAME pyside-qt${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}+${BINDING_API_VERSION_FULL})
|
||||||
add_custom_target(dist
|
add_custom_target(dist
|
||||||
COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" &&
|
COMMAND mkdir -p "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}" &&
|
||||||
git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" &&
|
git log > "${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}/ChangeLog" &&
|
||||||
|
|
@ -145,9 +152,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)
|
||||||
enable_testing()
|
message(STATUS "PySide will be generated avoiding the protected hack!")
|
||||||
|
set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
|
||||||
|
add_definitions(-DAVOID_PROTECTED_HACK)
|
||||||
|
else()
|
||||||
|
message(STATUS "PySide will be generated using the protected hack!")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libpyside)
|
add_subdirectory(libpyside)
|
||||||
if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
|
if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
|
||||||
|
|
@ -155,7 +167,10 @@ if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)
|
||||||
endif()
|
endif()
|
||||||
# project directories
|
# project directories
|
||||||
add_subdirectory(PySide)
|
add_subdirectory(PySide)
|
||||||
add_subdirectory(tests)
|
if (BUILD_TESTS)
|
||||||
|
enable_testing()
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif ()
|
||||||
|
|
||||||
find_program(DOT_EXEC dot)
|
find_program(DOT_EXEC dot)
|
||||||
if (QT_SRC_DIR AND DOT_EXEC)
|
if (QT_SRC_DIR AND DOT_EXEC)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
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)
|
||||||
|
|
@ -23,7 +21,9 @@ HAS_QT_MODULE(QT_QTXML_FOUND QtXml)
|
||||||
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
|
HAS_QT_MODULE(QT_QTTEST_FOUND QtTest)
|
||||||
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
|
HAS_QT_MODULE(QT_QTOPENGL_FOUND QtOpenGL)
|
||||||
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
|
HAS_QT_MODULE(QT_QTSQL_FOUND QtSql)
|
||||||
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
|
if(QT_QTDESIGNER_FOUND)
|
||||||
|
HAS_QT_MODULE(QT_QTUITOOLS_FOUND QtUiTools)
|
||||||
|
endif()
|
||||||
HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
|
HAS_QT_MODULE(QT_QTHELP_FOUND QtHelp)
|
||||||
HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns)
|
HAS_QT_MODULE(QT_QTXMLPATTERNS_FOUND QtXmlPatterns)
|
||||||
HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5)
|
HAS_QT_MODULE(QT_QTMAEMO5_FOUND QtMaemo5)
|
||||||
|
|
@ -34,6 +34,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" "${CMAKE_CURRENT_BINARY_DIR}/private.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,16 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_WIN)
|
||||||
|
set(QtCore_typesystem "typesystem_core_win.xml")
|
||||||
|
set(QtCore_extra_SRC
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/msg_wrapper.cpp
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtCore/point_wrapper.cpp
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(QtCore_typesystem "typesystem_core.xml")
|
||||||
|
set(QtCore_extra_SRC "")
|
||||||
|
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 +71,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,6 +146,7 @@ ${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}
|
||||||
|
${QtCore_extra_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QtCore_typesystem_path "")
|
set(QtCore_typesystem_path "")
|
||||||
|
|
@ -155,4 +167,5 @@ create_pyside_module(QtCore
|
||||||
""
|
""
|
||||||
QtCore_typesystem_path
|
QtCore_typesystem_path
|
||||||
QtCore_SRC
|
QtCore_SRC
|
||||||
"")
|
QtCore_gluecode
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/${QtCore_typesystem})
|
||||||
|
|
|
||||||
32
PySide/QtCore/glue/hwnd_conversions.h
Normal file
32
PySide/QtCore/glue/hwnd_conversions.h
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
namespace Shiboken {
|
||||||
|
template <>
|
||||||
|
struct Converter<HWND__>
|
||||||
|
{
|
||||||
|
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(HWND__ cppobj)
|
||||||
|
{
|
||||||
|
return PyCObject_FromVoidPtr(&cppobj, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HWND__ toCpp(PyObject* pyobj)
|
||||||
|
{
|
||||||
|
return *((HWND__*) PyCObject_AsVoidPtr(pyobj));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -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) {
|
||||||
|
cppResult = Shiboken::Converter<qreal>::toCpp(result);
|
||||||
|
Py_DECREF(result);
|
||||||
|
}
|
||||||
|
Py_DECREF(args);
|
||||||
|
return cppResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* PySideEasingCurveFunctor::callable()
|
||||||
|
{
|
||||||
|
Py_INCREF(m_func);
|
||||||
|
return m_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* PySideEasingCurveFunctor::callable(PyObject* parent)
|
||||||
|
{
|
||||||
|
return PyObject_GetAttrString(parent, __ECF_ATT_NAME__);
|
||||||
|
}
|
||||||
|
|
||||||
|
PySideEasingCurveFunctor::PySideEasingCurveFunctor(int index, PyObject* parent, PyObject* pyFunc)
|
||||||
|
: m_parent(parent), m_func(pyFunc), m_index(index)
|
||||||
|
{
|
||||||
|
PyObject_SetAttrString(m_parent, __ECF_ATT_NAME__, m_func);
|
||||||
|
PySide::WeakRef::create(m_parent, deleteData, this);
|
||||||
|
}
|
||||||
|
|
||||||
27
PySide/QtCore/glue/qeasingcurve_glue.h
Normal file
27
PySide/QtCore/glue/qeasingcurve_glue.h
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#ifndef __QEASINGCURVE_GLUE__
|
||||||
|
#define __QEASINGCURVE_GLUE__
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
#include <QEasingCurve>
|
||||||
|
|
||||||
|
class PySideEasingCurveFunctor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void init();
|
||||||
|
static QEasingCurve::EasingFunction createCustomFuntion(PyObject* parent, PyObject* pyFunc);
|
||||||
|
|
||||||
|
qreal operator()(qreal progress);
|
||||||
|
|
||||||
|
PyObject* callable(); //Return New reference
|
||||||
|
static PyObject* callable(PyObject* parent); //Return New reference
|
||||||
|
|
||||||
|
~PySideEasingCurveFunctor();
|
||||||
|
private:
|
||||||
|
PyObject* m_parent;
|
||||||
|
PyObject* m_func;
|
||||||
|
int m_index;
|
||||||
|
|
||||||
|
PySideEasingCurveFunctor(int index, PyObject* parent, PyObject *pyFunc);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,9 +1,21 @@
|
||||||
static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
|
static bool isDecorator(PyObject* method, PyObject* self)
|
||||||
{
|
{
|
||||||
|
Shiboken::AutoDecRef methodName(PyObject_GetAttrString(method, "__name__"));
|
||||||
|
if (!PyObject_HasAttr(self, methodName))
|
||||||
|
return true;
|
||||||
|
Shiboken::AutoDecRef otherMethod(PyObject_GetAttr(self, methodName));
|
||||||
|
return reinterpret_cast<PyMethodObject*>(otherMethod.object())->im_func != \
|
||||||
|
reinterpret_cast<PyMethodObject*>(method)->im_func;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool getReceiver(QObject *source, PyObject* callback, QObject** receiver, PyObject** self)
|
||||||
|
{
|
||||||
|
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 (Shiboken::Converter<QObject*>::checkType(*self))
|
||||||
*receiver = Shiboken::Converter<QObject*>::toCpp(*self);
|
*receiver = Shiboken::Converter<QObject*>::toCpp(*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 && Shiboken::Converter<QObject*>::checkType(*self))
|
||||||
|
|
@ -14,10 +26,10 @@ static bool getReceiver(PyObject* callback, QObject** receiver, PyObject** self)
|
||||||
*self = 0;
|
*self = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool usingGlobalReceiver = !*receiver;
|
bool usingGlobalReceiver = !*receiver || forceGlobalReceiver;
|
||||||
if (usingGlobalReceiver) {
|
if (usingGlobalReceiver) {
|
||||||
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
PySide::SignalManager& signalManager = PySide::SignalManager::instance();
|
||||||
*receiver = signalManager.globalReceiver();
|
*receiver = signalManager.globalReceiver(source, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
return usingGlobalReceiver;
|
return usingGlobalReceiver;
|
||||||
|
|
@ -47,17 +59,16 @@ 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);
|
bool usingGlobalReceiver = getReceiver(source, callback, &receiver, &self);
|
||||||
if (receiver == 0 && self == 0)
|
if (receiver == 0 && self == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -68,19 +79,27 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
|
||||||
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
|
||||||
|
|
@ -91,6 +110,10 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -105,27 +128,30 @@ 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);
|
bool usingGlobalReceiver = getReceiver(NULL, callback, &receiver, &self);
|
||||||
if (receiver == 0 && self == 0)
|
if (receiver == 0 && self == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const QMetaObject* metaObject = receiver->metaObject();
|
const QMetaObject* metaObject = receiver->metaObject();
|
||||||
|
int signalIndex = source->metaObject()->indexOfSignal(++signal);
|
||||||
|
int slotIndex = -1;
|
||||||
|
|
||||||
const QByteArray callbackSig = PySide::Signal::getCallbackSignature(signal, receiver, callback, usingGlobalReceiver).toAscii();
|
const QByteArray callbackSig = PySide::Signal::getCallbackSignature(signal, receiver, callback, usingGlobalReceiver).toAscii();
|
||||||
QByteArray qtSlotName(callbackSig);
|
QByteArray qtSlotName(callbackSig);
|
||||||
qtSlotName = qtSlotName.prepend('1');
|
|
||||||
|
|
||||||
if (QObject::disconnect(source, signal, receiver, qtSlotName.constData())) {
|
slotIndex = metaObject->indexOfSlot(qtSlotName);
|
||||||
if (usingGlobalReceiver) {
|
|
||||||
int slotIndex = metaObject->indexOfSlot(callbackSig.constData());
|
if (QMetaObject::disconnectOne(source, signalIndex, receiver, slotIndex)) {
|
||||||
signalManager.globalReceiverDisconnectNotify(source, slotIndex);
|
if (usingGlobalReceiver)
|
||||||
|
signalManager.releaseGlobalReceiver(source, receiver);
|
||||||
|
|
||||||
#ifndef AVOID_PROTECTED_HACK
|
#ifndef AVOID_PROTECTED_HACK
|
||||||
source->disconnectNotify(signal - 1);
|
source->disconnectNotify(qtSlotName);
|
||||||
#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(qtSlotName);
|
||||||
#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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
34
PySide/QtCore/qbytearray_conversions.h
Normal file
34
PySide/QtCore/qbytearray_conversions.h
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
namespace Shiboken {
|
||||||
|
|
||||||
|
inline bool Converter<QByteArray>::checkType(PyObject* pyObj)
|
||||||
|
{
|
||||||
|
return ValueTypeConverter<QByteArray>::checkType(pyObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool Converter<QByteArray>::isConvertible(PyObject* pyObj)
|
||||||
|
{
|
||||||
|
if (ValueTypeConverter<QByteArray>::isConvertible(pyObj))
|
||||||
|
return true;
|
||||||
|
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QByteArray >());
|
||||||
|
return Shiboken::Converter<const char *>::checkType(pyObj)
|
||||||
|
|| (ObjectType::isExternalConvertible(shiboType, pyObj));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QByteArray Converter<QByteArray>::toCpp(PyObject* pyObj)
|
||||||
|
{
|
||||||
|
if (pyObj == Py_None)
|
||||||
|
return 0;
|
||||||
|
else if (PyObject_TypeCheck(pyObj, SbkType<QByteArray>()))
|
||||||
|
return *Converter<QByteArray*>::toCpp(pyObj);
|
||||||
|
else if (PyString_Check(pyObj))
|
||||||
|
return QByteArray(PyString_AS_STRING(pyObj), PyString_GET_SIZE(pyObj));
|
||||||
|
else
|
||||||
|
return ValueTypeConverter<QByteArray>::toCpp(pyObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline PyObject* Converter<QByteArray>::toPython(const ::QByteArray& cppObj)
|
||||||
|
{
|
||||||
|
return ValueTypeConverter<QByteArray>::toPython(cppObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,35 +1,45 @@
|
||||||
namespace Shiboken {
|
namespace Shiboken {
|
||||||
template <>
|
|
||||||
struct PythonConverter<QDate>
|
inline bool Converter<QDate>::checkType(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
static bool isPythonConvertible(PyObject* pyObj)
|
return ValueTypeConverter<QDate>::checkType(pyObj);
|
||||||
{
|
}
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
inline PyObject* Converter<QDate>::toPython(const ::QDate& cppObj)
|
||||||
|
{
|
||||||
return pyObj && PyDate_Check(pyObj);
|
return ValueTypeConverter<QDate>::toPython(cppObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDate* transformFromPython(PyObject* obj)
|
inline bool Converter<QDate>::isConvertible(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
if (isPythonConvertible(obj)) {
|
if (ValueTypeConverter<QDate>::isConvertible(pyObj))
|
||||||
int day = PyDateTime_GET_DAY(obj);
|
return true;
|
||||||
int month = PyDateTime_GET_MONTH(obj);
|
|
||||||
int year = PyDateTime_GET_YEAR(obj);
|
if (!PyDateTimeAPI)
|
||||||
return new QDate(year, month, day);
|
PyDateTime_IMPORT;
|
||||||
}
|
|
||||||
return 0;
|
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QDate >());
|
||||||
}
|
return PyDate_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj);
|
||||||
|
}
|
||||||
static PyObject* transformToPython(QDate* d)
|
|
||||||
{
|
inline QDate Converter<QDate>::toCpp(PyObject* pyObj)
|
||||||
if (d) {
|
{
|
||||||
if (!PyDateTimeAPI)
|
if (!PyDateTimeAPI)
|
||||||
PyDateTime_IMPORT;
|
PyDateTime_IMPORT;
|
||||||
|
|
||||||
return PyDate_FromDate(d->year(), d->month(), d->day());
|
if (pyObj == Py_None) {
|
||||||
}
|
return QDate();
|
||||||
return 0;
|
} else if (PyObject_TypeCheck(pyObj, SbkType<QDate>())) {
|
||||||
}
|
return *Converter<QDate*>::toCpp(pyObj);
|
||||||
};
|
} else if (PyDate_Check(pyObj)) {
|
||||||
|
int day = PyDateTime_GET_DAY(pyObj);
|
||||||
|
int month = PyDateTime_GET_MONTH(pyObj);
|
||||||
|
int year = PyDateTime_GET_YEAR(pyObj);
|
||||||
|
return QDate(year, month, day);
|
||||||
|
} else {
|
||||||
|
return ValueTypeConverter<QDate>::toCpp(pyObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,49 @@
|
||||||
namespace Shiboken {
|
namespace Shiboken {
|
||||||
template <>
|
|
||||||
struct PythonConverter<QDateTime>
|
inline bool Converter<QDateTime>::checkType(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
static bool isPythonConvertible(PyObject* pyObj)
|
return ValueTypeConverter<QDateTime>::checkType(pyObj);
|
||||||
{
|
}
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
inline PyObject* Converter<QDateTime>::toPython(const ::QDateTime& cppObj)
|
||||||
|
{
|
||||||
return pyObj && PyDateTime_Check(pyObj);
|
return ValueTypeConverter<QDateTime>::toPython(cppObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QDateTime* transformFromPython(PyObject* obj)
|
inline bool Converter<QDateTime>::isConvertible(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
if (isPythonConvertible(obj)) {
|
if (ValueTypeConverter<QDateTime>::isConvertible(pyObj))
|
||||||
int day = PyDateTime_GET_DAY(obj);
|
return true;
|
||||||
int month = PyDateTime_GET_MONTH(obj);
|
|
||||||
int year = PyDateTime_GET_YEAR(obj);
|
if (!PyDateTimeAPI)
|
||||||
int hour = PyDateTime_DATE_GET_HOUR(obj);
|
PyDateTime_IMPORT;
|
||||||
int min = PyDateTime_DATE_GET_MINUTE(obj);
|
|
||||||
int sec = PyDateTime_DATE_GET_SECOND(obj);
|
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QDateTime >());
|
||||||
int msec = PyDateTime_DATE_GET_MICROSECOND(obj);
|
return PyDateTime_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj);
|
||||||
return new QDateTime(QDate(year, month, day), QTime(hour, min, sec, msec));
|
}
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
inline QDateTime Converter<QDateTime>::toCpp(PyObject* pyObj)
|
||||||
|
{
|
||||||
static PyObject* transformToPython(QDateTime* d)
|
if (!PyDateTimeAPI)
|
||||||
{
|
PyDateTime_IMPORT;
|
||||||
if (d) {
|
|
||||||
if (!PyDateTimeAPI)
|
if (pyObj == Py_None) {
|
||||||
PyDateTime_IMPORT;
|
return QDateTime();
|
||||||
|
} else if (PyObject_TypeCheck(pyObj, SbkType<QDateTime>())) {
|
||||||
QDate date = d->date();
|
return *Converter<QDateTime*>::toCpp(pyObj);
|
||||||
QTime time = d->time();
|
} else if (PyDateTime_Check(pyObj)) {
|
||||||
return PyDateTime_FromDateAndTime(date.year(), date.month(), date.day(), time.hour(), time.minute(), time.second(), time.msec());
|
int day = PyDateTime_GET_DAY(pyObj);
|
||||||
}
|
int month = PyDateTime_GET_MONTH(pyObj);
|
||||||
return 0;
|
int year = PyDateTime_GET_YEAR(pyObj);
|
||||||
}
|
int hour = PyDateTime_DATE_GET_HOUR(pyObj);
|
||||||
};
|
int min = PyDateTime_DATE_GET_MINUTE(pyObj);
|
||||||
|
int sec = PyDateTime_DATE_GET_SECOND(pyObj);
|
||||||
|
int usec = PyDateTime_DATE_GET_MICROSECOND(pyObj);
|
||||||
|
return QDateTime(QDate(year, month, day), QTime(hour, min, sec, usec/1000));
|
||||||
|
} else {
|
||||||
|
return ValueTypeConverter<QDateTime>::toCpp(pyObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,45 @@
|
||||||
namespace Shiboken {
|
namespace Shiboken {
|
||||||
template <>
|
|
||||||
struct PythonConverter<QTime>
|
inline bool Converter<QTime>::checkType(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
static bool isPythonConvertible(PyObject* pyObj)
|
return ValueTypeConverter<QTime>::checkType(pyObj);
|
||||||
{
|
}
|
||||||
if (!PyDateTimeAPI)
|
|
||||||
PyDateTime_IMPORT;
|
inline PyObject* Converter<QTime>::toPython(const ::QTime& cppObj)
|
||||||
|
{
|
||||||
return pyObj && PyTime_Check(pyObj);
|
return ValueTypeConverter<QTime>::toPython(cppObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QTime* transformFromPython(PyObject* obj)
|
inline bool Converter<QTime>::isConvertible(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
if (isPythonConvertible(obj)) {
|
if (ValueTypeConverter<QTime>::isConvertible(pyObj))
|
||||||
int hour = PyDateTime_TIME_GET_HOUR(obj);
|
return true;
|
||||||
int min = PyDateTime_TIME_GET_MINUTE(obj);
|
|
||||||
int sec = PyDateTime_TIME_GET_SECOND(obj);
|
if (!PyDateTimeAPI)
|
||||||
int msec = PyDateTime_TIME_GET_MICROSECOND(obj);
|
PyDateTime_IMPORT;
|
||||||
return new QTime(hour, min, sec, msec);
|
|
||||||
}
|
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType< ::QTime >());
|
||||||
return 0;
|
return PyTime_Check(pyObj) || ObjectType::isExternalConvertible(shiboType, pyObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject* transformToPython(QTime* d)
|
inline QTime Converter<QTime>::toCpp(PyObject* pyObj)
|
||||||
{
|
{
|
||||||
if (d) {
|
if (!PyDateTimeAPI)
|
||||||
if (!PyDateTimeAPI)
|
PyDateTime_IMPORT;
|
||||||
PyDateTime_IMPORT;
|
|
||||||
|
if (pyObj == Py_None) {
|
||||||
return PyTime_FromTime(d->hour(), d->minute(), d->second(), d->msec());
|
return QTime();
|
||||||
}
|
} else if (PyObject_TypeCheck(pyObj, SbkType<QTime>())) {
|
||||||
return 0;
|
return *Converter<QTime*>::toCpp(pyObj);
|
||||||
}
|
} else if (PyTime_Check(pyObj)) {
|
||||||
};
|
int hour = PyDateTime_TIME_GET_HOUR(pyObj);
|
||||||
|
int min = PyDateTime_TIME_GET_MINUTE(pyObj);
|
||||||
|
int sec = PyDateTime_TIME_GET_SECOND(pyObj);
|
||||||
|
int usec = PyDateTime_TIME_GET_MICROSECOND(pyObj);
|
||||||
|
return QTime(hour, min, sec, usec/1000);
|
||||||
|
} else {
|
||||||
|
return ValueTypeConverter<QTime>::toCpp(pyObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,26 +14,28 @@ struct Converter<QVariant>
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QByteArray resolveMetaType(PyTypeObject* type, int &typeId)
|
static const char* resolveMetaType(PyTypeObject* type, int* typeId)
|
||||||
{
|
{
|
||||||
if (PyObject_TypeCheck(type, &SbkObjectType_Type)) {
|
if (PyObject_TypeCheck(type, &SbkObjectType_Type)) {
|
||||||
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
|
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
|
||||||
QByteArray typeName(Shiboken::ObjectType::getOriginalName(sbkType));
|
const char* typeName = Shiboken::ObjectType::getOriginalName(sbkType);
|
||||||
bool valueType = !typeName.endsWith("*");
|
if (!typeName)
|
||||||
|
return 0;
|
||||||
|
bool valueType = '*' != typeName[qstrlen(typeName) - 1];
|
||||||
|
|
||||||
// Do not convert user type of value
|
// Do not convert user type of value
|
||||||
if (valueType && Shiboken::ObjectType::isUserType(type))
|
if (valueType && Shiboken::ObjectType::isUserType(type))
|
||||||
return QByteArray();
|
return 0;
|
||||||
|
|
||||||
int obTypeId = QMetaType::type(typeName);
|
int obTypeId = QMetaType::type(typeName);
|
||||||
if (obTypeId) {
|
if (obTypeId) {
|
||||||
typeId = obTypeId;
|
*typeId = obTypeId;
|
||||||
return QByteArray(typeName);
|
return typeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not resolve types to value type
|
// Do not resolve types to value type
|
||||||
if (valueType)
|
if (valueType)
|
||||||
return QByteArray();
|
return 0;
|
||||||
|
|
||||||
// find in base types
|
// find in base types
|
||||||
if (type->tp_base) {
|
if (type->tp_base) {
|
||||||
|
|
@ -41,14 +43,14 @@ struct Converter<QVariant>
|
||||||
} else if (type->tp_bases) {
|
} else if (type->tp_bases) {
|
||||||
int size = PyTuple_GET_SIZE(type->tp_bases);
|
int size = PyTuple_GET_SIZE(type->tp_bases);
|
||||||
for(int i=0; i < size; i++){
|
for(int i=0; i < size; i++){
|
||||||
QByteArray derivedName = resolveMetaType(reinterpret_cast<PyTypeObject*>(PyTuple_GET_ITEM(type->tp_bases, i)), typeId);
|
const char* derivedName = resolveMetaType(reinterpret_cast<PyTypeObject*>(PyTuple_GET_ITEM(type->tp_bases, i)), typeId);
|
||||||
if (!derivedName.isEmpty())
|
if (derivedName)
|
||||||
return derivedName;
|
return derivedName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typeId = 0;
|
*typeId = 0;
|
||||||
return QByteArray();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QVariant toCpp(PyObject* pyObj)
|
static QVariant toCpp(PyObject* pyObj)
|
||||||
|
|
@ -80,34 +82,30 @@ struct Converter<QVariant>
|
||||||
} else if (Shiboken::isShibokenEnum(pyObj)) {
|
} else if (Shiboken::isShibokenEnum(pyObj)) {
|
||||||
// QVariant(enum)
|
// QVariant(enum)
|
||||||
return QVariant(Converter<int>::toCpp(pyObj));
|
return QVariant(Converter<int>::toCpp(pyObj));
|
||||||
} else if (PyDict_Check(pyObj)) {
|
} else if (Shiboken::Object::checkType(pyObj)) {
|
||||||
return convertToVariantMap(pyObj);
|
// a class supported by QVariant?
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//sequence and dictornay
|
||||||
|
if (PyDict_Check(pyObj)) {
|
||||||
|
QVariant ret = convertToVariantMap(pyObj);
|
||||||
|
if (ret.isValid())
|
||||||
|
return ret;
|
||||||
} else if (PySequence_Check(pyObj)) {
|
} else if (PySequence_Check(pyObj)) {
|
||||||
return convertToVariantList(pyObj);
|
return convertToVariantList(pyObj);
|
||||||
} else {
|
|
||||||
// a class supported by QVariant?
|
|
||||||
if (Shiboken::Object::checkType(pyObj)) {
|
|
||||||
SbkObjectType* objType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
|
|
||||||
int typeCode = 0;
|
|
||||||
QByteArray typeName = resolveMetaType(reinterpret_cast<PyTypeObject*>(objType), typeCode);
|
|
||||||
if (typeCode) {
|
|
||||||
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(typeName);
|
|
||||||
void* data = 0;
|
|
||||||
data = tr->toCpp(pyObj, &data, true);
|
|
||||||
if (typeName.endsWith("*")) {
|
|
||||||
QVariant var(typeCode, &data);
|
|
||||||
tr->deleteObject(data);
|
|
||||||
return var;
|
|
||||||
} else {
|
|
||||||
QVariant var(typeCode, data);
|
|
||||||
tr->deleteObject(data);
|
|
||||||
return var;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Is a shiboken type not known by Qt
|
|
||||||
return QVariant::fromValue<PySide::PyObjectWrapper>(pyObj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Is a shiboken type not known by Qt
|
||||||
|
return QVariant::fromValue<PySide::PyObjectWrapper>(pyObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject* toPython(void* cppObj)
|
static PyObject* toPython(void* cppObj)
|
||||||
|
|
@ -140,28 +138,25 @@ struct Converter<QVariant>
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
|
Shiboken::AutoDecRef element(PySequence_GetItem(list, 0));
|
||||||
int typeId = 0;
|
int typeId;
|
||||||
QByteArray typeName = resolveMetaType(element.cast<PyTypeObject*>(), typeId);
|
const char* typeName = resolveMetaType(element.cast<PyTypeObject*>(), &typeId);
|
||||||
if (!typeName.isEmpty()) {
|
if (typeName) {
|
||||||
QByteArray listTypeName = QByteArray("QList<"+typeName+">");
|
QByteArray listTypeName("QList<");
|
||||||
|
listTypeName += typeName;
|
||||||
|
listTypeName += '>';
|
||||||
typeId = QMetaType::type(listTypeName);
|
typeId = QMetaType::type(listTypeName);
|
||||||
if (typeId > 0) {
|
if (typeId > 0) {
|
||||||
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(listTypeName);
|
Shiboken::TypeResolver* tr = Shiboken::TypeResolver::get(listTypeName);
|
||||||
if (!tr) {
|
if (!tr) {
|
||||||
qWarning() << "TypeResolver for :" << listTypeName << "not registered.";
|
qWarning() << "TypeResolver for :" << listTypeName << "not registered.";
|
||||||
return QVariant();
|
|
||||||
} else {
|
} else {
|
||||||
void *data = 0;
|
QVariant var(typeId, (void*)0);
|
||||||
data = tr->toCpp(list, &data, true);
|
void* args[] = { var.data(), 0 };
|
||||||
QVariant var(typeId, data);
|
tr->toCpp(list, args);
|
||||||
tr->deleteObject(data);
|
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return QVariant();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,7 +172,7 @@ struct Converter<QVariant>
|
||||||
ret.insert(Converter<QString>::toCpp(key), toCpp(value));
|
ret.insert(Converter<QString>::toCpp(key), toCpp(value));
|
||||||
return QVariant(ret);
|
return QVariant(ret);
|
||||||
} else {
|
} else {
|
||||||
return toCpp(map);
|
return QVariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
35
PySide/QtCore/typesystem_core_win.xml
Normal file
35
PySide/QtCore/typesystem_core_win.xml
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?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="HWND__">
|
||||||
|
<conversion-rule file="glue/hwnd_conversions.h"/>
|
||||||
|
</primitive-type>
|
||||||
|
<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'"/>
|
||||||
|
<load-typesystem name="typesystem_core.xml" generate="yes"/>
|
||||||
|
</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
|
||||||
|
|
@ -56,5 +58,5 @@ create_pyside_module(QtDeclarative
|
||||||
QtDeclarative_deps
|
QtDeclarative_deps
|
||||||
QtDeclarative_typesystem_path
|
QtDeclarative_typesystem_path
|
||||||
QtDeclarative_SRC
|
QtDeclarative_SRC
|
||||||
"")
|
QtDeclarative_registerType)
|
||||||
|
|
||||||
|
|
|
||||||
351
PySide/QtDeclarative/pysideqmlregistertype.cpp
Normal file
351
PySide/QtDeclarative/pysideqmlregistertype.cpp
Normal file
|
|
@ -0,0 +1,351 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the Shiboken Python Bindings Generator project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pysideqmlregistertype.h"
|
||||||
|
// Qt
|
||||||
|
#include <QObject>
|
||||||
|
#include <QDeclarativeEngine>
|
||||||
|
#include <QMutex>
|
||||||
|
// shiboken
|
||||||
|
#include <typeresolver.h>
|
||||||
|
#include <gilstate.h>
|
||||||
|
#include <sbkdbg.h>
|
||||||
|
// pyside
|
||||||
|
#include <pyside.h>
|
||||||
|
#include <dynamicqmetaobject.h>
|
||||||
|
#include <pysideproperty.h>
|
||||||
|
|
||||||
|
// auto generated headers
|
||||||
|
#include "qdeclarativeitem_wrapper.h"
|
||||||
|
#include "pyside_qtcore_python.h"
|
||||||
|
#include "pyside_qtdeclarative_python.h"
|
||||||
|
|
||||||
|
#ifndef PYSIDE_MAX_QML_TYPES
|
||||||
|
// Maximum number of different types the user cna export to QML using qmlRegisterType.
|
||||||
|
#define PYSIDE_MAX_QML_TYPES 50
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Forward declarations
|
||||||
|
static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args);
|
||||||
|
|
||||||
|
|
||||||
|
// All registered python types
|
||||||
|
static PyObject* pyTypes[PYSIDE_MAX_QML_TYPES];
|
||||||
|
static void (*createFuncs[PYSIDE_MAX_QML_TYPES])(void*);
|
||||||
|
|
||||||
|
// Mutex used to avoid race condition on PySide::nextQObjectMemoryAddr
|
||||||
|
static QMutex nextQmlElementMutex;
|
||||||
|
|
||||||
|
template<int N>
|
||||||
|
struct ElementFactoryBase
|
||||||
|
{
|
||||||
|
static void createInto(void* memory)
|
||||||
|
{
|
||||||
|
QMutexLocker locker(&nextQmlElementMutex);
|
||||||
|
PySide::setNextQObjectMemoryAddr(memory);
|
||||||
|
Shiboken::GilState state;
|
||||||
|
PyObject* obj = PyObject_CallObject(pyTypes[N], 0);
|
||||||
|
if (!obj || PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
PySide::setNextQObjectMemoryAddr(0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<int N>
|
||||||
|
struct ElementFactory : ElementFactoryBase<N>
|
||||||
|
{
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
createFuncs[N] = &ElementFactoryBase<N>::createInto;
|
||||||
|
ElementFactory<N-1>::init();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct ElementFactory<0> : ElementFactoryBase<0>
|
||||||
|
{
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
createFuncs[0] = &ElementFactoryBase<0>::createInto;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, int versionMinor, const char* qmlName)
|
||||||
|
{
|
||||||
|
using namespace Shiboken;
|
||||||
|
|
||||||
|
static PyTypeObject* qobjectType = TypeResolver::get("QObject*")->pythonType();
|
||||||
|
static PyTypeObject* qdeclarativeType = TypeResolver::get("QDeclarativeItem*")->pythonType();
|
||||||
|
assert(qobjectType);
|
||||||
|
static int nextType = 0;
|
||||||
|
|
||||||
|
if (nextType >= PYSIDE_MAX_QML_TYPES) {
|
||||||
|
PyErr_Format(PyExc_TypeError, "QML doesn't really like language bindings, so you can only export %d types to QML.", PYSIDE_MAX_QML_TYPES);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qobjectType)) {
|
||||||
|
PyErr_Format(PyExc_TypeError, "A type inherited from %s expected, got %s.", qobjectType->tp_name, ((PyTypeObject*)pyObj)->tp_name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isDeclarativeType = PySequence_Contains(((PyTypeObject*)pyObj)->tp_mro, (PyObject*)qdeclarativeType);
|
||||||
|
|
||||||
|
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
|
||||||
|
Q_ASSERT(metaObject);
|
||||||
|
|
||||||
|
// All ready... now the ugly code begins... :-)
|
||||||
|
pyTypes[nextType] = pyObj;
|
||||||
|
|
||||||
|
// Init proxy object static meta object
|
||||||
|
QDeclarativePrivate::RegisterType type;
|
||||||
|
type.version = 0;
|
||||||
|
if (isDeclarativeType) {
|
||||||
|
type.typeId = qMetaTypeId<QDeclarativeItem*>();
|
||||||
|
type.listId = qMetaTypeId<QDeclarativeListProperty<QDeclarativeItem> >();
|
||||||
|
|
||||||
|
type.attachedPropertiesFunction = QDeclarativePrivate::attachedPropertiesFunc<QDeclarativeItem>();
|
||||||
|
type.attachedPropertiesMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<QDeclarativeItem>();
|
||||||
|
|
||||||
|
type.parserStatusCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativeParserStatus>::cast();
|
||||||
|
type.valueSourceCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativePropertyValueSource>::cast();
|
||||||
|
type.valueInterceptorCast = QDeclarativePrivate::StaticCastSelector<QDeclarativeItem, QDeclarativePropertyValueInterceptor>::cast();
|
||||||
|
} else {
|
||||||
|
type.typeId = qMetaTypeId<QObject*>();
|
||||||
|
type.listId = qMetaTypeId<QDeclarativeListProperty<QObject> >();
|
||||||
|
type.attachedPropertiesFunction = QDeclarativePrivate::attachedPropertiesFunc<QObject>();
|
||||||
|
type.attachedPropertiesMetaObject = QDeclarativePrivate::attachedPropertiesMetaObject<QObject>();
|
||||||
|
|
||||||
|
type.parserStatusCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativeParserStatus>::cast();
|
||||||
|
type.valueSourceCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativePropertyValueSource>::cast();
|
||||||
|
type.valueInterceptorCast = QDeclarativePrivate::StaticCastSelector<QObject, QDeclarativePropertyValueInterceptor>::cast();
|
||||||
|
}
|
||||||
|
type.objectSize = PySide::getSizeOfQObject(reinterpret_cast<SbkObjectType*>(pyObj));
|
||||||
|
type.create = createFuncs[nextType];
|
||||||
|
type.uri = uri;
|
||||||
|
type.versionMajor = versionMajor;
|
||||||
|
type.versionMinor = versionMinor;
|
||||||
|
type.elementName = qmlName;
|
||||||
|
type.metaObject = metaObject;
|
||||||
|
|
||||||
|
type.extensionObjectCreate = 0;
|
||||||
|
type.extensionMetaObject = 0;
|
||||||
|
type.customParser = 0;
|
||||||
|
|
||||||
|
int qmlTypeId = QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
|
||||||
|
++nextType;
|
||||||
|
return qmlTypeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
|
||||||
|
// This is the user data we store in the property.
|
||||||
|
struct DeclarativeListProperty
|
||||||
|
{
|
||||||
|
PyTypeObject* type;
|
||||||
|
PyObject* append;
|
||||||
|
PyObject* at;
|
||||||
|
PyObject* clear;
|
||||||
|
PyObject* count;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int propListTpInit(PyObject* self, PyObject* args, PyObject* kwds)
|
||||||
|
{
|
||||||
|
static const char *kwlist[] = {"type", "append", "at", "clear", "count", 0};
|
||||||
|
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
|
||||||
|
DeclarativeListProperty* data = new DeclarativeListProperty;
|
||||||
|
memset(data, 0, sizeof(DeclarativeListProperty));
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds,
|
||||||
|
"OO|OOO:QtDeclarative.ListProperty", (char**) kwlist,
|
||||||
|
&data->type,
|
||||||
|
&data->append,
|
||||||
|
&data->at,
|
||||||
|
&data->clear,
|
||||||
|
&data->count)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
PySide::Property::setMetaCallHandler(pySelf, &propListMetaCall);
|
||||||
|
PySide::Property::setTypeName(pySelf, "QDeclarativeListProperty<QDeclarativeItem>");
|
||||||
|
PySide::Property::setUserData(pySelf, data);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void propListTpFree(void* self)
|
||||||
|
{
|
||||||
|
PySideProperty* pySelf = reinterpret_cast<PySideProperty*>(self);
|
||||||
|
delete reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pySelf));
|
||||||
|
// calls base type constructor
|
||||||
|
pySelf->ob_type->tp_base->tp_free(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyTypeObject PropertyListType = {
|
||||||
|
PyObject_HEAD_INIT(0)
|
||||||
|
0, /*ob_size*/
|
||||||
|
"ListProperty", /*tp_name*/
|
||||||
|
sizeof(PySideProperty), /*tp_basicsize*/
|
||||||
|
0, /*tp_itemsize*/
|
||||||
|
0, /*tp_dealloc*/
|
||||||
|
0, /*tp_print*/
|
||||||
|
0, /*tp_getattr*/
|
||||||
|
0, /*tp_setattr*/
|
||||||
|
0, /*tp_compare*/
|
||||||
|
0, /*tp_repr*/
|
||||||
|
0, /*tp_as_number*/
|
||||||
|
0, /*tp_as_sequence*/
|
||||||
|
0, /*tp_as_mapping*/
|
||||||
|
0, /*tp_hash */
|
||||||
|
0, /*tp_call*/
|
||||||
|
0, /*tp_str*/
|
||||||
|
0, /*tp_getattro*/
|
||||||
|
0, /*tp_setattro*/
|
||||||
|
0, /*tp_as_buffer*/
|
||||||
|
Py_TPFLAGS_DEFAULT, /*tp_flags*/
|
||||||
|
0, /*tp_doc */
|
||||||
|
0, /*tp_traverse */
|
||||||
|
0, /*tp_clear */
|
||||||
|
0, /*tp_richcompare */
|
||||||
|
0, /*tp_weaklistoffset */
|
||||||
|
0, /*tp_iter */
|
||||||
|
0, /*tp_iternext */
|
||||||
|
0, /*tp_methods */
|
||||||
|
0, /*tp_members */
|
||||||
|
0, /*tp_getset */
|
||||||
|
&PySidePropertyType, /*tp_base */
|
||||||
|
0, /*tp_dict */
|
||||||
|
0, /*tp_descr_get */
|
||||||
|
0, /*tp_descr_set */
|
||||||
|
0, /*tp_dictoffset */
|
||||||
|
propListTpInit, /*tp_init */
|
||||||
|
0, /*tp_alloc */
|
||||||
|
0, /*tp_new */
|
||||||
|
propListTpFree, /*tp_free */
|
||||||
|
0, /*tp_is_gc */
|
||||||
|
0, /*tp_bases */
|
||||||
|
0, /*tp_mro */
|
||||||
|
0, /*tp_cache */
|
||||||
|
0, /*tp_subclasses */
|
||||||
|
0, /*tp_weaklist */
|
||||||
|
0, /*tp_del */
|
||||||
|
};
|
||||||
|
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::AppendFunction callback
|
||||||
|
void propListAppender(QDeclarativeListProperty<QDeclarativeItem>* propList, QDeclarativeItem* item)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, item));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->append, args));
|
||||||
|
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::CountFunction callback
|
||||||
|
int propListCount(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->count, args));
|
||||||
|
|
||||||
|
// Check return type
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
else if (Shiboken::Converter<int>::isConvertible(retVal))
|
||||||
|
return Shiboken::Converter<int>::toCpp(retVal);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::AtFunction callback
|
||||||
|
QDeclarativeItem* propListAt(QDeclarativeListProperty<QDeclarativeItem>* propList, int index)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object, index));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->at, args));
|
||||||
|
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
else if (PyType_IsSubtype(Py_TYPE(retVal), data->type))
|
||||||
|
return Shiboken::Converter<QDeclarativeItem*>::toCpp(retVal);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Implementation of QDeclarativeListProperty<T>::ClearFunction callback
|
||||||
|
void propListClear(QDeclarativeListProperty<QDeclarativeItem>* propList)
|
||||||
|
{
|
||||||
|
Shiboken::GilState state;
|
||||||
|
Shiboken::AutoDecRef args(Shiboken::makeTuple(propList->object));
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(propList->data);
|
||||||
|
Shiboken::AutoDecRef retVal(PyObject_CallObject(data->clear, args));
|
||||||
|
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
PyErr_Print();
|
||||||
|
}
|
||||||
|
|
||||||
|
// qt_metacall specialization for ListProperties
|
||||||
|
static void propListMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args)
|
||||||
|
{
|
||||||
|
if (call != QMetaObject::ReadProperty)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DeclarativeListProperty* data = reinterpret_cast<DeclarativeListProperty*>(PySide::Property::userData(pp));
|
||||||
|
QDeclarativeListProperty<QDeclarativeItem> declProp(Shiboken::Converter<QObject*>::toCpp(self), data, &propListAppender);
|
||||||
|
|
||||||
|
if (data->count)
|
||||||
|
declProp.count = &propListCount;
|
||||||
|
if (data->at)
|
||||||
|
declProp.at = &propListAt;
|
||||||
|
if (data->clear)
|
||||||
|
declProp.clear = &propListClear;
|
||||||
|
|
||||||
|
// Copy the data to the memory location requested by the meta call
|
||||||
|
void* v = args[0];
|
||||||
|
*reinterpret_cast<QDeclarativeListProperty<QDeclarativeItem>*>(v) = declProp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PySide::initQmlSupport(PyObject* module)
|
||||||
|
{
|
||||||
|
ElementFactory<PYSIDE_MAX_QML_TYPES - 1>::init();
|
||||||
|
|
||||||
|
// Export DeclarativeListProperty type
|
||||||
|
if (PyType_Ready(&PropertyListType) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Py_INCREF((PyObject*)&PropertyListType);
|
||||||
|
PyModule_AddObject(module, PropertyListType.tp_name, (PyObject*)&PropertyListType);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
57
PySide/QtDeclarative/pysideqmlregistertype.h
Normal file
57
PySide/QtDeclarative/pysideqmlregistertype.h
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
/*
|
||||||
|
* This file is part of the Shiboken Python Bindings Generator project.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* Contact: PySide team <contact@pyside.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PYSIDEQMLREGISTERTYPE_H
|
||||||
|
#define PYSIDEQMLREGISTERTYPE_H
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
|
||||||
|
struct SbkObjectType;
|
||||||
|
|
||||||
|
namespace PySide
|
||||||
|
{
|
||||||
|
|
||||||
|
extern void* nextQmlElementMemoryAddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Init the QML support doign things like registering QtDeclarative.ListProperty and create the necessary stuff for
|
||||||
|
* qmlRegisterType.
|
||||||
|
*
|
||||||
|
* \param module QtDeclarative python module
|
||||||
|
*/
|
||||||
|
void initQmlSupport(PyObject* module);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PySide implementation of qmlRegisterType<T> function.
|
||||||
|
*
|
||||||
|
* \param pyObj Python type to be registered.
|
||||||
|
* \param uri QML element uri.
|
||||||
|
* \param versionMajor QML component major version.
|
||||||
|
* \param versionMinor QML component minor version.
|
||||||
|
* \param qmlName QML element name
|
||||||
|
* \return the metatype id of the registered type.
|
||||||
|
*/
|
||||||
|
int qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, int versionMinor, const char* qmlName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -23,30 +23,70 @@
|
||||||
<load-typesystem name="typesystem_network.xml" generate="no"/>
|
<load-typesystem name="typesystem_network.xml" generate="no"/>
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||||
|
|
||||||
|
<add-function signature="qmlRegisterType(PyTypeObject, const char*, int, int, const char*)" return-type="int">
|
||||||
|
<inject-documentation format="target" mode="append">
|
||||||
|
This function registers the Python type in the QML system with the name qmlName, in the library imported from uri having the version number composed from versionMajor and versionMinor.
|
||||||
|
Returns the QML type id.
|
||||||
|
|
||||||
|
For example, this registers a Python class MySliderItem as a QML type named Slider for version 1.0 of a module called "com.mycompany.qmlcomponents":
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
qmlRegisterType(MySliderItem, "com.mycompany.qmlcomponents", 1, 0, "Slider")
|
||||||
|
|
||||||
|
Once this is registered, the type can be used in QML by importing the specified module name and version number:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
import com.mycompany.qmlcomponents 1.0
|
||||||
|
|
||||||
|
Slider { ... }
|
||||||
|
|
||||||
|
Note that it's perfectly reasonable for a library to register types to older versions than the actual version of the library. Indeed, it is normal for the new library to allow QML written to previous versions to continue to work, even if more advanced versions of some of its types are available.
|
||||||
|
</inject-documentation>
|
||||||
|
|
||||||
|
<inject-code class="target">
|
||||||
|
int %0 = PySide::qmlRegisterType(%ARGUMENT_NAMES);
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[int](%0);
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
|
||||||
<enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES" since="4.7">
|
<enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES" since="4.7">
|
||||||
<extra-includes>
|
<extra-includes>
|
||||||
<include file-name="QtDeclarative" location="global"/>
|
<include file-name="QtDeclarative" location="global"/>
|
||||||
|
<!-- FIXME The include tag doesn't work on modules -->
|
||||||
|
<include file-name="pysideqmlregistertype.h" location="local"/>
|
||||||
</extra-includes>
|
</extra-includes>
|
||||||
</enum-type>
|
</enum-type>
|
||||||
|
|
||||||
<inject-code>
|
<inject-code class="target" position="end">
|
||||||
Shiboken::TypeResolver::createValueTypeResolver< QList<QObject*> >("QList<QObject*>");
|
Shiboken::TypeResolver::createValueTypeResolver< QList<QObject*> >("QList<QObject*>");
|
||||||
|
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" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QDeclarativeContext">
|
<object-type name="QDeclarativeContext">
|
||||||
<modify-function signature="setContextProperty(const QString &, QObject*)">
|
<modify-function signature="setContextProperty(const QString &, QObject*)">
|
||||||
<modify-argument index="2">
|
<inject-code class="target" position="end">
|
||||||
<reference-count action="add"/>
|
QByteArray key("%FUNCTION_NAME_");
|
||||||
</modify-argument>
|
key.append(%1.toLocal8Bit());
|
||||||
|
Shiboken::Object::keepReference(reinterpret_cast<SbkObject*>(%PYSELF), key.constData(), %PYARG_2);
|
||||||
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QDeclarativeEngine">
|
<object-type name="QDeclarativeEngine">
|
||||||
<enum-type name="ObjectOwnership" />
|
<enum-type name="ObjectOwnership" />
|
||||||
|
<modify-function signature="QDeclarativeEngine(QObject*)">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<rename to="parent" /> <!-- Qt names this just p -->
|
||||||
|
</modify-argument>
|
||||||
|
</modify-function>
|
||||||
<modify-function signature="setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory*)">
|
<modify-function signature="setNetworkAccessManagerFactory(QDeclarativeNetworkAccessManagerFactory*)">
|
||||||
<modify-argument index="1">
|
<modify-argument index="1">
|
||||||
<parent index="this" action="add" />
|
<parent index="this" action="add" />
|
||||||
|
|
@ -60,6 +100,9 @@
|
||||||
<enum-type name="ImageType" />
|
<enum-type name="ImageType" />
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QDeclarativeItem">
|
<object-type name="QDeclarativeItem">
|
||||||
|
<extra-includes>
|
||||||
|
<include file-name="pysideqmlregistertype.h" location="local"/>
|
||||||
|
</extra-includes>
|
||||||
<enum-type name="TransformOrigin" />
|
<enum-type name="TransformOrigin" />
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
|
|
@ -78,7 +121,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
|
||||||
|
|
@ -17,7 +17,7 @@ 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 +60,23 @@ else()
|
||||||
)
|
)
|
||||||
endif ()
|
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 +242,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,28 +396,14 @@ ${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_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)
|
|
||||||
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_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/
|
||||||
|
|
@ -421,8 +425,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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ inline void addLayoutOwnership(QLayout* layout, QLayout* other)
|
||||||
|
|
||||||
for (int i=0, i_max=other->count(); i < i_max; i++) {
|
for (int i=0, i_max=other->count(); i < i_max; i++) {
|
||||||
QLayoutItem* item = other->itemAt(i);
|
QLayoutItem* item = other->itemAt(i);
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred() || !item)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
addLayoutOwnership(layout, item);
|
addLayoutOwnership(layout, item);
|
||||||
|
|
|
||||||
|
|
@ -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 = Shiboken::Converter<QApplication*>::toPython(qApp);
|
||||||
|
Py_INCREF(pyApp);
|
||||||
|
PyModule_AddObject(module, "qApp", pyApp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
PyModule_AddObject(module, "qApp", Py_None);
|
||||||
|
}
|
||||||
moduleQtGui = module;
|
moduleQtGui = module;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ static inline void qwidgetReparentLayout(QWidget *parent, QLayout *layout)
|
||||||
|
|
||||||
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);
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred() || !item)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QWidget* w = item->widget();
|
QWidget* w = item->widget();
|
||||||
|
|
|
||||||
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" />
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,10 @@
|
||||||
<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">
|
||||||
|
<!-- ### Both methods return void pointers, for which particular cases no handling was discussed. -->
|
||||||
<modify-function signature="visual()const" remove="all"/>
|
<modify-function signature="visual()const" remove="all"/>
|
||||||
<modify-function signature="appVisual(int)" remove="all"/>
|
<modify-function signature="appVisual(int)" remove="all"/>
|
||||||
|
<!-- ### -->
|
||||||
</value-type>
|
</value-type>
|
||||||
<object-type name="QX11EmbedContainer">
|
<object-type name="QX11EmbedContainer">
|
||||||
<enum-type name="Error"/>
|
<enum-type name="Error"/>
|
||||||
|
|
|
||||||
|
|
@ -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}")
|
set(QtMaemo5_typesystem_path "${QtCore_SOURCE_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>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,14 +53,9 @@ ${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 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_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/
|
||||||
|
|
@ -72,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,4 +1,4 @@
|
||||||
PySide::AutoArrayPointer<char> data(%ARGUMENT_NAMES);
|
Shiboken::AutoArrayPointer<char> data(%ARGUMENT_NAMES);
|
||||||
QHostAddress ha;
|
QHostAddress ha;
|
||||||
quint16 port;
|
quint16 port;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,11 @@
|
||||||
</namespace-type>
|
</namespace-type>
|
||||||
|
|
||||||
<rejection class="QIPv6Address" field-name="c"/>
|
<rejection class="QIPv6Address" field-name="c"/>
|
||||||
<rejection class="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/>
|
||||||
|
|
@ -149,13 +138,13 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="beginning" file="glue/qudpsocket_read_datagram_glue.cpp"/>
|
<inject-code class="target" position="beginning" file="glue/qudpsocket_read_datagram_glue.cpp"/>
|
||||||
</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 -->
|
||||||
|
|
@ -190,7 +179,7 @@
|
||||||
<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 +193,9 @@
|
||||||
|
|
||||||
<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" />
|
||||||
|
<!-- ### -->
|
||||||
</value-type>
|
</value-type>
|
||||||
|
|
||||||
<value-type name="QHostInfo">
|
<value-type name="QHostInfo">
|
||||||
|
|
@ -219,21 +210,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 +281,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 +306,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>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,10 @@
|
||||||
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
<load-typesystem name="typesystem_gui.xml" generate="no" />
|
||||||
|
|
||||||
<rejection class="QGLColormap::QGLColormapData"/>
|
<rejection class="QGLColormap::QGLColormapData"/>
|
||||||
<rejection class="QGLWidget" function-name="setMouseTracking"/>
|
|
||||||
<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>
|
||||||
|
|
@ -40,11 +39,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>
|
||||||
|
|
@ -52,16 +52,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"/>
|
||||||
|
|
@ -84,24 +78,576 @@
|
||||||
<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) {
|
||||||
|
$ATTR_TYPE *_list = new $ATTR_TYPE[_size];
|
||||||
|
if (_size) {
|
||||||
|
Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_2, "Failed to parse sequence with type %VECTOR_TYPE."));
|
||||||
|
for(int i=0; i < _size; i++) {
|
||||||
|
PyObject* pv = PySequence_Fast_GET_ITEM(fast.object(), i);
|
||||||
|
_list[i] = %CONVERTTOCPP[$ATTR_TYPE](pv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%CPPSELF.%FUNCTION_NAME(%1, _list, $ARG0);
|
||||||
|
delete[] _list;
|
||||||
|
} else {
|
||||||
|
%CPPSELF.%FUNCTION_NAME(%1, ($ATTR_TYPE*)NULL, $ARG1);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<object-type name="QGLShaderProgram" since="4.6">
|
||||||
|
<!-- setAttributeArray -->
|
||||||
|
<modify-function signature="setAttributeArray(int, const QVector2D*, int)" rename="setAttributeArray2D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector2D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(int, const QVector3D*, int)" rename="setAttributeArray3D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector3D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(int, const QVector4D*, int)" rename="setAttributeArray4D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector4D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(const char*, const QVector2D*, int)" rename="setAttributeArray2D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector2D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(const char*, const QVector3D*, int)" rename="setAttributeArray3D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector3D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
<modify-function signature="setAttributeArray(const char*, const QVector4D*, int)" rename="setAttributeArray4D">
|
||||||
|
<modify-argument index="2" >
|
||||||
|
<replace-type modified-type="PySequence" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
<insert-template name="callArrayFunction">
|
||||||
|
<replace from="$ARG0" to="%3" />
|
||||||
|
<replace from="$ARG1" to="%3" />
|
||||||
|
<replace from="$ATTR_TYPE" to="QVector4D"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- setUniformValueArray -->
|
||||||
|
<modify-function signature="setUniformValueArray(int, const int*, 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 uint*, 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 int*, 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 uint*, 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>
|
||||||
|
|
||||||
|
<!-- ### 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 float*,int,int)" remove="all" />
|
<modify-function signature="setAttributeValue(int,const float*,int,int)" remove="all" />
|
||||||
<modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" />
|
<modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" />
|
||||||
<modify-function signature="setAttributeArray(int, uint, const void*, int, int)" remove="all" since="4.7" />
|
<modify-function signature="setAttributeArray(int, uint, const void*, int, int)" remove="all" since="4.7" />
|
||||||
<modify-function signature="setAttributeArray(const char*, uint, const void*, int, int)" remove="all" since="4.7" />
|
<modify-function signature="setAttributeArray(const char*, uint, const void*, int, int)" remove="all" since="4.7" />
|
||||||
|
<!-- ### -->
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<!-- Qt 4.7 -->
|
<!-- Qt 4.7 -->
|
||||||
|
|
@ -124,12 +670,18 @@
|
||||||
</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)">
|
||||||
|
|
|
||||||
|
|
@ -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,7 +22,7 @@ ${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}")
|
||||||
|
|
|
||||||
|
|
@ -38,18 +38,62 @@
|
||||||
<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"/>
|
||||||
</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">
|
<value-type name="QScriptValue">
|
||||||
<enum-type name="PropertyFlag" flags="QScriptValue::PropertyFlags"/>
|
<enum-type name="PropertyFlag" flags="PropertyFlags"/>
|
||||||
<enum-type name="ResolveFlag" flags="QScriptValue::ResolveFlags"/>
|
<enum-type name="ResolveFlag" flags="ResolveFlags"/>
|
||||||
<enum-type name="SpecialValue"/>
|
<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 = PyString_FromString(qPrintable(format));
|
||||||
|
} else {
|
||||||
|
%PYARG_0 = PyObject_Str((PyObject*)%PYSELF);
|
||||||
|
}
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
<add-function signature="__mgetitem__">
|
||||||
|
<inject-code>
|
||||||
|
Shiboken::AutoDecRef key(PyObject_Str(_key));
|
||||||
|
QVariant res = %CPPSELF.property(PyString_AS_STRING(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>
|
</value-type>
|
||||||
<object-type name="QScriptValueIterator"/>
|
<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();
|
||||||
|
%PYARG_0 = Shiboken::makeTuple(%CPPSELF.name(), %CPPSELF.value().toVariant());
|
||||||
|
} else {
|
||||||
|
PyErr_SetNone(PyExc_StopIteration);
|
||||||
|
}
|
||||||
|
</inject-code>
|
||||||
|
</add-function>
|
||||||
|
</object-type>
|
||||||
</typesystem>
|
</typesystem>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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"/>
|
||||||
|
|
|
||||||
|
|
@ -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" />
|
||||||
|
|
|
||||||
|
|
@ -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,8 +1,17 @@
|
||||||
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}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_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,73 +5,50 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <shiboken.h>
|
#include <shiboken.h>
|
||||||
|
#include <QUiLoader>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
static void
|
static void createChildrenNameAttributes(PyObject* root, QObject* object)
|
||||||
_populate_parent(PyObject* pyParent, QObject *parent)
|
|
||||||
{
|
{
|
||||||
if (parent->children().isEmpty())
|
foreach (QObject* child, object->children()) {
|
||||||
return;
|
const QByteArray name = child->objectName().toLocal8Bit();
|
||||||
|
|
||||||
foreach(QObject *child, parent->children()) {
|
|
||||||
QString name(child->objectName());
|
|
||||||
if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
|
if (!name.isEmpty() && !name.startsWith("_") && !name.startsWith("qt_")) {
|
||||||
bool has_attr = PyObject_HasAttrString(pyParent, qPrintable(name));
|
bool hasAttr = PyObject_HasAttrString(root, name.constData());
|
||||||
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QObject*>::toPython(child));
|
if (!hasAttr) {
|
||||||
if (!has_attr)
|
Shiboken::AutoDecRef pyChild(Shiboken::Converter<QObject*>::toPython(child));
|
||||||
PyObject_SetAttrString(pyParent, qPrintable(name), pyChild);
|
PyObject_SetAttrString(root, name.constData(), pyChild);
|
||||||
|
}
|
||||||
Shiboken::Object::setParent(pyParent, pyChild);
|
createChildrenNameAttributes(root, child);
|
||||||
_populate_parent(pyChild, qobject_cast<QObject*>(child));
|
|
||||||
}
|
}
|
||||||
|
createChildrenNameAttributes(root, child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject*
|
static PyObject* QUiLoadedLoadUiFromDevice(QUiLoader* self, QIODevice* dev, QWidget* parent)
|
||||||
quiloader_load_ui_from_device(QUiLoader* self, QIODevice* dev, QWidget *parent)
|
|
||||||
{
|
{
|
||||||
QWidget *w = self->load(dev, parent);
|
QWidget* wdg = self->load(dev, parent);
|
||||||
if (w) {
|
|
||||||
QObject* _parent = parent;
|
|
||||||
if (!_parent)
|
|
||||||
_parent = w;
|
|
||||||
|
|
||||||
if (parent && parent->layout())
|
if (wdg) {
|
||||||
parent->layout()->deleteLater();
|
PyObject* pyWdg = Shiboken::Converter<QWidget*>::toPython(wdg);
|
||||||
|
|
||||||
PyObject* pyParent = Shiboken::Converter<QWidget*>::toPython(w);
|
createChildrenNameAttributes(pyWdg, wdg);
|
||||||
_populate_parent(pyParent, _parent);
|
if (parent) {
|
||||||
|
Shiboken::AutoDecRef pyParent(Shiboken::Converter<QWidget*>::toPython(parent));
|
||||||
|
Shiboken::Object::setParent(pyParent, pyWdg);
|
||||||
|
}
|
||||||
|
|
||||||
return pyParent;
|
return pyWdg;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PyErr_Occurred())
|
if (!PyErr_Occurred())
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
|
PyErr_SetString(PyExc_RuntimeError, "Unable to open/read ui device");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject*
|
static PyObject* QUiLoaderLoadUiFromFileName(QUiLoader* self, const QString& uiFile, QWidget* parent)
|
||||||
quiloader_load_ui(QUiLoader* self, const QString &ui_file, QWidget *parent)
|
|
||||||
{
|
{
|
||||||
QFile fd(ui_file);
|
QFile fd(uiFile);
|
||||||
|
return QUiLoadedLoadUiFromDevice(self, &fd, parent);
|
||||||
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
|
||||||
|
|
@ -30,6 +30,40 @@
|
||||||
Q_IMPORT_PLUGIN(uiplugin);
|
Q_IMPORT_PLUGIN(uiplugin);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
<add-function signature="registerCustomWidget(PyObject*)" return-type="void">
|
<add-function signature="registerCustomWidget(PyObject*)" return-type="void">
|
||||||
|
<modify-argument index="1">
|
||||||
|
<rename to="customWidgetType" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-documentation format="target" mode="append">
|
||||||
|
Registers a Python created custom widget to QUiLoader, so it can be recognized when
|
||||||
|
loading a `.ui` file. The custom widget type is passed via the ``customWidgetType`` argument.
|
||||||
|
This is needed when you want to override a virtual method of some widget in the interface,
|
||||||
|
since duck punching will not work with widgets created by QUiLoader based on the contents
|
||||||
|
of the `.ui` file.
|
||||||
|
|
||||||
|
(Remember that `duck punching virtual methods is an invitation for your own demise!
|
||||||
|
<http://www.pyside.org/docs/shiboken/wordsofadvice.html#duck-punching-and-virtual-methods>`_)
|
||||||
|
|
||||||
|
Let's see an obvious example. If you want to create a new widget it's probable you'll end up
|
||||||
|
overriding :class:`~PySide.QtGui.QWidget`'s :meth:`~PySide.QtGui.QWidget.paintEvent` method.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
class Circle(QWidget):
|
||||||
|
def paintEvent(self, event):
|
||||||
|
painter = QPainter(self)
|
||||||
|
painter.setPen(self.pen)
|
||||||
|
painter.setBrush(QBrush(self.color))
|
||||||
|
painter.drawEllipse(event.rect().center(), 20, 20)
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
loader = QUiLoader()
|
||||||
|
loader.registerCustomWidget(Circle)
|
||||||
|
circle = loader.load('circle.ui')
|
||||||
|
circle.show()
|
||||||
|
|
||||||
|
# ...
|
||||||
|
</inject-documentation>
|
||||||
<inject-code class="target" position="beginning">
|
<inject-code class="target" position="beginning">
|
||||||
registerCustomWidget(%PYARG_1);
|
registerCustomWidget(%PYARG_1);
|
||||||
%CPPSELF.addPluginPath(""); // force reload widgets
|
%CPPSELF.addPluginPath(""); // force reload widgets
|
||||||
|
|
@ -68,11 +102,11 @@
|
||||||
<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>
|
||||||
|
|
||||||
|
|
@ -86,11 +120,11 @@
|
||||||
<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
|
||||||
|
|
|
||||||
|
|
@ -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,14 +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>
|
||||||
<!-- TODO QMultiMap isn't implemented yet -->
|
<modify-function signature="print(QPrinter*)const" rename="print_" />
|
||||||
<modify-function signature="metaData()const" remove="all" />
|
<modify-function signature="metaData()const">
|
||||||
|
<modify-argument index="return">
|
||||||
|
<replace-type modified-type="PyObject" />
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code position="end">
|
||||||
|
<insert-template name="convertFromMultiMap">
|
||||||
|
<replace from="%MAP_NAME" to="%0"/>
|
||||||
|
<replace from="%RETURN_NAME" to="%PYARG_0"/>
|
||||||
|
<replace from="%KEY_TYPE" to="QString"/>
|
||||||
|
<replace from="%VALUE_TYPE" to="QString"/>
|
||||||
|
</insert-template>
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
</object-type>
|
</object-type>
|
||||||
|
|
||||||
<object-type name="QWebSettings">
|
<object-type name="QWebSettings">
|
||||||
|
|
@ -64,31 +73,95 @@
|
||||||
<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"/>
|
||||||
|
|
||||||
|
<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 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 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>
|
||||||
</object-type>
|
</object-type>
|
||||||
<object-type name="QWebHistory"/>
|
<object-type name="QWebHistory"/>
|
||||||
|
|
@ -97,6 +170,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"/>
|
||||||
|
|
@ -104,10 +183,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>
|
||||||
|
|
|
||||||
|
|
@ -27,33 +27,23 @@
|
||||||
<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;
|
||||||
|
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_errorMsg_, &_errorLine_, &_errorColumn_);
|
bool _ret_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_errorMsg_, &_errorLine_, &_errorColumn_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _errorColumn_);
|
%PYARG_0 = Shiboken::makeTuple(_ret_, _errorMsg_, _errorLine_, _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 +207,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 +225,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"/>
|
||||||
|
|
@ -309,7 +270,11 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
||||||
|
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
%RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
|
||||||
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
@ -332,7 +297,9 @@
|
||||||
</modify-argument>
|
</modify-argument>
|
||||||
<inject-code class="target" position="end">
|
<inject-code class="target" position="end">
|
||||||
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
QXmlInputSource* _qxmlinputsource_arg_ = 0;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
%RETURN_TYPE %0 = %CPPSELF.%TYPE::%FUNCTION_NAME(%1, %2, _qxmlinputsource_arg_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
%PYARG_0 = Shiboken::makeTuple(%0, _qxmlinputsource_arg_);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</modify-function>
|
</modify-function>
|
||||||
|
|
@ -340,16 +307,6 @@
|
||||||
<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 +409,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>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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,6 +83,7 @@
|
||||||
<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">
|
||||||
|
|
@ -84,7 +92,6 @@
|
||||||
<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,5 @@
|
||||||
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
|
__all__ = ['QtCore', 'QtGui', 'QtNetwork', 'QtOpenGL', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtScript']
|
||||||
import private
|
import private
|
||||||
|
|
||||||
__version__ = "@BINDING_API_VERSION@"
|
__version__ = "@BINDING_API_VERSION_FULL@"
|
||||||
__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@)
|
__version_info__ = (@BINDING_API_MAJOR_VERSION@, @BINDING_API_MINOR_VERSION@, @BINDING_API_MICRO_VERSION@, "@BINDING_API_RELEASE_LEVEL@", @BINDING_API_SERIAL@)
|
||||||
|
|
|
||||||
1198
PySide/global.h.in
1198
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,10 +46,9 @@ ${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}${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}
|
||||||
|
|
@ -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,20 +78,22 @@
|
||||||
<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;
|
||||||
|
|
||||||
signal_item = PySide::Signal::newObject("capabilitiesChanged", "void", NULL);
|
signal_item = PySide::Signal::newObject("capabilitiesChanged", "void", NULL);
|
||||||
PyDict_SetItemString(Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "capabilitiesChanged", (PyObject*)signal_item);
|
PyDict_SetItemString(Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "capabilitiesChanged", (PyObject*)signal_item);
|
||||||
Py_DECREF(signal_item);
|
Py_DECREF((PyObject*)signal_item);
|
||||||
|
|
||||||
signal_item = PySide::Signal::newObject("availableAudioOutputDevicesChanged", "void", NULL);
|
signal_item = PySide::Signal::newObject("availableAudioOutputDevicesChanged", "void", NULL);
|
||||||
PyDict_SetItemString( Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "availableAudioOutputDevicesChanged", (PyObject*)signal_item);
|
PyDict_SetItemString( Sbk_Phonon_BackendCapabilities_NotifierWrapper_Type.super.ht_type.tp_dict, "availableAudioOutputDevicesChanged", (PyObject*)signal_item);
|
||||||
Py_DECREF(signal_item);
|
Py_DECREF((PyObject*)signal_item);
|
||||||
</inject-code>
|
</inject-code>
|
||||||
</object-type>
|
</object-type>
|
||||||
</namespace-type>
|
</namespace-type>
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
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,9 +21,10 @@
|
||||||
<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>
|
||||||
|
|
@ -31,47 +32,65 @@
|
||||||
<!-- Templates to fix bool* parameters -->
|
<!-- Templates to fix bool* parameters -->
|
||||||
<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_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(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);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
|
||||||
</template>
|
</template>
|
||||||
<template name="get_slice">
|
<template name="get_slice">
|
||||||
|
|
@ -102,36 +121,66 @@
|
||||||
|
|
||||||
<template name="fix_args,QRectF*">
|
<template name="fix_args,QRectF*">
|
||||||
QRectF rect_;
|
QRectF rect_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
|
%PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_args,QRect*">
|
<template name="fix_args,QRect*">
|
||||||
QRect rect_;
|
QRect rect_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &rect_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
|
%PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_char*">
|
<template name="fix_char*">
|
||||||
char val_;
|
char val_;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&val_);
|
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&val_);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, val_);
|
%PYARG_0 = Shiboken::makeTuple(retval_, val_);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="fix_int*,int*,int*,int*">
|
<template name="fix_number*,number*,number*,number*">
|
||||||
int a, b, c, d;
|
$TYPE a, b, c, d;
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d);
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%CPPSELF->::%TYPE::%FUNCTION_NAME(&a, &b, &c, &d);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
|
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_qreal*,qreal*,qreal*,qreal*">
|
|
||||||
qreal a, b, c, d;
|
<template name="fix_number*,number*,number*,number*,args">
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d);
|
$TYPE a, b, c, d;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%CPPSELF->::%TYPE::%FUNCTION_NAME(&a, &b, &c, &d, %ARGUMENT_NAMES);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
|
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template name="fix_native_return_number*,number*,number*,number*">
|
||||||
|
PyObject* _obj = %PYARG_0.object();
|
||||||
|
if (!PySequence_Check(_obj)
|
||||||
|
|| 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 name="fix_int*,int*,int*,int*,int*">
|
<template name="fix_int*,int*,int*,int*,int*">
|
||||||
int a, b, c, d, e;
|
int a, b, c, d, e;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e);
|
%CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
|
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
|
||||||
</template>
|
</template>
|
||||||
<template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*">
|
<template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*">
|
||||||
|
|
@ -140,20 +189,30 @@
|
||||||
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
|
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, 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*">
|
<template name="fix_return_args,int*">
|
||||||
RETURNTYPE _ret;
|
RETURNTYPE _ret;
|
||||||
int _arg;
|
int _arg;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_arg);
|
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_arg);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret, _arg);
|
%PYARG_0 = Shiboken::makeTuple(_ret, _arg);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template name="fix_args,number*,number*">
|
||||||
|
$TYPE a, b;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
|
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &a, &b);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
|
%PYARG_0 = Shiboken::makeTuple(a, b);
|
||||||
|
</template>
|
||||||
|
|
||||||
<template name="fix_virtual_method_return_value_and_bool*">
|
<template name="fix_virtual_method_return_value_and_bool*">
|
||||||
Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
|
Shiboken::AutoDecRef _py_ret_(PySequence_GetItem(%PYARG_0, 0));
|
||||||
Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
|
Shiboken::AutoDecRef _py_ok_(PySequence_GetItem(%PYARG_0, 1));
|
||||||
|
|
@ -164,7 +223,9 @@
|
||||||
<template name="fix_arg,int*,int*">
|
<template name="fix_arg,int*,int*">
|
||||||
%RETURN_TYPE _ret;
|
%RETURN_TYPE _ret;
|
||||||
int a, b;
|
int a, b;
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
_ret = %CPPSELF.%FUNCTION_NAME(%1, &a, &b);
|
_ret = %CPPSELF.%FUNCTION_NAME(%1, &a, &b);
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(_ret, a, b);
|
%PYARG_0 = Shiboken::makeTuple(_ret, a, b);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -173,25 +234,55 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="return_tuple_QValidator_QString_int">
|
<template name="return_tuple_QValidator_QString_int">
|
||||||
|
%BEGIN_ALLOW_THREADS
|
||||||
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
|
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
|
||||||
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, %1, %2);
|
%PYARG_0 = Shiboken::makeTuple(retval_, %1, %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 = Shiboken::makeTuple(retval_, %5);
|
||||||
</template>
|
</template>
|
||||||
<template name="set_qapp_parent_for_orphan">
|
<template name="set_qapp_parent_for_orphan">
|
||||||
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
||||||
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
||||||
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
|
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 = PyString_FromString(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 = PyString_FromString(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">
|
||||||
PyObject *type = PyObject_Type(%PYSELF);
|
%PYARG_0 = Py_BuildValue("(N(%REDUCE_FORMAT))", PyObject_Type(%PYSELF), %REDUCE_ARGS);
|
||||||
PyObject *args = NULL;
|
|
||||||
args = Py_BuildValue("%REDUCE_FORMAT", %REDUCE_ARGS);
|
|
||||||
%PYARG_0 = Py_BuildValue("(NN)", type, args);
|
|
||||||
</template>
|
</template>
|
||||||
<template name="reduce_code_matrix">
|
<template name="reduce_code_matrix">
|
||||||
QList< %MATRIX_TYPE > cppArgs;
|
QList< %MATRIX_TYPE > cppArgs;
|
||||||
|
|
@ -209,7 +300,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);
|
||||||
|
|
@ -235,7 +326,50 @@
|
||||||
</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>
|
||||||
|
|
||||||
|
<!-- Replace '#' for the argument number you want. -->
|
||||||
|
<template name="return_argument">
|
||||||
|
Py_INCREF(%PYARG_#);
|
||||||
|
%PYARG_0 = %PYARG_#;
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- Iterator -->
|
||||||
|
<template name="__iter__">
|
||||||
|
Py_INCREF(%PYSELF);
|
||||||
|
%PYARG_0 = %PYSELF;
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="__iter_parent__">
|
||||||
|
%CPPSELF_TYPE _tmp = %CPPSELF.begin();
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](_tmp);
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="__next__">
|
||||||
|
if (!%CPPSELF.atEnd()) {
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[%CPPSELF_TYPE](*%CPPSELF);
|
||||||
|
++(*%CPPSELF);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="convertFromMultiMap">
|
||||||
|
%RETURN_NAME = PyDict_New();
|
||||||
|
foreach(%KEY_TYPE _key, %MAP_NAME.keys()) {
|
||||||
|
Shiboken::AutoDecRef _pyValueList(PyList_New(0));
|
||||||
|
foreach(%VALUE_TYPE _value, %MAP_NAME.values(_key)) {
|
||||||
|
Shiboken::AutoDecRef _pyValue(%CONVERTTOPYTHON[%VALUE_TYPE](_value));
|
||||||
|
PyList_Append(_pyValueList, _pyValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
Shiboken::AutoDecRef _pyKey(%CONVERTTOPYTHON[%KEY_TYPE](_key));
|
||||||
|
PyDict_SetItem(%RETURN_NAME, _pyKey, _pyValueList);
|
||||||
|
}
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="to_tuple">
|
||||||
|
%PYARG_0 = Py_BuildValue("%TT_FORMAT", %TT_ARGS);
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</typesystem>
|
</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()
|
||||||
|
|
@ -9,18 +21,19 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${${module_sources}}
|
add_custom_command(OUTPUT ${${module_sources}}
|
||||||
COMMAND ${GENERATORRUNNER_BINARY} ${GENERATOR_EXTRA_FLAGS}
|
COMMAND ${GENERATORRUNNER_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")
|
||||||
|
|
@ -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() { sizeof(${class}); }\n"
|
||||||
"int main() { typeid(${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()
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,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 ${GENERATORRUNNER_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 +27,8 @@ 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
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
|
${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml
|
||||||
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
|
WORKING_DIRECTORY ${${module}_SOURCE_DIR}
|
||||||
COMMENT "Running generator to generate documentation..."
|
COMMENT "Running generator to generate documentation..."
|
||||||
|
|
|
||||||
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>
|
|
||||||
40
doc/_themes/pysidedocs/modindex.html
vendored
40
doc/_themes/pysidedocs/modindex.html
vendored
|
|
@ -1,40 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% set title = _('Global Module Index') %}
|
|
||||||
{% block extrahead %}
|
|
||||||
{{ super() }}
|
|
||||||
{% if not embedded and collapse_modindex %}
|
|
||||||
<script type="text/javascript">
|
|
||||||
DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX = true;
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
{% block body %}
|
|
||||||
<div class="section">
|
|
||||||
<h1 id="global-module-index">{{ _('Global Module Index') }}</h1>
|
|
||||||
|
|
||||||
{%- for letter in letters %}
|
|
||||||
<a href="#cap-{{ letter }}"><strong>{{ letter }}</strong></a> {% if not loop.last %}| {% endif %}
|
|
||||||
{%- endfor %}
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
<table class="indextable" cellspacing="0" cellpadding="2">
|
|
||||||
{%- for modname, collapse, cgroup, indent, fname, synops, pform, dep, stripped in modindexentries %}
|
|
||||||
{%- if not modname -%}
|
|
||||||
{%- else -%}
|
|
||||||
<tr{% if indent %} class="cg-{{ cgroup }}"{% endif %}>
|
|
||||||
<td>{% if collapse -%}
|
|
||||||
<img src="{{ pathto('_static/minus.png', 1) }}" id="toggle-{{ cgroup }}"
|
|
||||||
class="toggler" style="display: none" alt="-" />
|
|
||||||
{%- endif %}</td>
|
|
||||||
<td>{% if indent %} {% endif %}
|
|
||||||
{% if fname %}<a href="{{ fname }}">{% endif -%}
|
|
||||||
<tt class="xref">{{ stripped|e }}{{ modname|e }}</tt>
|
|
||||||
{%- if fname %}</a>{% endif %}
|
|
||||||
{%- if pform and pform[0] %} <em>({{ pform|join(', ') }})</em>{% endif -%}
|
|
||||||
</td><td>{% if dep %}<strong>{{ _('Deprecated')}}:</strong>{% endif %}
|
|
||||||
<em>{{ synops|e }}</em></td></tr>
|
|
||||||
{%- endif -%}
|
|
||||||
{% endfor %}
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
10
doc/_themes/pysidedocs/opensearch.xml
vendored
10
doc/_themes/pysidedocs/opensearch.xml
vendored
|
|
@ -1,10 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
|
||||||
<ShortName>{{ project|e }}</ShortName>
|
|
||||||
<Description>{% trans docstitle=docstitle|e %}Search {{ docstitle }}{% endtrans %}</Description>
|
|
||||||
<InputEncoding>utf-8</InputEncoding>
|
|
||||||
<Url type="text/html" method="get"
|
|
||||||
template="{{ use_opensearch }}/{{ pathto('search') }}?q={searchTerms}&check_keywords=yes&area=default"/>
|
|
||||||
<LongName>{{ docstitle|e }}</LongName>
|
|
||||||
{% block extra %} {# Put e.g. an <Image> element here. #} {% endblock %}
|
|
||||||
</OpenSearchDescription>
|
|
||||||
4
doc/_themes/pysidedocs/page.html
vendored
4
doc/_themes/pysidedocs/page.html
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% block body %}
|
|
||||||
{{ body }}
|
|
||||||
{% endblock %}
|
|
||||||
26
doc/_themes/pysidedocs/search.html
vendored
26
doc/_themes/pysidedocs/search.html
vendored
|
|
@ -1,26 +0,0 @@
|
||||||
{% extends "layout.html" %}
|
|
||||||
{% set title = _('Search') %}
|
|
||||||
{% set script_files = script_files + ['_static/searchtools.js'] %}
|
|
||||||
{% block body %}
|
|
||||||
<div class="section">
|
|
||||||
<h1 id="search-documentation">Search Results</h1>
|
|
||||||
<div id="fallback" class="admonition warning">
|
|
||||||
<script type="text/javascript">$('#fallback').hide();</script>
|
|
||||||
<p>
|
|
||||||
{% trans %}Please activate JavaScript to enable the search
|
|
||||||
functionality.{% endtrans %}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{% if search_performed %}
|
|
||||||
{% if not search_results %}
|
|
||||||
<p>{{ _('Your search did not match any results.') }}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
<div id="search-results">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
{% block footer %}
|
|
||||||
{{ super() }}
|
|
||||||
<script type="text/javascript" src="searchindex.js"></script>
|
|
||||||
{% endblock %}
|
|
||||||
12
doc/_themes/pysidedocs/searchbox.html
vendored
Normal file
12
doc/_themes/pysidedocs/searchbox.html
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{%- if pagename != "search" %}
|
||||||
|
<div id="searchbox" style="display: none">
|
||||||
|
<h3>{{ _('Quick search') }}</h3>
|
||||||
|
<form class="search" action="{{ pathto('search') }}" method="get">
|
||||||
|
<input type="text" name="q" id="q" size="18" />
|
||||||
|
<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>
|
||||||
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||||
|
{%- endif %}
|
||||||
3
doc/_themes/pysidedocs/static/.directory
vendored
3
doc/_themes/pysidedocs/static/.directory
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
[Dolphin]
|
|
||||||
ShowPreview=true
|
|
||||||
Timestamp=2009,10,13,10,27,39
|
|
||||||
232
doc/_themes/pysidedocs/static/doctools.js
vendored
232
doc/_themes/pysidedocs/static/doctools.js
vendored
|
|
@ -1,232 +0,0 @@
|
||||||
/// XXX: make it cross browser
|
|
||||||
|
|
||||||
/**
|
|
||||||
* make the code below compatible with browsers without
|
|
||||||
* an installed firebug like debugger
|
|
||||||
*/
|
|
||||||
if (!window.console || !console.firebug) {
|
|
||||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
|
||||||
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
|
||||||
window.console = {};
|
|
||||||
for (var i = 0; i < names.length; ++i)
|
|
||||||
window.console[names[i]] = function() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* small helper function to urldecode strings
|
|
||||||
*/
|
|
||||||
jQuery.urldecode = function(x) {
|
|
||||||
return decodeURIComponent(x).replace(/\+/g, ' ');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* small helper function to urlencode strings
|
|
||||||
*/
|
|
||||||
jQuery.urlencode = encodeURIComponent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function returns the parsed url parameters of the
|
|
||||||
* current request. Multiple values per key are supported,
|
|
||||||
* it will always return arrays of strings for the value parts.
|
|
||||||
*/
|
|
||||||
jQuery.getQueryParameters = function(s) {
|
|
||||||
if (typeof s == 'undefined')
|
|
||||||
s = document.location.search;
|
|
||||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
|
||||||
var result = {};
|
|
||||||
for (var i = 0; i < parts.length; i++) {
|
|
||||||
var tmp = parts[i].split('=', 2);
|
|
||||||
var key = jQuery.urldecode(tmp[0]);
|
|
||||||
var value = jQuery.urldecode(tmp[1]);
|
|
||||||
if (key in result)
|
|
||||||
result[key].push(value);
|
|
||||||
else
|
|
||||||
result[key] = [value];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* small function to check if an array contains
|
|
||||||
* a given item.
|
|
||||||
*/
|
|
||||||
jQuery.contains = function(arr, item) {
|
|
||||||
for (var i = 0; i < arr.length; i++) {
|
|
||||||
if (arr[i] == item)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* highlight a given string on a jquery object by wrapping it in
|
|
||||||
* span elements with the given class name.
|
|
||||||
*/
|
|
||||||
jQuery.fn.highlightText = function(text, className) {
|
|
||||||
function highlight(node) {
|
|
||||||
if (node.nodeType == 3) {
|
|
||||||
var val = node.nodeValue;
|
|
||||||
var pos = val.toLowerCase().indexOf(text);
|
|
||||||
if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) {
|
|
||||||
var span = document.createElement("span");
|
|
||||||
span.className = className;
|
|
||||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
|
||||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
|
||||||
document.createTextNode(val.substr(pos + text.length)),
|
|
||||||
node.nextSibling));
|
|
||||||
node.nodeValue = val.substr(0, pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!jQuery(node).is("button, select, textarea")) {
|
|
||||||
jQuery.each(node.childNodes, function() {
|
|
||||||
highlight(this)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this.each(function() {
|
|
||||||
highlight(this);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Small JavaScript module for the documentation.
|
|
||||||
*/
|
|
||||||
var Documentation = {
|
|
||||||
|
|
||||||
init : function() {
|
|
||||||
this.fixFirefoxAnchorBug();
|
|
||||||
this.highlightSearchWords();
|
|
||||||
this.initModIndex();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* i18n support
|
|
||||||
*/
|
|
||||||
TRANSLATIONS : {},
|
|
||||||
PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
|
|
||||||
LOCALE : 'unknown',
|
|
||||||
|
|
||||||
// gettext and ngettext don't access this so that the functions
|
|
||||||
// can savely bound to a different name (_ = Documentation.gettext)
|
|
||||||
gettext : function(string) {
|
|
||||||
var translated = Documentation.TRANSLATIONS[string];
|
|
||||||
if (typeof translated == 'undefined')
|
|
||||||
return string;
|
|
||||||
return (typeof translated == 'string') ? translated : translated[0];
|
|
||||||
},
|
|
||||||
|
|
||||||
ngettext : function(singular, plural, n) {
|
|
||||||
var translated = Documentation.TRANSLATIONS[singular];
|
|
||||||
if (typeof translated == 'undefined')
|
|
||||||
return (n == 1) ? singular : plural;
|
|
||||||
return translated[Documentation.PLURALEXPR(n)];
|
|
||||||
},
|
|
||||||
|
|
||||||
addTranslations : function(catalog) {
|
|
||||||
for (var key in catalog.messages)
|
|
||||||
this.TRANSLATIONS[key] = catalog.messages[key];
|
|
||||||
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
|
||||||
this.LOCALE = catalog.locale;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* add context elements like header anchor links
|
|
||||||
*/
|
|
||||||
addContextElements : function() {
|
|
||||||
$('div[id] > :header:first').each(function() {
|
|
||||||
$('<a class="headerlink">\u00B6</a>').
|
|
||||||
attr('href', '#' + this.id).
|
|
||||||
attr('title', _('Permalink to this headline')).
|
|
||||||
appendTo(this);
|
|
||||||
});
|
|
||||||
$('dt[id]').each(function() {
|
|
||||||
$('<a class="headerlink">\u00B6</a>').
|
|
||||||
attr('href', '#' + this.id).
|
|
||||||
attr('title', _('Permalink to this definition')).
|
|
||||||
appendTo(this);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* workaround a firefox stupidity
|
|
||||||
*/
|
|
||||||
fixFirefoxAnchorBug : function() {
|
|
||||||
if (document.location.hash && $.browser.mozilla)
|
|
||||||
window.setTimeout(function() {
|
|
||||||
document.location.href += '';
|
|
||||||
}, 10);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* highlight the search words provided in the url in the text
|
|
||||||
*/
|
|
||||||
highlightSearchWords : function() {
|
|
||||||
var params = $.getQueryParameters();
|
|
||||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
|
||||||
if (terms.length) {
|
|
||||||
var body = $('div.body');
|
|
||||||
window.setTimeout(function() {
|
|
||||||
$.each(terms, function() {
|
|
||||||
body.highlightText(this.toLowerCase(), 'highlight');
|
|
||||||
});
|
|
||||||
}, 10);
|
|
||||||
$('<li class="highlight-link"><a href="javascript:Documentation.' +
|
|
||||||
'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
|
|
||||||
.appendTo($('.sidebar .this-page-menu'));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* init the modindex toggle buttons
|
|
||||||
*/
|
|
||||||
initModIndex : function() {
|
|
||||||
var togglers = $('img.toggler').click(function() {
|
|
||||||
var src = $(this).attr('src');
|
|
||||||
var idnum = $(this).attr('id').substr(7);
|
|
||||||
console.log($('tr.cg-' + idnum).toggle());
|
|
||||||
if (src.substr(-9) == 'minus.png')
|
|
||||||
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
|
||||||
else
|
|
||||||
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
|
||||||
}).css('display', '');
|
|
||||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) {
|
|
||||||
togglers.click();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* helper function to hide the search marks again
|
|
||||||
*/
|
|
||||||
hideSearchWords : function() {
|
|
||||||
$('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
|
|
||||||
$('span.highlight').removeClass('highlight');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* make the url absolute
|
|
||||||
*/
|
|
||||||
makeURL : function(relativeURL) {
|
|
||||||
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get the current relative url
|
|
||||||
*/
|
|
||||||
getCurrentURL : function() {
|
|
||||||
var path = document.location.pathname;
|
|
||||||
var parts = path.split(/\//);
|
|
||||||
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
|
||||||
if (this == '..')
|
|
||||||
parts.pop();
|
|
||||||
});
|
|
||||||
var url = parts.join('/');
|
|
||||||
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// quick alias for translations
|
|
||||||
_ = Documentation.gettext;
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
Documentation.init();
|
|
||||||
});
|
|
||||||
32
doc/_themes/pysidedocs/static/jquery.js
vendored
32
doc/_themes/pysidedocs/static/jquery.js
vendored
File diff suppressed because one or more lines are too long
127
doc/_themes/pysidedocs/static/pysidedocs.css
vendored
127
doc/_themes/pysidedocs/static/pysidedocs.css
vendored
|
|
@ -19,7 +19,7 @@ strong {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#body {
|
.document {
|
||||||
padding-bottom: 90px;
|
padding-bottom: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -31,8 +31,8 @@ strong {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer {
|
.footer {
|
||||||
position:absolute;
|
position: absolute;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
|
|
@ -43,40 +43,40 @@ strong {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer img {
|
.footer img {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar {
|
.sphinxsidebar {
|
||||||
float: left;
|
float: left;
|
||||||
width: 250px;
|
width: 250px;
|
||||||
padding: 0px 10px 0px 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar ul {
|
.sphinxsidebar ul {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar > ul {
|
.sphinxsidebar > ul {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar ul li {
|
.sphinxsidebar ul li {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar h3, #sidebar h3 a {
|
.sphinxsidebar h3, .sphinxsidebar h3 a {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
#body > div.section {
|
.documentwrapper {
|
||||||
margin-left: 270px;
|
margin-left: 270px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
@ -92,7 +92,7 @@ h1 {
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
border-bottom: 1px solid #c2c2c2;
|
border-bottom: 1px solid #c2c2c2;
|
||||||
text-transform:uppercase;
|
/* text-transform:uppercase; */
|
||||||
margin-right: -100px;
|
margin-right: -100px;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: -50px;
|
left: -50px;
|
||||||
|
|
@ -136,8 +136,23 @@ pre * {
|
||||||
font: 100% monospace;
|
font: 100% monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pre {
|
||||||
|
font: 100% monospace;
|
||||||
|
}
|
||||||
|
|
||||||
.headerlink {
|
.headerlink {
|
||||||
display: none;
|
font-size: 100%;
|
||||||
|
color: inherit;
|
||||||
|
float: right;
|
||||||
|
visibility: Hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 .headerlink {
|
||||||
|
padding-right: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink {
|
||||||
|
visibility: Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
a, a:visited {
|
a, a:visited {
|
||||||
|
|
@ -250,26 +265,24 @@ hr {
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************* TOPO *****************************/
|
/******************* TOPO *****************************/
|
||||||
#header {
|
.header {
|
||||||
background-image: url(bg_topo.jpg);
|
background-image: url(bg_topo.jpg);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
height: 147px;
|
height: 147px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#header_container {
|
.header_container {
|
||||||
background-image: url(bg_header.png);
|
background-image: url(bg_header.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 100px 0px;
|
background-position: 100px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo {
|
.logo {
|
||||||
background-image: url(pysidelogo.png);
|
text-align: left;
|
||||||
background-repeat: no-repeat;
|
margin-bottom: 10px;
|
||||||
/* background-position: 0px 4px; */
|
|
||||||
height: 112px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_box {
|
#searchbox {
|
||||||
border-top: 1px solid #989898;
|
border-top: 1px solid #989898;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
margin-left: -10px;
|
margin-left: -10px;
|
||||||
|
|
@ -337,31 +350,39 @@ em {
|
||||||
|
|
||||||
/******** REL bar *********/
|
/******** REL bar *********/
|
||||||
|
|
||||||
#relbar {
|
.related {
|
||||||
padding: 0px 10px 0px 10px;
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.related ul {
|
||||||
|
padding: 0px 0px 0px 10px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
background-image: url(relbar_bg.png);
|
background-image: url(relbar_bg.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
#relbar li {
|
.related li {
|
||||||
display: inline;
|
display: inline;
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#relbar li a {
|
.related li a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#relbar li.right {
|
.related li.right {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.related h3 {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.align-center {
|
.align-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
@ -400,13 +421,57 @@ table.footnote {
|
||||||
}
|
}
|
||||||
|
|
||||||
tt.descname {
|
tt.descname {
|
||||||
|
font-size: 120%;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.method {
|
#functions ul, #virtual-functions ul, #slots ul, #signals ul, #static-functions ul {
|
||||||
border-top: 1px solid #c2c2c2;
|
list-style: none;
|
||||||
margin-right: -100px;
|
margin: 0px;
|
||||||
position: relative;
|
padding: 10px;
|
||||||
left: -50px;
|
border: 1px solid #ddd;
|
||||||
padding: 10px 50px 0px 50px;
|
background-color: #f4f4f4;
|
||||||
|
-moz-border-radius:10px;
|
||||||
|
-webkit-border-radius:10px;
|
||||||
|
-khtml-border-radius:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#synopsis span.pre {
|
||||||
|
color: #009491;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
#detailed-description .class dt, #detailed-description .method dt, #detailed-description .attribute dt {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 10px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
-moz-border-radius:10px;
|
||||||
|
-webkit-border-radius:10px;
|
||||||
|
-khtml-border-radius:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pysidetoc ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pysidetoc em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pysidetoc strong {
|
||||||
|
display: block;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
-moz-border-radius:6px;
|
||||||
|
-webkit-border-radius:6px;
|
||||||
|
-khtml-border-radius:6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
467
doc/_themes/pysidedocs/static/searchtools.js
vendored
467
doc/_themes/pysidedocs/static/searchtools.js
vendored
|
|
@ -1,467 +0,0 @@
|
||||||
/**
|
|
||||||
* helper function to return a node containing the
|
|
||||||
* search summary for a given text. keywords is a list
|
|
||||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
|
||||||
* words. the first one is used to find the occurance, the
|
|
||||||
* latter for highlighting it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
jQuery.makeSearchSummary = function(text, keywords, hlwords) {
|
|
||||||
var textLower = text.toLowerCase();
|
|
||||||
var start = 0;
|
|
||||||
$.each(keywords, function() {
|
|
||||||
var i = textLower.indexOf(this.toLowerCase());
|
|
||||||
if (i > -1)
|
|
||||||
start = i;
|
|
||||||
});
|
|
||||||
start = Math.max(start - 120, 0);
|
|
||||||
var excerpt = ((start > 0) ? '...' : '') +
|
|
||||||
$.trim(text.substr(start, 240)) +
|
|
||||||
((start + 240 - text.length) ? '...' : '');
|
|
||||||
var rv = $('<div class="context"></div>').text(excerpt);
|
|
||||||
$.each(hlwords, function() {
|
|
||||||
rv = rv.highlightText(this, 'highlight');
|
|
||||||
});
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Porter Stemmer
|
|
||||||
*/
|
|
||||||
var PorterStemmer = function() {
|
|
||||||
|
|
||||||
var step2list = {
|
|
||||||
ational: 'ate',
|
|
||||||
tional: 'tion',
|
|
||||||
enci: 'ence',
|
|
||||||
anci: 'ance',
|
|
||||||
izer: 'ize',
|
|
||||||
bli: 'ble',
|
|
||||||
alli: 'al',
|
|
||||||
entli: 'ent',
|
|
||||||
eli: 'e',
|
|
||||||
ousli: 'ous',
|
|
||||||
ization: 'ize',
|
|
||||||
ation: 'ate',
|
|
||||||
ator: 'ate',
|
|
||||||
alism: 'al',
|
|
||||||
iveness: 'ive',
|
|
||||||
fulness: 'ful',
|
|
||||||
ousness: 'ous',
|
|
||||||
aliti: 'al',
|
|
||||||
iviti: 'ive',
|
|
||||||
biliti: 'ble',
|
|
||||||
logi: 'log'
|
|
||||||
};
|
|
||||||
|
|
||||||
var step3list = {
|
|
||||||
icate: 'ic',
|
|
||||||
ative: '',
|
|
||||||
alize: 'al',
|
|
||||||
iciti: 'ic',
|
|
||||||
ical: 'ic',
|
|
||||||
ful: '',
|
|
||||||
ness: ''
|
|
||||||
};
|
|
||||||
|
|
||||||
var c = "[^aeiou]"; // consonant
|
|
||||||
var v = "[aeiouy]"; // vowel
|
|
||||||
var C = c + "[^aeiouy]*"; // consonant sequence
|
|
||||||
var V = v + "[aeiou]*"; // vowel sequence
|
|
||||||
|
|
||||||
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
|
|
||||||
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
|
|
||||||
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
|
|
||||||
var s_v = "^(" + C + ")?" + v; // vowel in stem
|
|
||||||
|
|
||||||
this.stemWord = function (w) {
|
|
||||||
var stem;
|
|
||||||
var suffix;
|
|
||||||
var firstch;
|
|
||||||
var origword = w;
|
|
||||||
|
|
||||||
if (w.length < 3)
|
|
||||||
return w;
|
|
||||||
|
|
||||||
var re;
|
|
||||||
var re2;
|
|
||||||
var re3;
|
|
||||||
var re4;
|
|
||||||
|
|
||||||
firstch = w.substr(0,1);
|
|
||||||
if (firstch == "y")
|
|
||||||
w = firstch.toUpperCase() + w.substr(1);
|
|
||||||
|
|
||||||
// Step 1a
|
|
||||||
re = /^(.+?)(ss|i)es$/;
|
|
||||||
re2 = /^(.+?)([^s])s$/;
|
|
||||||
|
|
||||||
if (re.test(w))
|
|
||||||
w = w.replace(re,"$1$2");
|
|
||||||
else if (re2.test(w))
|
|
||||||
w = w.replace(re2,"$1$2");
|
|
||||||
|
|
||||||
// Step 1b
|
|
||||||
re = /^(.+?)eed$/;
|
|
||||||
re2 = /^(.+?)(ed|ing)$/;
|
|
||||||
if (re.test(w)) {
|
|
||||||
var fp = re.exec(w);
|
|
||||||
re = new RegExp(mgr0);
|
|
||||||
if (re.test(fp[1])) {
|
|
||||||
re = /.$/;
|
|
||||||
w = w.replace(re,"");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (re2.test(w)) {
|
|
||||||
var fp = re2.exec(w);
|
|
||||||
stem = fp[1];
|
|
||||||
re2 = new RegExp(s_v);
|
|
||||||
if (re2.test(stem)) {
|
|
||||||
w = stem;
|
|
||||||
re2 = /(at|bl|iz)$/;
|
|
||||||
re3 = new RegExp("([^aeiouylsz])\\1$");
|
|
||||||
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
|
||||||
if (re2.test(w))
|
|
||||||
w = w + "e";
|
|
||||||
else if (re3.test(w)) {
|
|
||||||
re = /.$/;
|
|
||||||
w = w.replace(re,"");
|
|
||||||
}
|
|
||||||
else if (re4.test(w))
|
|
||||||
w = w + "e";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 1c
|
|
||||||
re = /^(.+?)y$/;
|
|
||||||
if (re.test(w)) {
|
|
||||||
var fp = re.exec(w);
|
|
||||||
stem = fp[1];
|
|
||||||
re = new RegExp(s_v);
|
|
||||||
if (re.test(stem))
|
|
||||||
w = stem + "i";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 2
|
|
||||||
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
|
||||||
if (re.test(w)) {
|
|
||||||
var fp = re.exec(w);
|
|
||||||
stem = fp[1];
|
|
||||||
suffix = fp[2];
|
|
||||||
re = new RegExp(mgr0);
|
|
||||||
if (re.test(stem))
|
|
||||||
w = stem + step2list[suffix];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 3
|
|
||||||
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
|
||||||
if (re.test(w)) {
|
|
||||||
var fp = re.exec(w);
|
|
||||||
stem = fp[1];
|
|
||||||
suffix = fp[2];
|
|
||||||
re = new RegExp(mgr0);
|
|
||||||
if (re.test(stem))
|
|
||||||
w = stem + step3list[suffix];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 4
|
|
||||||
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
|
||||||
re2 = /^(.+?)(s|t)(ion)$/;
|
|
||||||
if (re.test(w)) {
|
|
||||||
var fp = re.exec(w);
|
|
||||||
stem = fp[1];
|
|
||||||
re = new RegExp(mgr1);
|
|
||||||
if (re.test(stem))
|
|
||||||
w = stem;
|
|
||||||
}
|
|
||||||
else if (re2.test(w)) {
|
|
||||||
var fp = re2.exec(w);
|
|
||||||
stem = fp[1] + fp[2];
|
|
||||||
re2 = new RegExp(mgr1);
|
|
||||||
if (re2.test(stem))
|
|
||||||
w = stem;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 5
|
|
||||||
re = /^(.+?)e$/;
|
|
||||||
if (re.test(w)) {
|
|
||||||
var fp = re.exec(w);
|
|
||||||
stem = fp[1];
|
|
||||||
re = new RegExp(mgr1);
|
|
||||||
re2 = new RegExp(meq1);
|
|
||||||
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
|
|
||||||
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
|
|
||||||
w = stem;
|
|
||||||
}
|
|
||||||
re = /ll$/;
|
|
||||||
re2 = new RegExp(mgr1);
|
|
||||||
if (re.test(w) && re2.test(w)) {
|
|
||||||
re = /.$/;
|
|
||||||
w = w.replace(re,"");
|
|
||||||
}
|
|
||||||
|
|
||||||
// and turn initial Y back to y
|
|
||||||
if (firstch == "y")
|
|
||||||
w = firstch.toLowerCase() + w.substr(1);
|
|
||||||
return w;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Search Module
|
|
||||||
*/
|
|
||||||
var Search = {
|
|
||||||
|
|
||||||
_index : null,
|
|
||||||
_queued_query : null,
|
|
||||||
_pulse_status : -1,
|
|
||||||
|
|
||||||
init : function() {
|
|
||||||
var params = $.getQueryParameters();
|
|
||||||
if (params.q) {
|
|
||||||
var query = params.q[0];
|
|
||||||
$('input[name="q"]')[0].value = query;
|
|
||||||
this.performSearch(query);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the index
|
|
||||||
*/
|
|
||||||
setIndex : function(index) {
|
|
||||||
var q;
|
|
||||||
this._index = index;
|
|
||||||
if ((q = this._queued_query) !== null) {
|
|
||||||
this._queued_query = null;
|
|
||||||
Search.query(q);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
hasIndex : function() {
|
|
||||||
return this._index !== null;
|
|
||||||
},
|
|
||||||
|
|
||||||
deferQuery : function(query) {
|
|
||||||
this._queued_query = query;
|
|
||||||
},
|
|
||||||
|
|
||||||
stopPulse : function() {
|
|
||||||
this._pulse_status = 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
startPulse : function() {
|
|
||||||
if (this._pulse_status >= 0)
|
|
||||||
return;
|
|
||||||
function pulse() {
|
|
||||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
|
||||||
var dotString = '';
|
|
||||||
for (var i = 0; i < Search._pulse_status; i++)
|
|
||||||
dotString += '.';
|
|
||||||
Search.dots.text(dotString);
|
|
||||||
if (Search._pulse_status > -1)
|
|
||||||
window.setTimeout(pulse, 500);
|
|
||||||
};
|
|
||||||
pulse();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* perform a search for something
|
|
||||||
*/
|
|
||||||
performSearch : function(query) {
|
|
||||||
// create the required interface elements
|
|
||||||
this.out = $('#search-results');
|
|
||||||
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
|
|
||||||
this.dots = $('<span></span>').appendTo(this.title);
|
|
||||||
this.status = $('<p style="display: none"></p>').appendTo(this.out);
|
|
||||||
this.output = $('<ul class="search"/>').appendTo(this.out);
|
|
||||||
|
|
||||||
$('#search-progress').text(_('Preparing search...'));
|
|
||||||
this.startPulse();
|
|
||||||
|
|
||||||
// index already loaded, the browser was quick!
|
|
||||||
if (this.hasIndex())
|
|
||||||
this.query(query);
|
|
||||||
else
|
|
||||||
this.deferQuery(query);
|
|
||||||
},
|
|
||||||
|
|
||||||
query : function(query) {
|
|
||||||
// stem the searchterms and add them to the
|
|
||||||
// correct list
|
|
||||||
var stemmer = new PorterStemmer();
|
|
||||||
var searchterms = [];
|
|
||||||
var excluded = [];
|
|
||||||
var hlterms = [];
|
|
||||||
var tmp = query.split(/\s+/);
|
|
||||||
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
|
|
||||||
for (var i = 0; i < tmp.length; i++) {
|
|
||||||
// stem the word
|
|
||||||
var word = stemmer.stemWord(tmp[i]).toLowerCase();
|
|
||||||
// select the correct list
|
|
||||||
if (word[0] == '-') {
|
|
||||||
var toAppend = excluded;
|
|
||||||
word = word.substr(1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var toAppend = searchterms;
|
|
||||||
hlterms.push(tmp[i].toLowerCase());
|
|
||||||
}
|
|
||||||
// only add if not already in the list
|
|
||||||
if (!$.contains(toAppend, word))
|
|
||||||
toAppend.push(word);
|
|
||||||
};
|
|
||||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
|
||||||
|
|
||||||
console.debug('SEARCH: searching for:');
|
|
||||||
console.info('required: ', searchterms);
|
|
||||||
console.info('excluded: ', excluded);
|
|
||||||
|
|
||||||
// prepare search
|
|
||||||
var filenames = this._index.filenames;
|
|
||||||
var titles = this._index.titles;
|
|
||||||
var terms = this._index.terms;
|
|
||||||
var descrefs = this._index.descrefs;
|
|
||||||
var modules = this._index.modules;
|
|
||||||
var desctypes = this._index.desctypes;
|
|
||||||
var fileMap = {};
|
|
||||||
var files = null;
|
|
||||||
var objectResults = [];
|
|
||||||
var regularResults = [];
|
|
||||||
$('#search-progress').empty();
|
|
||||||
|
|
||||||
// lookup as object
|
|
||||||
if (object != null) {
|
|
||||||
for (var module in modules) {
|
|
||||||
if (module.indexOf(object) > -1) {
|
|
||||||
fn = modules[module];
|
|
||||||
descr = _('module, in ') + titles[fn];
|
|
||||||
objectResults.push([filenames[fn], module, '#module-'+module, descr]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (var prefix in descrefs) {
|
|
||||||
for (var name in descrefs[prefix]) {
|
|
||||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
|
||||||
if (fullname.toLowerCase().indexOf(object) > -1) {
|
|
||||||
match = descrefs[prefix][name];
|
|
||||||
descr = desctypes[match[1]] + _(', in ') + titles[match[0]];
|
|
||||||
objectResults.push([filenames[match[0]], fullname, '#'+fullname, descr]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort results descending
|
|
||||||
objectResults.sort(function(a, b) {
|
|
||||||
return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// perform the search on the required terms
|
|
||||||
for (var i = 0; i < searchterms.length; i++) {
|
|
||||||
var word = searchterms[i];
|
|
||||||
// no match but word was a required one
|
|
||||||
if ((files = terms[word]) == null)
|
|
||||||
break;
|
|
||||||
if (files.length == undefined) {
|
|
||||||
files = [files];
|
|
||||||
}
|
|
||||||
// create the mapping
|
|
||||||
for (var j = 0; j < files.length; j++) {
|
|
||||||
var file = files[j];
|
|
||||||
if (file in fileMap)
|
|
||||||
fileMap[file].push(word);
|
|
||||||
else
|
|
||||||
fileMap[file] = [word];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// now check if the files don't contain excluded terms
|
|
||||||
for (var file in fileMap) {
|
|
||||||
var valid = true;
|
|
||||||
|
|
||||||
// check if all requirements are matched
|
|
||||||
if (fileMap[file].length != searchterms.length)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// ensure that none of the excluded terms is in the
|
|
||||||
// search result.
|
|
||||||
for (var i = 0; i < excluded.length; i++) {
|
|
||||||
if (terms[excluded[i]] == file ||
|
|
||||||
$.contains(terms[excluded[i]] || [], file)) {
|
|
||||||
valid = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we have still a valid result we can add it
|
|
||||||
// to the result list
|
|
||||||
if (valid)
|
|
||||||
regularResults.push([filenames[file], titles[file], '', null]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete unused variables in order to not waste
|
|
||||||
// memory until list is retrieved completely
|
|
||||||
delete filenames, titles, terms;
|
|
||||||
|
|
||||||
// now sort the regular results descending by title
|
|
||||||
regularResults.sort(function(a, b) {
|
|
||||||
var left = a[1].toLowerCase();
|
|
||||||
var right = b[1].toLowerCase();
|
|
||||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
|
||||||
});
|
|
||||||
|
|
||||||
// combine both
|
|
||||||
var results = regularResults.concat(objectResults);
|
|
||||||
|
|
||||||
// print the results
|
|
||||||
var resultCount = results.length;
|
|
||||||
function displayNextItem() {
|
|
||||||
// results left, load the summary and display it
|
|
||||||
if (results.length) {
|
|
||||||
var item = results.pop();
|
|
||||||
var listItem = $('<li style="display:none"></li>');
|
|
||||||
listItem.append($('<a/>').attr(
|
|
||||||
'href',
|
|
||||||
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
|
|
||||||
highlightstring + item[2]).html(item[1]));
|
|
||||||
if (item[3]) {
|
|
||||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
|
||||||
Search.output.append(listItem);
|
|
||||||
listItem.slideDown(5, function() {
|
|
||||||
displayNextItem();
|
|
||||||
});
|
|
||||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
|
||||||
$.get('_sources/' + item[0] + '.txt', function(data) {
|
|
||||||
listItem.append($.makeSearchSummary(data, searchterms, hlterms));
|
|
||||||
Search.output.append(listItem);
|
|
||||||
listItem.slideDown(5, function() {
|
|
||||||
displayNextItem();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// no source available, just display title
|
|
||||||
Search.output.append(listItem);
|
|
||||||
listItem.slideDown(5, function() {
|
|
||||||
displayNextItem();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// search finished, update title and status message
|
|
||||||
else {
|
|
||||||
Search.stopPulse();
|
|
||||||
Search.title.text(_('Search Results'));
|
|
||||||
if (!resultCount)
|
|
||||||
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
|
|
||||||
else
|
|
||||||
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
|
|
||||||
Search.status.fadeIn(500);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
displayNextItem();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
Search.init();
|
|
||||||
});
|
|
||||||
4
doc/_themes/pysidedocs/theme.conf
vendored
4
doc/_themes/pysidedocs/theme.conf
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
[theme]
|
[theme]
|
||||||
inherit = none
|
inherit = default
|
||||||
stylesheet = basic.css
|
stylesheet = pysidedocs.css
|
||||||
pygments_style = none
|
pygments_style = none
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
|
|
|
||||||
55
doc/codesnippets/doc/src/snippets/audio/main.cpp
Normal file
55
doc/codesnippets/doc/src/snippets/audio/main.cpp
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
|
||||||
|
class Window2 (QWidget):
|
||||||
|
//![0]
|
||||||
|
@Slot(QAudio.State)
|
||||||
|
def stateChanged(self, newState):
|
||||||
|
if newState == QAudio.StopState:
|
||||||
|
if self.input.error() != QAudio.NoError:
|
||||||
|
# Error handling
|
||||||
|
//![0]
|
||||||
|
|
||||||
|
class Window (QWidget):
|
||||||
|
def __init__(self):
|
||||||
|
QWidget.__init__(self)
|
||||||
|
self.output = QAudioOutput()
|
||||||
|
self.output.stateChanged[QAudio.State].connect(self.stateChanged)
|
||||||
|
|
||||||
|
def setupFormat(self):
|
||||||
|
//![1]
|
||||||
|
format = QAudioFormat()
|
||||||
|
format.setFrequency(44100)
|
||||||
|
//![1]
|
||||||
|
format.setChannels(2)
|
||||||
|
format.setSampleSize(16)
|
||||||
|
format.setCodec("audio/pcm")
|
||||||
|
format.setByteOrder(QAudioFormat.LittleEndian)
|
||||||
|
//![2]
|
||||||
|
format.setSampleType(QAudioFormat.SignedInt)
|
||||||
|
|
||||||
|
info = QAudioDeviceInfo(QAudioDeviceInfo.defaultOutputDevice())
|
||||||
|
|
||||||
|
if not info.isFormatSupported(format):
|
||||||
|
format = info.nearestFormat(format)
|
||||||
|
//![2]
|
||||||
|
|
||||||
|
//![3]
|
||||||
|
@Slot(QAudio.State)
|
||||||
|
def stateChanged(self, newState):
|
||||||
|
if newState == QAudio.StopState:
|
||||||
|
if self.output.error() != QAudio.NoError:
|
||||||
|
# Perform error handling
|
||||||
|
else:
|
||||||
|
# Normal stop
|
||||||
|
//![3]
|
||||||
|
|
||||||
|
# Handle
|
||||||
|
elif newState == QAudio.ActiveState:
|
||||||
|
# Handle active state...
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
window = Window()
|
||||||
|
window.show()
|
||||||
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
SOURCES += brush.cpp
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (2.00a) Wed Dec 14 11:46:57 2005
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
TARGET +=
|
|
||||||
DEPENDPATH += .
|
|
||||||
INCLUDEPATH += .
|
|
||||||
|
|
||||||
# Input
|
|
||||||
HEADERS += renderarea.h stylewidget.h
|
|
||||||
SOURCES += main.cpp renderarea.cpp stylewidget.cpp
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
######################################################################
|
|
||||||
# Automatically generated by qmake (1.08a) Tue Jan 4 13:19:41 2005
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
CONFIG -= moc
|
|
||||||
DEPENDPATH += .
|
|
||||||
INCLUDEPATH += .
|
|
||||||
|
|
||||||
# Input
|
|
||||||
SOURCES += buffer.cpp
|
|
||||||
CONFIG += qt warn_on debug create_prl link_prl
|
|
||||||
OBJECTS_DIR=.obj/debug-shared
|
|
||||||
MOC_DIR=.moc/debug-shared
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
HEADERS = clipwindow.h
|
|
||||||
SOURCES = clipwindow.cpp \
|
|
||||||
main.cpp
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
//! [0]
|
|
||||||
#include <QtScriptTools>
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
QT += scripttools
|
|
||||||
//! [1]
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
//! [0]
|
|
||||||
Outlook::Application *outlook = new Outlook::Application;
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
Outlook::_NameSpace *session = outlook->Session();
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
Outlook::NameSpace *session = outlook->Session();
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
Outlook::_NameSpace *tmp = outlook->Session();
|
|
||||||
Outlook::NameSpace *session = new Outlook::NameSpace(tmp);
|
|
||||||
delete tmp; // or any other use of tmp: segfault
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
Outlook::NameSpace *session = new Outlook::NameSpace(outlook->Session());
|
|
||||||
//! [4]
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
//! [0]
|
|
||||||
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
RC_FILE = myapp.rc
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
ICON = myapp.icns
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
kde-config --path icon
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
gnome-config --datadir
|
|
||||||
//! [4]
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
||||||
//! [0]
|
|
||||||
assistant -collectionFile file
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<QHelpCollectionProject version="1.0">
|
|
||||||
<assistant>
|
|
||||||
<title>My Application Help</title>
|
|
||||||
<startPage>qthelp://com.mycompany.1_0_0/doc/index.html</startPage>
|
|
||||||
<currentFilter>myfilter</currentFilter>
|
|
||||||
<applicationIcon>application.png</applicationIcon>
|
|
||||||
<enableFilterFunctionality>false</enableFilterFunctionality>
|
|
||||||
<enableDocumentationManager>false</enableDocumentationManager>
|
|
||||||
<enableAddressBar visible="true">true</enableAddressBar>
|
|
||||||
<cacheDirectory>mycompany/myapplication</cacheDirectory>
|
|
||||||
<aboutMenuText>
|
|
||||||
<text>About My Application</text>
|
|
||||||
<text language="de">Über meine Applikation...</text>
|
|
||||||
</aboutMenuText>
|
|
||||||
<aboutDialog>
|
|
||||||
<file>about.txt</file>
|
|
||||||
<file language="de">ueber.txt</file>
|
|
||||||
<icon>about.png</icon>
|
|
||||||
</aboutDialog>
|
|
||||||
</assistant>
|
|
||||||
<docFiles>
|
|
||||||
<generate>
|
|
||||||
<file>
|
|
||||||
<input>myapplication-manual.qhp</input>
|
|
||||||
<output>myapplication-manual.qch</output>
|
|
||||||
</file>
|
|
||||||
</generate>
|
|
||||||
<register>
|
|
||||||
<file>myapplication-manual.qch</file>
|
|
||||||
</register>
|
|
||||||
</docFiles>
|
|
||||||
</QHelpCollectionProject>
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
QProcess *process = new QProcess;
|
|
||||||
QStringList args;
|
|
||||||
args << QLatin1String("-collectionFile")
|
|
||||||
<< QLatin1String("mycollection.qhc")
|
|
||||||
<< QLatin1String("-enableRemoteControl");
|
|
||||||
process->start(QLatin1String("assistant"), args);
|
|
||||||
if (!process->waitForStarted())
|
|
||||||
return;
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
QByteArray ba;
|
|
||||||
ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
|
|
||||||
ba.append('\0');
|
|
||||||
process->write(ba);
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
QByteArray ba;
|
|
||||||
ba.append("hide bookmarks;");
|
|
||||||
ba.append("hide index;");
|
|
||||||
ba.append("setSource qthelp://com.mycompany.1_0_0/doc/index.html");
|
|
||||||
ba.append('\0');
|
|
||||||
process->write(ba);
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<QHelpCollectionProject version="1.0">
|
|
||||||
...
|
|
||||||
<docFiles>
|
|
||||||
<register>
|
|
||||||
<file>myapplication-manual.qch</file>
|
|
||||||
<file>another-manual.qch</file>
|
|
||||||
</register>
|
|
||||||
</docFiles>
|
|
||||||
</QHelpCollectionProject>
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
assistant -collectionFile mycollection.qhc -register myapplication-manual.qch
|
|
||||||
//! [6]
|
|
||||||
|
|
||||||
//! [7]
|
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<QHelpCollectionProject version="1.0">
|
|
||||||
<assistant>
|
|
||||||
<title>My Application Help</title>
|
|
||||||
<cacheDirectory>mycompany/myapplication</cacheDirectory>
|
|
||||||
...
|
|
||||||
</assistant>
|
|
||||||
</QHelpCollectionProject>
|
|
||||||
//! [7]
|
|
||||||
|
|
||||||
//! [8]
|
|
||||||
assistant -collectionFile mycollection.qhc
|
|
||||||
//! [8]
|
|
||||||
|
|
||||||
//! [9]
|
|
||||||
%QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc
|
|
||||||
//! [9]
|
|
||||||
|
|
||||||
//! [10]
|
|
||||||
qcollectiongenerator mycollection.qhcp -o mycollection.qhc
|
|
||||||
//! [10]
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
//! [0]
|
|
||||||
if (*ptr == expected) {
|
|
||||||
*ptr = newval;
|
|
||||||
return !0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
if (*ptr == expected) {
|
|
||||||
*ptr = newval;
|
|
||||||
return !0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
++(*ptr);
|
|
||||||
return *ptr ? !0 : 0;
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
return ++(*ptr);
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
++(*ptr);
|
|
||||||
return !(ControlRegister & ZeroFlag);
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
--(*ptr);
|
|
||||||
return *ptr ? : 0;
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
return --(*ptr);
|
|
||||||
//! [6]
|
|
||||||
|
|
||||||
|
|
||||||
//! [7]
|
|
||||||
--(*ptr);
|
|
||||||
return !(ControlRegister & ZeroFlag);
|
|
||||||
//! [7]
|
|
||||||
|
|
||||||
|
|
||||||
//! [8]
|
|
||||||
tmp = *ptr;
|
|
||||||
*ptr = newval;
|
|
||||||
return tmp;
|
|
||||||
//! [8]
|
|
||||||
|
|
||||||
|
|
||||||
//! [9]
|
|
||||||
tmp = *ptr;
|
|
||||||
*ptr = newval;
|
|
||||||
return tmp;
|
|
||||||
//! [9]
|
|
||||||
|
|
||||||
|
|
||||||
//! [10]
|
|
||||||
tmp = *ptr;
|
|
||||||
*ptr += value;
|
|
||||||
return tmp;
|
|
||||||
//! [10]
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
//! [0]
|
|
||||||
QTDIR=C:\Progra~1\Qt
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
/usr/vacpp/bin/makeC++SharedLib -o shr1.o cplussource1.o
|
|
||||||
//! [1]
|
|
||||||
|
|
@ -1,235 +0,0 @@
|
||||||
//! [0]
|
|
||||||
class Employee
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
Employee() {}
|
|
||||||
Employee(const Employee &other);
|
|
||||||
|
|
||||||
Employee &operator=(const Employee &other);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QString myName;
|
|
||||||
QDate myDateOfBirth;
|
|
||||||
};
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
QList<QString> list;
|
|
||||||
list << "A" << "B" << "C" << "D";
|
|
||||||
|
|
||||||
QListIterator<QString> i(list);
|
|
||||||
while (i.hasNext())
|
|
||||||
qDebug() << i.next();
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
QListIterator<QString> i(list);
|
|
||||||
i.toBack();
|
|
||||||
while (i.hasPrevious())
|
|
||||||
qDebug() << i.previous();
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
QMutableListIterator<int> i(list);
|
|
||||||
while (i.hasNext()) {
|
|
||||||
if (i.next() % 2 != 0)
|
|
||||||
i.remove();
|
|
||||||
}
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
QMutableListIterator<int> i(list);
|
|
||||||
i.toBack();
|
|
||||||
while (i.hasPrevious()) {
|
|
||||||
if (i.previous() % 2 != 0)
|
|
||||||
i.remove();
|
|
||||||
}
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
QMutableListIterator<int> i(list);
|
|
||||||
while (i.hasNext()) {
|
|
||||||
if (i.next() > 128)
|
|
||||||
i.setValue(128);
|
|
||||||
}
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
QMutableListIterator<int> i(list);
|
|
||||||
while (i.hasNext())
|
|
||||||
i.next() *= 2;
|
|
||||||
//! [6]
|
|
||||||
|
|
||||||
|
|
||||||
//! [7]
|
|
||||||
QMap<QString, QString> map;
|
|
||||||
map.insert("Paris", "France");
|
|
||||||
map.insert("Guatemala City", "Guatemala");
|
|
||||||
map.insert("Mexico City", "Mexico");
|
|
||||||
map.insert("Moscow", "Russia");
|
|
||||||
...
|
|
||||||
|
|
||||||
QMutableMapIterator<QString, QString> i(map);
|
|
||||||
while (i.hasNext()) {
|
|
||||||
if (i.next().key().endsWith("City"))
|
|
||||||
i.remove();
|
|
||||||
}
|
|
||||||
//! [7]
|
|
||||||
|
|
||||||
|
|
||||||
//! [8]
|
|
||||||
QMap<int, QWidget *> map;
|
|
||||||
QHash<int, QWidget *> hash;
|
|
||||||
|
|
||||||
QMapIterator<int, QWidget *> i(map);
|
|
||||||
while (i.hasNext()) {
|
|
||||||
i.next();
|
|
||||||
hash.insert(i.key(), i.value());
|
|
||||||
}
|
|
||||||
//! [8]
|
|
||||||
|
|
||||||
|
|
||||||
//! [9]
|
|
||||||
QMutableMapIterator<int, QWidget *> i(map);
|
|
||||||
while (i.findNext(widget))
|
|
||||||
i.remove();
|
|
||||||
//! [9]
|
|
||||||
|
|
||||||
|
|
||||||
//! [10]
|
|
||||||
QList<QString> list;
|
|
||||||
list << "A" << "B" << "C" << "D";
|
|
||||||
|
|
||||||
QList<QString>::iterator i;
|
|
||||||
for (i = list.begin(); i != list.end(); ++i)
|
|
||||||
*i = (*i).toLower();
|
|
||||||
//! [10]
|
|
||||||
|
|
||||||
|
|
||||||
//! [11]
|
|
||||||
QList<QString> list;
|
|
||||||
list << "A" << "B" << "C" << "D";
|
|
||||||
|
|
||||||
QList<QString>::iterator i = list.end();
|
|
||||||
while (i != list.begin()) {
|
|
||||||
--i;
|
|
||||||
*i = (*i).toLower();
|
|
||||||
}
|
|
||||||
//! [11]
|
|
||||||
|
|
||||||
|
|
||||||
//! [12]
|
|
||||||
QList<QString>::const_iterator i;
|
|
||||||
for (i = list.constBegin(); i != list.constEnd(); ++i)
|
|
||||||
qDebug() << *i;
|
|
||||||
//! [12]
|
|
||||||
|
|
||||||
|
|
||||||
//! [13]
|
|
||||||
QMap<int, int> map;
|
|
||||||
...
|
|
||||||
QMap<int, int>::const_iterator i;
|
|
||||||
for (i = map.constBegin(); i != map.constEnd(); ++i)
|
|
||||||
qDebug() << i.key() << ":" << i.value();
|
|
||||||
//! [13]
|
|
||||||
|
|
||||||
|
|
||||||
//! [14]
|
|
||||||
// RIGHT
|
|
||||||
const QList<int> sizes = splitter->sizes();
|
|
||||||
QList<int>::const_iterator i;
|
|
||||||
for (i = sizes.begin(); i != sizes.end(); ++i)
|
|
||||||
...
|
|
||||||
|
|
||||||
// WRONG
|
|
||||||
QList<int>::const_iterator i;
|
|
||||||
for (i = splitter->sizes().begin();
|
|
||||||
i != splitter->sizes().end(); ++i)
|
|
||||||
...
|
|
||||||
//! [14]
|
|
||||||
|
|
||||||
|
|
||||||
//! [15]
|
|
||||||
QLinkedList<QString> list;
|
|
||||||
...
|
|
||||||
QString str;
|
|
||||||
foreach (str, list)
|
|
||||||
qDebug() << str;
|
|
||||||
//! [15]
|
|
||||||
|
|
||||||
|
|
||||||
//! [16]
|
|
||||||
QLinkedList<QString> list;
|
|
||||||
...
|
|
||||||
QLinkedListIterator<QString> i(list);
|
|
||||||
while (i.hasNext())
|
|
||||||
qDebug() << i.next();
|
|
||||||
//! [16]
|
|
||||||
|
|
||||||
|
|
||||||
//! [17]
|
|
||||||
QLinkedList<QString> list;
|
|
||||||
...
|
|
||||||
foreach (QString str, list)
|
|
||||||
qDebug() << str;
|
|
||||||
//! [17]
|
|
||||||
|
|
||||||
|
|
||||||
//! [18]
|
|
||||||
QLinkedList<QString> list;
|
|
||||||
...
|
|
||||||
foreach (QString str, list) {
|
|
||||||
if (str.isEmpty())
|
|
||||||
break;
|
|
||||||
qDebug() << str;
|
|
||||||
}
|
|
||||||
//! [18]
|
|
||||||
|
|
||||||
|
|
||||||
//! [19]
|
|
||||||
QMap<QString, int> map;
|
|
||||||
...
|
|
||||||
foreach (QString str, map.keys())
|
|
||||||
qDebug() << str << ":" << map.value(str);
|
|
||||||
//! [19]
|
|
||||||
|
|
||||||
|
|
||||||
//! [20]
|
|
||||||
QMultiMap<QString, int> map;
|
|
||||||
...
|
|
||||||
foreach (QString str, map.uniqueKeys()) {
|
|
||||||
foreach (int i, map.values(str))
|
|
||||||
qDebug() << str << ":" << i;
|
|
||||||
}
|
|
||||||
//! [20]
|
|
||||||
|
|
||||||
|
|
||||||
//! [21]
|
|
||||||
forever {
|
|
||||||
...
|
|
||||||
}
|
|
||||||
//! [21]
|
|
||||||
|
|
||||||
|
|
||||||
//! [22]
|
|
||||||
CONFIG += no_keywords
|
|
||||||
//! [22]
|
|
||||||
|
|
||||||
|
|
||||||
//! [23]
|
|
||||||
QString onlyLetters(const QString &in)
|
|
||||||
{
|
|
||||||
QString out;
|
|
||||||
for (int j = 0; j < in.size(); ++j) {
|
|
||||||
if (in[j].isLetter())
|
|
||||||
out += in[j];
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
//! [23]
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
//! [0]
|
|
||||||
QPainter painter(this);
|
|
||||||
|
|
||||||
painter.setPen(Qt::darkGreen);
|
|
||||||
painter.drawRect(1, 2, 6, 4);
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
QPainter painter(this);
|
|
||||||
|
|
||||||
painter.setPen(Qt::darkGreen);
|
|
||||||
painter.drawLine(2, 7, 6, 1);
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
QPainter painter(this);
|
|
||||||
painter.setRenderHint(
|
|
||||||
QPainter::Antialiasing);
|
|
||||||
painter.setPen(Qt::darkGreen);
|
|
||||||
painter.drawRect(1, 2, 6, 4);
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
QPainter painter(this);
|
|
||||||
painter.setRenderHint(
|
|
||||||
QPainter::Antialiasing);
|
|
||||||
painter.setPen(Qt::darkGreen);
|
|
||||||
painter.drawLine(2, 7, 6, 1);
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
QPainter painter(this);
|
|
||||||
painter.setWindow(QRect(-50, -50, 100, 100));
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
int side = qMin(width(), height())
|
|
||||||
int x = (width() - side / 2);
|
|
||||||
int y = (height() - side / 2);
|
|
||||||
|
|
||||||
painter.setViewport(x, y, side, side);
|
|
||||||
//! [5]
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
//! [0]
|
|
||||||
qDebug() << "Widget" << widget << "at position" << widget->pos();
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
char *alloc(int size)
|
|
||||||
{
|
|
||||||
Q_ASSERT(size > 0);
|
|
||||||
char *ptr = new char[size];
|
|
||||||
Q_CHECK_PTR(ptr);
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
char *alloc(int size)
|
|
||||||
{
|
|
||||||
char *ptr;
|
|
||||||
Q_CHECK_PTR(ptr = new char[size]); // WRONG
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
//! [2]
|
|
||||||
|
|
@ -1,414 +0,0 @@
|
||||||
//! [0]
|
|
||||||
cd /path/to/Qt
|
|
||||||
./configure -static -prefix /path/to/Qt <other parameters>
|
|
||||||
make sub-src
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
cd /path/to/Qt/examples/tools/plugandpaint
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
make clean
|
|
||||||
PATH=/path/to/Qt/bin:$PATH
|
|
||||||
export PATH
|
|
||||||
qmake -config release
|
|
||||||
make
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
ldd ./application
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
cd /path/to/Qt/examples/tools/plugandpaint
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
make clean
|
|
||||||
qmake -config release
|
|
||||||
make
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
cd ../plugandpaintplugins
|
|
||||||
make clean
|
|
||||||
qmake -config release
|
|
||||||
make
|
|
||||||
//! [6]
|
|
||||||
|
|
||||||
|
|
||||||
//! [7]
|
|
||||||
#!/bin/sh
|
|
||||||
appname=`basename $0 | sed s,\.sh$,,`
|
|
||||||
|
|
||||||
dirname=`dirname $0`
|
|
||||||
tmp="${dirname#?}"
|
|
||||||
|
|
||||||
if [ "${dirname%$tmp}" != "/" ]; then
|
|
||||||
dirname=$PWD/$dirname
|
|
||||||
fi
|
|
||||||
LD_LIBRARY_PATH=$dirname
|
|
||||||
export LD_LIBRARY_PATH
|
|
||||||
$dirname/$appname $*
|
|
||||||
//! [7]
|
|
||||||
|
|
||||||
|
|
||||||
//! [8]
|
|
||||||
DESTDIR = /path/to/Qt/plugandpaint/plugins
|
|
||||||
//! [8]
|
|
||||||
|
|
||||||
|
|
||||||
//! [9]
|
|
||||||
qApp->addLibraryPath("/some/other/path");
|
|
||||||
//! [9]
|
|
||||||
|
|
||||||
|
|
||||||
//! [10]
|
|
||||||
ldd ./application
|
|
||||||
//! [10]
|
|
||||||
|
|
||||||
|
|
||||||
//! [11]
|
|
||||||
cd C:\path\to\Qt
|
|
||||||
configure -static <any other options you need>
|
|
||||||
//! [11]
|
|
||||||
|
|
||||||
|
|
||||||
//! [12]
|
|
||||||
nmake sub-src
|
|
||||||
//! [12]
|
|
||||||
|
|
||||||
|
|
||||||
//! [13]
|
|
||||||
cd examples\tools\plugandpaint
|
|
||||||
//! [13]
|
|
||||||
|
|
||||||
|
|
||||||
//! [14]
|
|
||||||
nmake clean
|
|
||||||
qmake -config release
|
|
||||||
nmake
|
|
||||||
//! [14]
|
|
||||||
|
|
||||||
|
|
||||||
//! [15]
|
|
||||||
cd examples\tools\plugandpaint
|
|
||||||
//! [15]
|
|
||||||
|
|
||||||
|
|
||||||
//! [16]
|
|
||||||
nmake clean
|
|
||||||
qmake -config release
|
|
||||||
nmake
|
|
||||||
//! [16]
|
|
||||||
|
|
||||||
|
|
||||||
//! [17]
|
|
||||||
cd ..\plugandpaintplugins
|
|
||||||
nmake clean
|
|
||||||
qmake -config release
|
|
||||||
nmake
|
|
||||||
//! [17]
|
|
||||||
|
|
||||||
|
|
||||||
//! [18]
|
|
||||||
plugins\pnp_basictools.dll
|
|
||||||
plugins\pnp_extrafilters.dll
|
|
||||||
//! [18]
|
|
||||||
|
|
||||||
|
|
||||||
//! [19]
|
|
||||||
qApp->addLibraryPath("C:\some\other\path");
|
|
||||||
//! [19]
|
|
||||||
|
|
||||||
|
|
||||||
//! [20]
|
|
||||||
embed_manifest_dll
|
|
||||||
embed_manifest_exe
|
|
||||||
//! [20]
|
|
||||||
|
|
||||||
|
|
||||||
//! [21]
|
|
||||||
CONFIG += embed_manifest_exe
|
|
||||||
//! [21]
|
|
||||||
|
|
||||||
|
|
||||||
//! [22]
|
|
||||||
<Visual Studio Install Path>\VC\redist\<Architecture>\Microsoft.VC80.CRT
|
|
||||||
//! [22]
|
|
||||||
|
|
||||||
|
|
||||||
//! [23]
|
|
||||||
CONFIG-=embed_manifest_dll
|
|
||||||
//! [23]
|
|
||||||
|
|
||||||
|
|
||||||
//! [24]
|
|
||||||
depends <application executable>
|
|
||||||
//! [24]
|
|
||||||
|
|
||||||
|
|
||||||
//! [25]
|
|
||||||
C:<path to Qt>\plugins
|
|
||||||
//! [25]
|
|
||||||
|
|
||||||
|
|
||||||
//! [26]
|
|
||||||
CONFIG-=app_bundle
|
|
||||||
//! [26]
|
|
||||||
|
|
||||||
|
|
||||||
//! [27]
|
|
||||||
cd /path/to/Qt
|
|
||||||
./configure -static <other parameters>
|
|
||||||
make sub-src
|
|
||||||
//! [27]
|
|
||||||
|
|
||||||
|
|
||||||
//! [28]
|
|
||||||
cd /path/to/Qt/examples/tools/plugandpaint
|
|
||||||
//! [28]
|
|
||||||
|
|
||||||
|
|
||||||
//! [29]
|
|
||||||
make clean
|
|
||||||
qmake -config release
|
|
||||||
make
|
|
||||||
//! [29]
|
|
||||||
|
|
||||||
|
|
||||||
//! [30]
|
|
||||||
otool -L plugandpaint.app/Contents/MacOs/plugandpaint
|
|
||||||
//! [30]
|
|
||||||
|
|
||||||
|
|
||||||
//! [31]
|
|
||||||
plugandpaint.app/Contents/MacOS/plugandpaint:
|
|
||||||
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
|
|
||||||
(compatibility version 2.0.0, current version 128.0.0)
|
|
||||||
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
|
|
||||||
(compatibility version 1.0.0, current version 10.0.0)
|
|
||||||
/usr/lib/libz.1.dylib
|
|
||||||
(compatibility version 1.0.0, current version 1.2.3)
|
|
||||||
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
|
||||||
(compatibility version 1.0.0, current version 22.0.0)
|
|
||||||
/usr/lib/libstdc++.6.dylib
|
|
||||||
(compatibility version 7.0.0, current version 7.3.0)
|
|
||||||
/usr/lib/libgcc_s.1.dylib
|
|
||||||
(compatibility version 1.0.0, current version 1.0.0)
|
|
||||||
/usr/lib/libmx.A.dylib
|
|
||||||
(compatibility version 1.0.0, current version 92.0.0)
|
|
||||||
/usr/lib/libSystem.B.dylib
|
|
||||||
(compatibility version 1.0.0, current version 88.0.0)
|
|
||||||
//! [31]
|
|
||||||
|
|
||||||
|
|
||||||
//! [32]
|
|
||||||
-lQtGui
|
|
||||||
//! [32]
|
|
||||||
|
|
||||||
|
|
||||||
//! [33]
|
|
||||||
/where/static/qt/lib/is/libQtGui.a
|
|
||||||
//! [33]
|
|
||||||
|
|
||||||
|
|
||||||
//! [34]
|
|
||||||
cd /path/to/Qt/examples/tools/plugandpaint
|
|
||||||
//! [34]
|
|
||||||
|
|
||||||
|
|
||||||
//! [35]
|
|
||||||
make clean
|
|
||||||
qmake -config release
|
|
||||||
make
|
|
||||||
//! [35]
|
|
||||||
|
|
||||||
|
|
||||||
//! [36]
|
|
||||||
cd ../plugandpaintplugins
|
|
||||||
make clean
|
|
||||||
qmake -config release
|
|
||||||
make
|
|
||||||
//! [36]
|
|
||||||
|
|
||||||
|
|
||||||
//! [37]
|
|
||||||
otool -L QtGui.framework/QtGui
|
|
||||||
//! [37]
|
|
||||||
|
|
||||||
|
|
||||||
//! [38]
|
|
||||||
QtGui.framework/QtGui:
|
|
||||||
/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
(compatibility version 4.0.0, current version 4.0.1)
|
|
||||||
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
|
|
||||||
(compatibility version 2.0.0, current version 128.0.0)
|
|
||||||
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
|
|
||||||
(compatibility version 1.0.0, current version 10.0.0)
|
|
||||||
/path/to/Qt/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
(compatibility version 4.0.0, current version 4.0.1)
|
|
||||||
/usr/lib/libz.1.dylib
|
|
||||||
(compatibility version 1.0.0, current version 1.2.3)
|
|
||||||
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
|
||||||
(compatibility version 1.0.0, current version 22.0.0)
|
|
||||||
/usr/lib/libstdc++.6.dylib
|
|
||||||
(compatibility version 7.0.0, current version 7.3.0)
|
|
||||||
/usr/lib/libgcc_s.1.dylib
|
|
||||||
(compatibility version 1.0.0, current version 1.0.0)
|
|
||||||
/usr/lib/libmx.A.dylib
|
|
||||||
(compatibility version 1.0.0, current version 92.0.0)
|
|
||||||
/usr/lib/libSystem.B.dylib
|
|
||||||
(compatibility version 1.0.0, current version 88.0.0)
|
|
||||||
//! [38]
|
|
||||||
|
|
||||||
|
|
||||||
//! [39]
|
|
||||||
mkdir plugandpaint.app/Contents/Frameworks
|
|
||||||
cp -R /path/to/Qt/lib/QtCore.framework
|
|
||||||
plugandpaint.app/Contents/Frameworks
|
|
||||||
cp -R /path/to/Qt/lib/QtGui.framework
|
|
||||||
plugandpaint.app/Contents/Frameworks
|
|
||||||
//! [39]
|
|
||||||
|
|
||||||
|
|
||||||
//! [40]
|
|
||||||
install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
plugandpaint.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
//! [40]
|
|
||||||
|
|
||||||
|
|
||||||
//! [41]
|
|
||||||
install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
plugandpaint.app/Contents/MacOs/plugandpaint
|
|
||||||
install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
plugandpaint.app/Contents/MacOs/plugandpaint
|
|
||||||
//! [41]
|
|
||||||
|
|
||||||
|
|
||||||
//! [42]
|
|
||||||
install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
plugandpaint.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
//! [42]
|
|
||||||
|
|
||||||
|
|
||||||
//! [43]
|
|
||||||
mv plugins plugandpaint.app/Contents
|
|
||||||
//! [43]
|
|
||||||
|
|
||||||
|
|
||||||
//! [44]
|
|
||||||
libpnp_basictools.dylib:
|
|
||||||
libpnp_basictools.dylib
|
|
||||||
(compatibility version 0.0.0, current version 0.0.0)
|
|
||||||
/path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
(compatibility version 4.0.0, current version 4.0.1)
|
|
||||||
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
|
|
||||||
(compatibility version 2.0.0, current version 128.0.0)
|
|
||||||
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
|
|
||||||
(compatibility version 1.0.0, current version 10.0.0)
|
|
||||||
/path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
(compatibility version 4.0.0, current version 4.0.1)
|
|
||||||
/usr/lib/libz.1.dylib
|
|
||||||
(compatibility version 1.0.0, current version 1.2.3)
|
|
||||||
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
|
|
||||||
(compatibility version 1.0.0, current version 22.0.0)
|
|
||||||
/usr/lib/libstdc++.6.dylib
|
|
||||||
(compatibility version 7.0.0, current version 7.3.0)
|
|
||||||
/usr/lib/libgcc_s.1.dylib
|
|
||||||
(compatibility version 1.0.0, current version 1.0.0)
|
|
||||||
/usr/lib/libmx.A.dylib
|
|
||||||
(compatibility version 1.0.0, current version 92.0.0)
|
|
||||||
/usr/lib/libSystem.B.dylib
|
|
||||||
(compatibility version 1.0.0, current version 88.0.0)
|
|
||||||
//! [44]
|
|
||||||
|
|
||||||
|
|
||||||
//! [45]
|
|
||||||
install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
|
|
||||||
install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
plugandpaint.app/Contents/plugins/libpnp_basictools.dylib
|
|
||||||
//! [45]
|
|
||||||
|
|
||||||
|
|
||||||
//! [46]
|
|
||||||
#elif defined(Q_OS_MAC)
|
|
||||||
if (pluginsDir.dirName() == "MacOS") {
|
|
||||||
pluginsDir.cdUp();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//! [46]
|
|
||||||
|
|
||||||
|
|
||||||
//! [47]
|
|
||||||
cp -R /path/to/Qt/plugins/imageformats
|
|
||||||
pluginandpaint.app/Contents/plugins
|
|
||||||
//! [47]
|
|
||||||
|
|
||||||
|
|
||||||
//! [48]
|
|
||||||
install_name_tool -change /path/to/Qt/lib/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
|
|
||||||
plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
|
|
||||||
install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
|
|
||||||
plugandpaint.app/Contents/plugins/imageformats/libqjpeg.dylib
|
|
||||||
//! [48]
|
|
||||||
|
|
||||||
|
|
||||||
//! [49]
|
|
||||||
QDir dir(QApplication::applicationDirPath());
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cd("plugins");
|
|
||||||
QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
|
|
||||||
//! [49]
|
|
||||||
|
|
||||||
|
|
||||||
//! [50]
|
|
||||||
otool -L MyApp.app/Contents/MacOS/MyApp
|
|
||||||
//! [50]
|
|
||||||
|
|
||||||
|
|
||||||
//! [51]
|
|
||||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
|
|
||||||
//! [51]
|
|
||||||
|
|
||||||
//! [51a]
|
|
||||||
install_name_tool -change /System/Library/Frameworks/CoreVideo.framework/
|
|
||||||
Versions/A/CoreVideo /System/Library/Frameworks/QuartzCore.framework/
|
|
||||||
Versions/A/QuartzCore libphonon_qt7.dylib
|
|
||||||
//! [51a]
|
|
||||||
|
|
||||||
//! [51b]
|
|
||||||
./CONFIGURE - SDK MacOSX10.4u.sdk
|
|
||||||
//! [51b]
|
|
||||||
|
|
||||||
//! [52]
|
|
||||||
./configure (other arguments) -universal -sdk /Developer/SDKs/MacOSX10.4u.sdk
|
|
||||||
//! [52]
|
|
||||||
|
|
||||||
|
|
||||||
//! [53]
|
|
||||||
QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
|
|
||||||
CONFIG+=x86 ppc
|
|
||||||
//! [53]
|
|
||||||
|
|
||||||
|
|
||||||
//! [54]
|
|
||||||
qApp->addLibraryPath("C:/customPath/plugins");
|
|
||||||
//! [54]
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
||||||
//! [0]
|
|
||||||
CONFIG += uitools
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
#include <QtUiTools>
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
void on_<object name>_<signal name>(<signal parameters>);
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
CONFIG += release
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
target.path = $$[QT_INSTALL_PLUGINS]/designer
|
|
||||||
INSTALLS += target
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
QT += script
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
widget.text = 'Hi - I was built ' + new Date().toString();
|
|
||||||
//! [6]
|
|
||||||
|
|
||||||
|
|
||||||
//! [7]
|
|
||||||
class MyExtension: public QObject,
|
|
||||||
public QdesignerContainerExtension
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_INTERFACE(QDesignerContainerExtension)
|
|
||||||
|
|
||||||
...
|
|
||||||
}
|
|
||||||
//! [7]
|
|
||||||
|
|
||||||
|
|
||||||
//! [8]
|
|
||||||
QObject *ANewExtensionFactory::createExtension(QObject *object,
|
|
||||||
const QString &iid, QObject *parent) const
|
|
||||||
{
|
|
||||||
if (iid != Q_TYPEID(QDesignerContainerExtension))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
|
|
||||||
(object))
|
|
||||||
return new MyContainerExtension(widget, parent);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
//! [8]
|
|
||||||
|
|
||||||
|
|
||||||
//! [9]
|
|
||||||
QObject *AGeneralExtensionFactory::createExtension(QObject *object,
|
|
||||||
const QString &iid, QObject *parent) const
|
|
||||||
{
|
|
||||||
MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
|
|
||||||
|
|
||||||
if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
|
|
||||||
return new MyTaskMenuExtension(widget, parent);
|
|
||||||
|
|
||||||
} else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
|
|
||||||
return new MyContainerExtension(widget, parent);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//! [9]
|
|
||||||
|
|
||||||
|
|
||||||
//! [10]
|
|
||||||
void MyPlugin::initialize(QDesignerFormEditorInterface *formEditor)
|
|
||||||
{
|
|
||||||
if (initialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
QExtensionManager *manager = formEditor->extensionManager();
|
|
||||||
Q_ASSERT(manager != 0);
|
|
||||||
|
|
||||||
manager->registerExtensions(new MyExtensionFactory(manager),
|
|
||||||
Q_TYPEID(QDesignerTaskMenuExtension));
|
|
||||||
|
|
||||||
initialized = true;
|
|
||||||
}
|
|
||||||
//! [10]
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
//! [0]
|
|
||||||
void MyQt3Widget::customStartDragFunction()
|
|
||||||
{
|
|
||||||
QDragObject *d = new QTextDrag( myHighlightedText(), this );
|
|
||||||
d->dragCopy();
|
|
||||||
// do NOT delete d.
|
|
||||||
}
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
void MyQt3Widget::dragEnterEvent(QDragEnterEvent* event)
|
|
||||||
{
|
|
||||||
event->accept(
|
|
||||||
QTextDrag::canDecode(event) ||
|
|
||||||
QImageDrag::canDecode(event)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
void MyQt3Widget::dropEvent(QDropEvent* event)
|
|
||||||
{
|
|
||||||
QImage image;
|
|
||||||
QString text;
|
|
||||||
|
|
||||||
if ( QImageDrag::decode(event, image) ) {
|
|
||||||
insertImageAt(image, event->pos());
|
|
||||||
} else if ( QTextDrag::decode(event, text) ) {
|
|
||||||
insertTextAt(text, event->pos());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//! [2]
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
//! [0]
|
|
||||||
./configure -help
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
configure -qt-kbd-s15000
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
export QWS_KEYBOARD=<driver>[:<driver specific options>]
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
export QWS_KEYBOARD="<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]"
|
|
||||||
//! [3]
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
//! [0]
|
|
||||||
export PATH=path/to/cross/compiler:$PATH
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
./configure -embedded arm -xplatform qws/linux-arm-g++ <other options>
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
cp path/to/QtEmbedded/mkspecs/qws/linux-mips-g++/...
|
|
||||||
path/to/QtEmbedded/mkspecs/qws/linux-myarchitecture-g++/...
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
cd path/to/QtEmbedded
|
|
||||||
./configure -embedded <architecture> -qt-kbd-<keyboarddriver>
|
|
||||||
-qt-mouse-<mousedriver> -qt-gfx-<screendriver>
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
cd path/to/QtEmbedded
|
|
||||||
./configure <other options>
|
|
||||||
-L /path/to/libjpeg/libraries -I /path/to/libjpeg/headers
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
cd path/to/myApplication
|
|
||||||
qmake -project
|
|
||||||
qmake
|
|
||||||
make
|
|
||||||
//! [5]
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
//! [0]
|
|
||||||
export QWS_DISPLAY=<driver>[:<driver specific options>]...
|
|
||||||
[:<display num>]
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
export QWS_SIZE=<width>x<height>
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]"
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
export QWS_KEYBOARD=<driver>[:<driver specific options>]
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
export QWS_KEYBOARD="<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]"
|
|
||||||
//! [6]
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
//! [0]
|
|
||||||
configure.exe -D QT_NO_THREAD
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
./configure -no-feature-thread
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
configure.exe -qconfig myfile
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
./configure -qconfig myfile
|
|
||||||
//! [3]
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
//! [0]
|
|
||||||
name file renderer italic weight size flags
|
|
||||||
//! [0]
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
//! [0]
|
|
||||||
cd <anywhere>
|
|
||||||
gunzip qt-embedded-linux-commercial-src-4.5.2.tar.gz
|
|
||||||
tar xf qt-embedded-linux-commercial-src-4.5.2.tar
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
~/qt-embedded-linux-commercial-src-4.5.2
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
cd ~/qt-embedded-linux-commercial-src-4.5.2
|
|
||||||
./configure -embedded [architecture]
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
make
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
su -c "make install"
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
PATH=/usr/local/Trolltech/QtEmbedded-4.5.2/bin:$PATH
|
|
||||||
export PATH
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
setenv PATH /usr/local/Trolltech/QtEmbedded-4.5.2/bin:$PATH
|
|
||||||
//! [6]
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
//! [0]
|
|
||||||
./configure -static
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
void *operator new[](size_t size)
|
|
||||||
{
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *operator new(size_t size)
|
|
||||||
{
|
|
||||||
return malloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete[](void *ptr)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete[](void *ptr, size_t)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete(void *ptr)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void operator delete(void *ptr, size_t)
|
|
||||||
{
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
//! [1]
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
//! [0]
|
|
||||||
<qtopia-root-dir>/qtopiacore/qt/configure -embedded -help |grep -a1 mouse
|
|
||||||
//! [0]
|
|
||||||
|
|
||||||
|
|
||||||
//! [1]
|
|
||||||
./configure -extra-qtopiacore-config -qt-mouse-tslib
|
|
||||||
//! [1]
|
|
||||||
|
|
||||||
|
|
||||||
//! [2]
|
|
||||||
./configure -help
|
|
||||||
//! [2]
|
|
||||||
|
|
||||||
|
|
||||||
//! [3]
|
|
||||||
configure -qt-mouse-tslib
|
|
||||||
//! [3]
|
|
||||||
|
|
||||||
|
|
||||||
//! [4]
|
|
||||||
export QWS_MOUSE_PROTO=<driver>[:<driver specific options>]
|
|
||||||
//! [4]
|
|
||||||
|
|
||||||
|
|
||||||
//! [5]
|
|
||||||
export QWS_MOUSE_PROTO="<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]
|
|
||||||
<driver>[:<driver specific options>]"
|
|
||||||
//! [5]
|
|
||||||
|
|
||||||
|
|
||||||
//! [6]
|
|
||||||
export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
|
|
||||||
//! [6]
|
|
||||||
|
|
||||||
|
|
||||||
//! [7]
|
|
||||||
./configure -L <path to tslib library> -I <path to tslib headers>
|
|
||||||
//! [7]
|
|
||||||
|
|
||||||
|
|
||||||
//! [8]
|
|
||||||
module_raw input
|
|
||||||
module linear
|
|
||||||
//! [8]
|
|
||||||
|
|
||||||
|
|
||||||
//! [9]
|
|
||||||
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
|
|
||||||
//! [9]
|
|
||||||
|
|
||||||
|
|
||||||
//! [10]
|
|
||||||
cat /dev/input/mouse0 | hexdump
|
|
||||||
//! [10]
|
|
||||||
|
|
||||||
|
|
||||||
//! [11]
|
|
||||||
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
|
|
||||||
//! [11]
|
|
||||||
|
|
||||||
|
|
||||||
//! [12]
|
|
||||||
chmod a+rw /dev/input/mouse0
|
|
||||||
//! [12]
|
|
||||||
|
|
||||||
|
|
||||||
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