aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/typesystem_core.xml
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-28 18:02:20 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:53:50 -0300
commit9c7d055f3d6f7f93f66ed977ca480979b445fcb8 (patch)
treeb891d96c5125d53d8a08ac89628cc287043720a2 /PySide/QtCore/typesystem_core.xml
parentf3bcaf31a85dbd07ef5fcb47fe582dc3ecedf8b1 (diff)
Implement __repr__ function for class with Float attributes.
Diffstat (limited to 'PySide/QtCore/typesystem_core.xml')
-rw-r--r--PySide/QtCore/typesystem_core.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index a50750a55..41b77438e 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -457,6 +457,15 @@
</value-type>
<value-type name="QLineF">
<enum-type name="IntersectType" />
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f, %f, %f" />
+ <replace from="%REPR_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<add-function signature="__reduce__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="reduce_code">
@@ -637,6 +646,15 @@
<modify-function signature="ry()" remove="all"/>
</value-type>
<value-type name="QPointF">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f" />
+ <replace from="%REPR_ARGS" to="%CPPSELF.x(), %CPPSELF.y()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<add-function signature="__reduce__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="reduce_code">
@@ -813,6 +831,15 @@
<modify-function signature="rwidth()" remove="all"/>
</value-type>
<value-type name="QSizeF">
+ <add-function signature="__repr__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="repr_code">
+ <replace from="%REPR_FORMAT" to="%f, %f" />
+ <replace from="%REPR_ARGS" to="%CPPSELF.width(), %CPPSELF.height()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<add-function signature="__reduce__" return-type="PyObject*">
<inject-code class="target" position="beginning">
<insert-template name="reduce_code">