aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtGui
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-02 14:53:29 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-02 15:31:07 -0300
commitefe8019eda0471baf99ed4372ceda4af06cbe3c1 (patch)
tree3d3c69678ff0a8e5e664abb8a464578bb8dea4f7 /PySide/QtGui
parent09876a43863e7846ce514ae94d2ad0056a32bc67 (diff)
Created a pythonic constructor to QAction
Fixes bug #274. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide/QtGui')
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml19
1 files changed, 18 insertions, 1 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 58e233caa..64849ae64 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -4251,6 +4251,24 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
+ <add-function signature="QAction(const QString&amp;, QObject*, PyObject*)">
+ <modify-argument index="2">
+ <replace-default-expression with="0"/>
+ <rename to="parent"/>
+ </modify-argument>
+ <modify-argument index="3">
+ <replace-default-expression with="0"/>
+ <rename to="triggered"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ %0 = new QActionWrapper(%1, %2);
+ </inject-code>
+
+ <inject-code class="target" position="end">
+ if (%PYARG_3 != Py_None)
+ Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, "connect", "OsO", %PYSELF, SIGNAL(triggered(bool)), %PYARG_3));
+ </inject-code>
+ </add-function>
</object-type>
<object-type name="QPainter">
<extra-includes>
@@ -4366,7 +4384,6 @@
<modify-function signature="setMatrixEnabled(bool)" remove="all"/>
<!--### Obsolete in 4.3-->
<modify-function signature="fontInfo()const" remove="all"/>
- <modify-function signature="fontMetrics()const" remove="all"/>
</object-type>
<!-- qApp macro -->
<inject-code class="native" position="beginning">