Implemented function QBitmap.fromData.
Fixes bug #740 Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
a5e20dfd75
commit
d71a6a8c3a
1 changed files with 11 additions and 2 deletions
|
|
@ -378,8 +378,17 @@
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="QTextFragment" />
|
<value-type name="QTextFragment" />
|
||||||
<value-type name="QBitmap" >
|
<value-type name="QBitmap" >
|
||||||
<!-- ### See bug 740 -->
|
<modify-function signature="fromData(QSize,const uchar*,QImage::Format)">
|
||||||
<modify-function signature="fromData(QSize,const uchar*,QImage::Format)" remove="all" />
|
<modify-argument index="2">
|
||||||
|
<replace-type modified-type="PyObject"/>
|
||||||
|
</modify-argument>
|
||||||
|
<inject-code>
|
||||||
|
const void* buffer;
|
||||||
|
Py_ssize_t size;
|
||||||
|
if (PyObject_AsReadBuffer(%PYARG_2, &buffer, &size) != -1)
|
||||||
|
%PYARG_0 = %CONVERTTOPYTHON[QBitmap](QBitmap::fromData(%1, (const uchar*)buffer, %3));
|
||||||
|
</inject-code>
|
||||||
|
</modify-function>
|
||||||
</value-type>
|
</value-type>
|
||||||
<value-type name="QTextInlineObject" />
|
<value-type name="QTextInlineObject" />
|
||||||
<value-type name="QSizePolicy">
|
<value-type name="QSizePolicy">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue