summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-03 16:43:52 +0200
committerKent Hansen <khansen@trolltech.com>2009-06-03 16:43:52 +0200
commita99b33e1c43157ea3f01a88a072110231de0a225 (patch)
treeb3240e029cf622f8e008502dd05be9a9949d06ae
parent524f038431aac2c05e4034297247ba523e64b5c2 (diff)
add bindings for animation and state machine classes (new in 4.6)
-rw-r--r--generator/typesystem_core-common.xml28
-rw-r--r--generator/typesystem_core-qtscript.xml43
-rw-r--r--generator/typesystem_core.xml63
-rw-r--r--generator/typesystem_gui-common.xml3
-rw-r--r--generator/typesystem_gui.xml3
5 files changed, 140 insertions, 0 deletions
diff --git a/generator/typesystem_core-common.xml b/generator/typesystem_core-common.xml
index 0601924..753727d 100644
--- a/generator/typesystem_core-common.xml
+++ b/generator/typesystem_core-common.xml
@@ -1180,6 +1180,34 @@
<value-type name="QModelIndex"/>
+ <object-type name="QAbstractAnimation" />
+ <object-type name="QAnimationGroup" />
+ <object-type name="QEasingCurve" />
+ <object-type name="QParallelAnimationGroup" />
+ <object-type name="QPauseAnimation" />
+ <object-type name="QPropertyAnimation" />
+ <object-type name="QSequentialAnimationGroup" />
+ <object-type name="QVariantAnimation" />
+ <enum-type name="QAbstractAnimation::DeletionPolicy" />
+ <enum-type name="QAbstractAnimation::Direction" />
+ <enum-type name="QAbstractAnimation::State" />
+ <enum-type name="QEasingCurve::Type" />
+
+ <object-type name="QAbstractState" />
+ <object-type name="QAbstractTransition" />
+ <object-type name="QEventTransition" />
+ <object-type name="QFinalState" />
+ <object-type name="QHistoryState" />
+ <object-type name="QSignalEvent" />
+ <object-type name="QSignalTransition" />
+ <object-type name="QState" />
+ <object-type name="QStateMachine" />
+ <object-type name="QWrappedEvent" />
+ <enum-type name="QHistoryState::HistoryType" />
+ <enum-type name="QState::ChildMode" />
+ <enum-type name="QStateMachine::Error" />
+ <enum-type name="QStateMachine::RestorePolicy" />
+
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type 'std::*'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private\*'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private&amp;'"/>
diff --git a/generator/typesystem_core-qtscript.xml b/generator/typesystem_core-qtscript.xml
index bf5a47b..919948b 100644
--- a/generator/typesystem_core-qtscript.xml
+++ b/generator/typesystem_core-qtscript.xml
@@ -22,6 +22,10 @@
%out% = QScriptValue(context->engine(), %in%);
</template>
+ <template name="core.convert_string_arg_to_latin1">
+ QByteArray %out% = %in%.toString().toLatin1();
+ </template>
+
<template name="core.convert_string_arg_to_char*">
QByteArray tmp_%out% = %in%.toString().toLatin1();
const char * %out% = tmp_%out%.constData();
@@ -1442,6 +1446,45 @@
</object-type>
+ <object-type name="QEasingCurve">
+ <modify-function signature="QEasingCurve(QEasingCurve)" remove="all" />
+ <modify-function signature="operator=(QEasingCurve)" remove="all"/>
+ <modify-function signature="operator==(const QEasingCurve &amp;)const" remove="all"/>
+ <modify-function signature="operator!=(const QEasingCurve &amp;)const" remove="all"/>
+ <modify-function signature="setCustomType(double)" remove="all"/>
+ <modify-function signature="customType()const" remove="all"/>
+ </object-type>
+
+ <object-type name="QPropertyAnimation">
+ <modify-function signature="QPropertyAnimation(QObject*,QByteArray,QObject*)">
+ <modify-argument index="2">
+ <replace-type modified-type="QString"/>
+ <conversion-rule class="native">
+ <insert-template name="core.convert_string_arg_to_latin1"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QState">
+ <modify-function signature="addTransition(QObject*,const char*,QAbstractState*)">
+ <modify-argument index="2">
+ <replace-type modified-type="QString"/>
+ <conversion-rule class="native">
+ <insert-template name="core.convert_string_arg_to_char*"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="assignProperty(QObject*,const char*,QVariant)">
+ <modify-argument index="2">
+ <replace-type modified-type="QString"/>
+ <conversion-rule class="native">
+ <insert-template name="core.convert_string_arg_to_char*"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+
<primitive-type name="bool"/>
<primitive-type name="double"/>
<primitive-type name="qreal"/>
diff --git a/generator/typesystem_core.xml b/generator/typesystem_core.xml
index a748a3b..5febf99 100644
--- a/generator/typesystem_core.xml
+++ b/generator/typesystem_core.xml
@@ -14,6 +14,8 @@
%out% = context-&gt;engine()-&gt;nullValue();
else
%out% = QScriptValue(context-&gt;engine(), %in%);
+ </template><template name="core.convert_string_arg_to_latin1">
+ QByteArray %out% = %in%.toString().toLatin1();
</template><template name="core.convert_string_arg_to_char*">
QByteArray tmp_%out% = %in%.toString().toLatin1();
const char * %out% = tmp_%out%.constData();
@@ -2512,6 +2514,67 @@
<value-type name="QModelIndex"/>
+ <object-type name="QAbstractAnimation"/>
+ <object-type name="QAnimationGroup"/>
+ <object-type name="QEasingCurve">
+ <modify-function signature="QEasingCurve(QEasingCurve)" remove="all"/>
+ <modify-function signature="operator=(QEasingCurve)" remove="all"/>
+ <modify-function signature="operator==(const QEasingCurve &amp;)const" remove="all"/>
+ <modify-function signature="operator!=(const QEasingCurve &amp;)const" remove="all"/>
+ <modify-function signature="setCustomType(double)" remove="all"/>
+ <modify-function signature="customType()const" remove="all"/>
+ </object-type>
+ <object-type name="QParallelAnimationGroup"/>
+ <object-type name="QPauseAnimation"/>
+ <object-type name="QPropertyAnimation">
+ <modify-function signature="QPropertyAnimation(QObject*,QByteArray,QObject*)">
+ <modify-argument index="2">
+ <replace-type modified-type="QString"/>
+ <conversion-rule class="native">
+ <insert-template name="core.convert_string_arg_to_latin1"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QSequentialAnimationGroup"/>
+ <object-type name="QVariantAnimation"/>
+ <enum-type name="QAbstractAnimation::DeletionPolicy"/>
+ <enum-type name="QAbstractAnimation::Direction"/>
+ <enum-type name="QAbstractAnimation::State"/>
+ <enum-type name="QEasingCurve::Type"/>
+
+ <object-type name="QAbstractState"/>
+ <object-type name="QAbstractTransition"/>
+ <object-type name="QEventTransition"/>
+ <object-type name="QFinalState"/>
+ <object-type name="QHistoryState"/>
+ <object-type name="QSignalEvent"/>
+ <object-type name="QSignalTransition"/>
+ <object-type name="QState">
+ <modify-function signature="addTransition(QObject*,const char*,QAbstractState*)">
+ <modify-argument index="2">
+ <replace-type modified-type="QString"/>
+ <conversion-rule class="native">
+ <insert-template name="core.convert_string_arg_to_char*"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="assignProperty(QObject*,const char*,QVariant)">
+ <modify-argument index="2">
+ <replace-type modified-type="QString"/>
+ <conversion-rule class="native">
+ <insert-template name="core.convert_string_arg_to_char*"/>
+ </conversion-rule>
+ </modify-argument>
+ </modify-function>
+ </object-type>
+ <object-type name="QStateMachine"/>
+ <object-type name="QWrappedEvent"/>
+ <enum-type name="QHistoryState::HistoryType"/>
+ <enum-type name="QState::ChildMode"/>
+ <enum-type name="QStateMachine::Error"/>
+ <enum-type name="QStateMachine::RestorePolicy"/>
+
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type 'std::*'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private\*'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private&amp;'"/>
diff --git a/generator/typesystem_gui-common.xml b/generator/typesystem_gui-common.xml
index 3a10fbc..5b7cb48 100644
--- a/generator/typesystem_gui-common.xml
+++ b/generator/typesystem_gui-common.xml
@@ -4930,6 +4930,9 @@
<object-type name="QPictureFormatPlugin" />
<object-type name="QStylePlugin" />
+ <object-type name="QKeyEventTransition" />
+ <object-type name="QMouseEventTransition" />
+
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping function 'QPixmap::QPixmap', unmatched parameter type 'QPixmapData*'" />
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private&amp;'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private\*'"/>
diff --git a/generator/typesystem_gui.xml b/generator/typesystem_gui.xml
index 7ed7f4e..a540c13 100644
--- a/generator/typesystem_gui.xml
+++ b/generator/typesystem_gui.xml
@@ -5389,6 +5389,9 @@
<object-type name="QPictureFormatPlugin"/>
<object-type name="QStylePlugin"/>
+ <object-type name="QKeyEventTransition"/>
+ <object-type name="QMouseEventTransition"/>
+
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping function 'QPixmap::QPixmap', unmatched parameter type 'QPixmapData*'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private&amp;'"/>
<suppress-warning text="WARNING(MetaJavaBuilder) :: skipping * unmatched *type '*Private\*'"/>