aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
diff options
context:
space:
mode:
authorPaulo Alcantara <paulo.alcantara@openbossa.org>2011-05-10 15:36:03 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:22 -0300
commit6545eb21f52545f2319d853a827a1122dfbac6cf (patch)
treefee3a4370ba844870991580b8c87f2a7f75a654c /PySide/QtCore
parent23a1c436e393c6b414a1022b270dc3edeedec78c (diff)
Fix bug #606
Add toTuple() function to these all classes: - QPoint/QPointF/QSize/QSizeF/QVector2D/QVector3D/QVector4D - QLine/QLineF/QColor Signed-off-by: Paulo Alcantara <paulo.alcantara@openbossa.org> Reviewer: Lauro Moura <lauro.neto@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'PySide/QtCore')
-rw-r--r--PySide/QtCore/typesystem_core.xml58
1 files changed, 58 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index a1dd5b676..3856120bb 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -455,6 +455,15 @@
}
};
</inject-code>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="iiii" />
+ <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
</value-type>
<value-type name="QLineF">
<enum-type name="IntersectType" />
@@ -475,6 +484,15 @@
</insert-template>
</inject-code>
</add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dddd" />
+ <replace from="%TT_ARGS" to="%CPPSELF.x1(), %CPPSELF.y1(), %CPPSELF.x2(), %CPPSELF.y2()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
<modify-function signature="intersect(QLineF, QPointF*)const">
<modify-argument index="2">
<remove-argument />
@@ -669,6 +687,16 @@
}
};
</inject-code>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="ii" />
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<!--### Functions removed because they return references to Python imutable objects -->
<modify-function signature="rx()" remove="all"/>
<modify-function signature="ry()" remove="all"/>
@@ -692,6 +720,16 @@
</insert-template>
</inject-code>
</add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dd" />
+ <replace from="%TT_ARGS" to="%CPPSELF.x(), %CPPSELF.y()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<!--### Functions removed because they return references to Python imutable objects -->
<modify-function signature="rx()" remove="all"/>
<modify-function signature="ry()" remove="all"/>
@@ -858,6 +896,16 @@
}
};
</inject-code>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="ii" />
+ <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<!--### Functions removed because they return references to Python imutable objects -->
<modify-function signature="rheight()" remove="all"/>
<modify-function signature="rwidth()" remove="all"/>
@@ -881,6 +929,16 @@
</insert-template>
</inject-code>
</add-function>
+
+ <add-function signature="toTuple" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ <insert-template name="to_tuple">
+ <replace from="%TT_FORMAT" to="dd" />
+ <replace from="%TT_ARGS" to="%CPPSELF.width(), %CPPSELF.height()" />
+ </insert-template>
+ </inject-code>
+ </add-function>
+
<!--### Functions removed because they return references to Python imutable objects -->
<modify-function signature="rheight()" remove="all" />
<modify-function signature="rwidth()" remove="all" />