summaryrefslogtreecommitdiffstats
path: root/PySide/QtUiTools/typesystem_uitools.xml
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-24 19:24:14 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-30 17:15:59 -0300
commit771c2be893567c8f6bd0deda87ff0e95322923a2 (patch)
tree6261470efc60cce784be617887c2852082ba40a5 /PySide/QtUiTools/typesystem_uitools.xml
parent7107c2fef5b5a0eba19c513945d8698bc8d962bb (diff)
downloadshiboken-771c2be893567c8f6bd0deda87ff0e95322923a2.tar.gz
shiboken-771c2be893567c8f6bd0deda87ff0e95322923a2.tar.xz
shiboken-771c2be893567c8f6bd0deda87ff0e95322923a2.zip
Initial bindings for QtUiTools.
Diffstat (limited to 'PySide/QtUiTools/typesystem_uitools.xml')
-rw-r--r--PySide/QtUiTools/typesystem_uitools.xml52
1 files changed, 52 insertions, 0 deletions
diff --git a/PySide/QtUiTools/typesystem_uitools.xml b/PySide/QtUiTools/typesystem_uitools.xml
new file mode 100644
index 00000000..c155bff9
--- /dev/null
+++ b/PySide/QtUiTools/typesystem_uitools.xml
@@ -0,0 +1,52 @@
+<typesystem package="PySide.QtUiTools">
+
+ <load-typesystem name="typesystem_gui.xml" generate="no" />
+ <load-typesystem name="typesystem_xml.xml" generate="no" />
+
+ <object-type name="QUiLoader">
+ <modify-function signature="createAction(QObject *, const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="createActionGroup(QObject *, const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="1" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="createLayout(const QString&amp;,QObject *, const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="createWidget(const QString&amp;,QWidget*, const QString&amp;)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <modify-function signature="load(QIODevice*, QWidget*)">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ </modify-function>
+
+ <!-- Syntax sugar -->
+ <add-function signature="load(const char*, QWidget*)" return-type="QWidget*">
+ <modify-argument index="return">
+ <parent index="2" action="add"/>
+ </modify-argument>
+ <inject-code>
+ QFile f(%1);
+ if (f.open(QIODevice::ReadOnly | QIODevice::Text))
+ %PYARG_0 = %CONVERTTOPYTHON[QWidget*](%CPPSELF.load(&amp;f, %2));
+ else
+ PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
+ </inject-code>
+ </add-function>
+ </object-type>
+
+</typesystem>