Differential D24817 Diff 68400 src/scripting/qtbindings/generated_cpp/com_trolltech_qt_core/qtscript_QParallelAnimationGroup.cpp
Changeset View
Changeset View
Standalone View
Standalone View
src/scripting/qtbindings/generated_cpp/com_trolltech_qt_core/qtscript_QParallelAnimationGroup.cpp
- This file was added.
1 | #include <QtScript/QScriptEngine> | ||||
---|---|---|---|---|---|
2 | #include <QtScript/QScriptContext> | ||||
3 | #include <QtScript/QScriptValue> | ||||
4 | #include <QtCore/QStringList> | ||||
5 | #include <QtCore/QDebug> | ||||
6 | #include <qmetaobject.h> | ||||
7 | #include <__package_shared.h> | ||||
8 | | ||||
9 | #include <qparallelanimationgroup.h> | ||||
10 | #include <QVariant> | ||||
11 | #include <qabstractanimation.h> | ||||
12 | #include <qanimationgroup.h> | ||||
13 | #include <qbytearray.h> | ||||
14 | #include <qcoreevent.h> | ||||
15 | #include <qlist.h> | ||||
16 | #include <qobject.h> | ||||
17 | #include <qparallelanimationgroup.h> | ||||
18 | | ||||
19 | #include "qtscriptshell_QParallelAnimationGroup.h" | ||||
20 | | ||||
21 | static const char * const qtscript_QParallelAnimationGroup_function_names[] = { | ||||
22 | "QParallelAnimationGroup" | ||||
23 | // static | ||||
24 | // prototype | ||||
25 | , "toString" | ||||
26 | }; | ||||
27 | | ||||
28 | static const char * const qtscript_QParallelAnimationGroup_function_signatures[] = { | ||||
29 | "QObject parent" | ||||
30 | // static | ||||
31 | // prototype | ||||
32 | "" | ||||
33 | }; | ||||
34 | | ||||
35 | static const int qtscript_QParallelAnimationGroup_function_lengths[] = { | ||||
36 | 1 | ||||
37 | // static | ||||
38 | // prototype | ||||
39 | , 0 | ||||
40 | }; | ||||
41 | | ||||
42 | static QScriptValue qtscript_QParallelAnimationGroup_throw_ambiguity_error_helper( | ||||
43 | QScriptContext *context, const char *functionName, const char *signatures) | ||||
44 | { | ||||
45 | QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); | ||||
46 | QStringList fullSignatures; | ||||
47 | for (int i = 0; i < lines.size(); ++i) | ||||
48 | fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); | ||||
49 | return context->throwError(QString::fromLatin1("QParallelAnimationGroup::%0(): could not find a function match; candidates are:\n%1") | ||||
50 | .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); | ||||
51 | } | ||||
52 | | ||||
53 | Q_DECLARE_METATYPE(QParallelAnimationGroup*) | ||||
54 | Q_DECLARE_METATYPE(QtScriptShell_QParallelAnimationGroup*) | ||||
55 | Q_DECLARE_METATYPE(QAnimationGroup*) | ||||
56 | | ||||
57 | // | ||||
58 | // QParallelAnimationGroup | ||||
59 | // | ||||
60 | | ||||
61 | static QScriptValue qtscript_QParallelAnimationGroup_prototype_call(QScriptContext *context, QScriptEngine *) | ||||
62 | { | ||||
63 | #if QT_VERSION > 0x040400 | ||||
64 | Q_ASSERT(context->callee().isFunction()); | ||||
65 | uint _id = context->callee().data().toUInt32(); | ||||
66 | #else | ||||
67 | uint _id; | ||||
68 | if (context->callee().isFunction()) | ||||
69 | _id = context->callee().data().toUInt32(); | ||||
70 | else | ||||
71 | _id = 0xBABE0000 + 0; | ||||
72 | #endif | ||||
73 | Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); | ||||
74 | _id &= 0x0000FFFF; | ||||
75 | QParallelAnimationGroup* _q_self = qscriptvalue_cast<QParallelAnimationGroup*>(context->thisObject()); | ||||
76 | if (!_q_self) { | ||||
77 | return context->throwError(QScriptContext::TypeError, | ||||
78 | QString::fromLatin1("QParallelAnimationGroup.%0(): this object is not a QParallelAnimationGroup") | ||||
79 | .arg(qtscript_QParallelAnimationGroup_function_names[_id+1])); | ||||
80 | } | ||||
81 | | ||||
82 | switch (_id) { | ||||
83 | case 0: { | ||||
84 | QString result = QString::fromLatin1("QParallelAnimationGroup"); | ||||
85 | return QScriptValue(context->engine(), result); | ||||
86 | } | ||||
87 | | ||||
88 | default: | ||||
89 | Q_ASSERT(false); | ||||
90 | } | ||||
91 | return qtscript_QParallelAnimationGroup_throw_ambiguity_error_helper(context, | ||||
92 | qtscript_QParallelAnimationGroup_function_names[_id+1], | ||||
93 | qtscript_QParallelAnimationGroup_function_signatures[_id+1]); | ||||
94 | } | ||||
95 | | ||||
96 | static QScriptValue qtscript_QParallelAnimationGroup_static_call(QScriptContext *context, QScriptEngine *) | ||||
97 | { | ||||
98 | uint _id = context->callee().data().toUInt32(); | ||||
99 | Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); | ||||
100 | _id &= 0x0000FFFF; | ||||
101 | switch (_id) { | ||||
102 | case 0: | ||||
103 | if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { | ||||
104 | return context->throwError(QString::fromLatin1("QParallelAnimationGroup(): Did you forget to construct with 'new'?")); | ||||
105 | } | ||||
106 | if (context->argumentCount() == 0) { | ||||
107 | QtScriptShell_QParallelAnimationGroup* _q_cpp_result = new QtScriptShell_QParallelAnimationGroup(); | ||||
108 | QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QParallelAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); | ||||
109 | _q_cpp_result->__qtscript_self = _q_result; | ||||
110 | return _q_result; | ||||
111 | } else if (context->argumentCount() == 1) { | ||||
112 | QObject* _q_arg0 = context->argument(0).toQObject(); | ||||
113 | QtScriptShell_QParallelAnimationGroup* _q_cpp_result = new QtScriptShell_QParallelAnimationGroup(_q_arg0); | ||||
114 | QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QParallelAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); | ||||
115 | _q_cpp_result->__qtscript_self = _q_result; | ||||
116 | return _q_result; | ||||
117 | } | ||||
118 | break; | ||||
119 | | ||||
120 | default: | ||||
121 | Q_ASSERT(false); | ||||
122 | } | ||||
123 | return qtscript_QParallelAnimationGroup_throw_ambiguity_error_helper(context, | ||||
124 | qtscript_QParallelAnimationGroup_function_names[_id], | ||||
125 | qtscript_QParallelAnimationGroup_function_signatures[_id]); | ||||
126 | } | ||||
127 | | ||||
128 | static QScriptValue qtscript_QParallelAnimationGroup_toScriptValue(QScriptEngine *engine, QParallelAnimationGroup* const &in) | ||||
129 | { | ||||
130 | return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); | ||||
131 | } | ||||
132 | | ||||
133 | static void qtscript_QParallelAnimationGroup_fromScriptValue(const QScriptValue &value, QParallelAnimationGroup* &out) | ||||
134 | { | ||||
135 | out = qobject_cast<QParallelAnimationGroup*>(value.toQObject()); | ||||
136 | } | ||||
137 | | ||||
138 | QScriptValue qtscript_create_QParallelAnimationGroup_class(QScriptEngine *engine) | ||||
139 | { | ||||
140 | engine->setDefaultPrototype(qMetaTypeId<QParallelAnimationGroup*>(), QScriptValue()); | ||||
141 | QScriptValue proto = engine->newVariant(qVariantFromValue((QParallelAnimationGroup*)0)); | ||||
142 | proto.setPrototype(engine->defaultPrototype(qMetaTypeId<QAnimationGroup*>())); | ||||
143 | | ||||
144 | qScriptRegisterMetaType<QParallelAnimationGroup*>(engine, qtscript_QParallelAnimationGroup_toScriptValue, | ||||
145 | qtscript_QParallelAnimationGroup_fromScriptValue, proto); | ||||
146 | | ||||
147 | QScriptValue ctor = engine->newFunction(qtscript_QParallelAnimationGroup_static_call, proto, qtscript_QParallelAnimationGroup_function_lengths[0]); | ||||
148 | ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); | ||||
149 | | ||||
150 | return ctor; | ||||
151 | } |