From 6545eb21f52545f2319d853a827a1122dfbac6cf Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Tue, 10 May 2011 15:36:03 -0300 Subject: 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 Reviewer: Lauro Moura Marcelo Lira --- PySide/QtGui/typesystem_gui_common.xml | 66 ++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'PySide/QtGui') diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 482234059..6cfe6eb97 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -1158,6 +1158,43 @@ } + + + + switch(%CPPSELF.spec()) { + case QColor::Rgb: + { + int r, g, b, a; + %CPPSELF.getRgb(&r, &g, &b, &a); + %PYARG_0 = Py_BuildValue("iiii", r, g, b, a); + break; + } + case QColor::Hsv: + { + int h, s, v, a; + %CPPSELF.getHsv(&h, &s, &v, &a); + %PYARG_0 = Py_BuildValue("iiii", h, s, v, a); + break; + } + case QColor::Cmyk: + { + int c, m, y, k, a; + %CPPSELF.getCmyk(&c, &m, &y, &k, &a); + %PYARG_0 = Py_BuildValue("iiiii", c, m, y, k, a); + break; + } + case QColor::Hsl: + { + int h, s, l, a; + %CPPSELF.getHsv(&h, &s, &l, &a); + %PYARG_0 = Py_BuildValue("iiii", h, s, l, a); + break; + } + default: + %PYARG_0 = 0; + } + + @@ -6533,6 +6570,16 @@ + + + + + + + + + + @@ -6555,6 +6602,16 @@ + + + + + + + + + + @@ -6577,6 +6634,15 @@ + + + + + + + + + -- cgit v1.2.3