本文整理汇总了C++中qScriptValueFromSequence函数的典型用法代码示例。如果您正苦于以下问题:C++ qScriptValueFromSequence函数的具体用法?C++ qScriptValueFromSequence怎么用?C++ qScriptValueFromSequence使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qScriptValueFromSequence函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: qScriptValueFromSequence
// returns all base classes (in case of multiple inheritance):
QScriptValue REcmaDimDiametricEntity::getBaseClasses(QScriptContext *context, QScriptEngine *engine)
{
QStringList list;
list.append("RDimensionEntity");
list.append("REntity");
list.append("RObject");
return qScriptValueFromSequence(engine, list);
}
开发者ID:VixMobile,项目名称:qcad,代码行数:15,代码来源:REcmaDimDiametricEntity.cpp
示例2: qScriptValueFromSequence
// returns all base classes (in case of multiple inheritance):
QScriptValue REcmaSharedPointerAttributeDefinitionData::getBaseClasses(QScriptContext *context, QScriptEngine *engine)
{
QStringList list;
list.append("RTextBasedData");
list.append("REntityData");
list.append("RPainterPathSource");
return qScriptValueFromSequence(engine, list);
}
开发者ID:Jackieee,项目名称:qcad,代码行数:15,代码来源:REcmaSharedPointerAttributeDefinitionData.cpp
示例3: qScriptValueFromSequence
// returns all base classes (in case of multiple inheritance):
QScriptValue REcmaRulerQt::getBaseClasses(QScriptContext *context, QScriptEngine *engine)
{
QStringList list;
list.append("QFrame");
list.append("RRuler");
list.append("RCoordinateListener");
return qScriptValueFromSequence(engine, list);
}
开发者ID:ppiecuch,项目名称:qcad,代码行数:15,代码来源:REcmaRulerQt.cpp
示例4: qScriptValueFromSequence
// returns all base classes (in case of multiple inheritance):
QScriptValue REcmaDeleteObjectOperation::getBaseClasses(QScriptContext *context, QScriptEngine *engine)
{
QStringList list;
list.append("RDeleteObjectsOperation");
list.append("ROperation");
list.append("RRequireHeap");
return qScriptValueFromSequence(engine, list);
}
开发者ID:fallenwind,项目名称:qcad,代码行数:15,代码来源:REcmaDeleteObjectOperation.cpp
示例5: qScriptValueFromSequence
// returns all base classes (in case of multiple inheritance):
QScriptValue REcmaSharedPointerAttributeEntity::getBaseClasses(QScriptContext *context, QScriptEngine *engine)
{
QStringList list;
list.append("RTextBasedEntity");
list.append("REntity");
list.append("RObject");
return qScriptValueFromSequence(engine, list);
}
开发者ID:konysulphrea,项目名称:qcad,代码行数:15,代码来源:REcmaSharedPointerAttributeEntity.cpp
示例6: qtscript_QItemSelection_static_call
static QScriptValue qtscript_QItemSelection_static_call(QScriptContext *context, QScriptEngine *)
{
uint _id = context->callee().data().toUInt32();
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
switch (_id) {
case 0:
if (context->thisObject().strictlyEquals(context->engine()->globalObject())) {
return context->throwError(QString::fromLatin1("QItemSelection(): Did you forget to construct with 'new'?"));
}
if (context->argumentCount() == 0) {
QItemSelection _q_cpp_result;
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if (context->argumentCount() == 2) {
QModelIndex _q_arg0 = qscriptvalue_cast<QModelIndex>(context->argument(0));
QModelIndex _q_arg1 = qscriptvalue_cast<QModelIndex>(context->argument(1));
QItemSelection _q_cpp_result(_q_arg0, _q_arg1);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
}
break;
case 1:
if (context->argumentCount() == 1) {
QVector<QItemSelectionRange> _q_arg0;
qScriptValueToSequence(context->argument(0), _q_arg0);
QList<QItemSelectionRange > _q_result = QItemSelection::fromVector(_q_arg0);
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 3) {
QItemSelectionRange _q_arg0 = qscriptvalue_cast<QItemSelectionRange>(context->argument(0));
QItemSelectionRange _q_arg1 = qscriptvalue_cast<QItemSelectionRange>(context->argument(1));
QItemSelection* _q_arg2 = qscriptvalue_cast<QItemSelection*>(context->argument(2));
QItemSelection::split(_q_arg0, _q_arg1, _q_arg2);
return context->engine()->undefinedValue();
}
break;
default:
Q_ASSERT(false);
}
return qtscript_QItemSelection_throw_ambiguity_error_helper(context,
qtscript_QItemSelection_function_names[_id],
qtscript_QItemSelection_function_signatures[_id]);
}
开发者ID:fallenwind,项目名称:qcad,代码行数:49,代码来源:qtscript_QItemSelection.cpp
示例7: qtscript_QStylePlugin_prototype_call
static QScriptValue qtscript_QStylePlugin_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 2;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QStylePlugin* _q_self = qscriptvalue_cast<QStylePlugin*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QStylePlugin.%0(): this object is not a QStylePlugin")
.arg(qtscript_QStylePlugin_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 1) {
QString _q_arg0 = context->argument(0).toString();
QStyle* _q_result = _q_self->create(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 1:
if (context->argumentCount() == 0) {
QStringList _q_result = _q_self->keys();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 2: {
QString result = QString::fromLatin1("QStylePlugin");
return QScriptValue(context->engine(), result);
}
default:
Q_ASSERT(false);
}
return qtscript_QStylePlugin_throw_ambiguity_error_helper(context,
qtscript_QStylePlugin_function_names[_id+1],
qtscript_QStylePlugin_function_signatures[_id+1]);
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:49,代码来源:qtscript_QStylePlugin.cpp
示例8: i
QScriptValue Json::encodeInner(const QMap<QString,QVariant> &map, QScriptEngine* engine)
{
QScriptValue obj = engine->newObject();
QMapIterator<QString, QVariant> i(map);
while (i.hasNext()) {
i.next();
if (i.value().type() == QVariant::String)
obj.setProperty(i.key(), i.value().toString());
else if (i.value().type() == QVariant::Int)
obj.setProperty(i.key(), i.value().toInt());
else if (i.value().type() == QVariant::Double)
obj.setProperty(i.key(), i.value().toDouble());
else if (i.value().type() == QVariant::List)
obj.setProperty(i.key(), qScriptValueFromSequence(engine, i.value().toList()));
else if (i.value().type() == QVariant::Map)
obj.setProperty(i.key(), encodeInner(i.value().toMap(), engine));
}
return obj;
}
开发者ID:magnesj,项目名称:ResInsight,代码行数:19,代码来源:RifJsonEncodeDecode.cpp
示例9: Q_UNUSED
QScriptValue File::js_directoryEntries(QScriptContext *context, QScriptEngine *engine)
{
Q_UNUSED(engine);
if (Q_UNLIKELY(context->argumentCount() < 2)) {
return context->throwError(QScriptContext::SyntaxError,
Tr::tr("directoryEntries expects 2 arguments"));
}
const auto se = static_cast<ScriptEngine *>(engine);
const DubiousContextList dubiousContexts({
DubiousContext(EvalContext::PropertyEvaluation, DubiousContext::SuggestMoving)
});
se->checkContext(QLatin1String("File.directoryEntries()"), dubiousContexts);
const QString path = context->argument(0).toString();
const auto filters = static_cast<QDir::Filters>(context->argument(1).toUInt32());
QDir dir(path);
const QStringList entries = dir.entryList(filters, QDir::Name);
se->addDirectoryEntriesResult(path, filters, entries);
return qScriptValueFromSequence(engine, entries);
}
开发者ID:BumblingCoder,项目名称:qbs,代码行数:21,代码来源:file.cpp
示例10: qscriptengine_stack
static QScriptValue qscriptengine_stack(QScriptContext *ctx, QScriptEngine *e)
{
QVariantList stack;
qint32 frame = 0;
bool framesSpecified = ctx->argumentCount() > 0;
if (framesSpecified) {
frame = ctx->argument(0).toInt32();
}
while (ctx) {
// count down if user has requested for certain number of frames
if ( framesSpecified && frame-- <= 0 )
break;
ctx = ctx->parentContext();
QScriptContextInfo info(ctx);
QVariantMap callsite;
callsite["fileName"] = info.fileName();
callsite["lineNumber"] = info.lineNumber();
callsite["functionName"] = info.functionName();
stack << callsite;
}
return qScriptValueFromSequence(e, stack);
}
开发者ID:qtproject,项目名称:playground-qtsystemtest,代码行数:24,代码来源:qstrunnerbootstrap.cpp
示例11: qtscript_QItemSelectionRange_prototype_call
static QScriptValue qtscript_QItemSelectionRange_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 18;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QItemSelectionRange* _q_self = qscriptvalue_cast<QItemSelectionRange*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QItemSelectionRange.%0(): this object is not a QItemSelectionRange")
.arg(qtscript_QItemSelectionRange_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 0) {
int _q_result = _q_self->bottom();
return QScriptValue(context->engine(), _q_result);
}
break;
case 1:
if (context->argumentCount() == 0) {
const QPersistentModelIndex& _q_result = _q_self->bottomRight();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 1) {
QModelIndex _q_arg0 = qscriptvalue_cast<QModelIndex>(context->argument(0));
bool _q_result = _q_self->contains(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
if (context->argumentCount() == 3) {
int _q_arg0 = context->argument(0).toInt32();
int _q_arg1 = context->argument(1).toInt32();
QModelIndex _q_arg2 = qscriptvalue_cast<QModelIndex>(context->argument(2));
bool _q_result = _q_self->contains(_q_arg0, _q_arg1, _q_arg2);
return QScriptValue(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 0) {
int _q_result = _q_self->height();
return QScriptValue(context->engine(), _q_result);
}
break;
case 4:
if (context->argumentCount() == 0) {
QList<QModelIndex > _q_result = _q_self->indexes();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 5:
if (context->argumentCount() == 1) {
QItemSelectionRange _q_arg0 = qscriptvalue_cast<QItemSelectionRange>(context->argument(0));
QItemSelectionRange _q_result = _q_self->intersected(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 6:
if (context->argumentCount() == 1) {
QItemSelectionRange _q_arg0 = qscriptvalue_cast<QItemSelectionRange>(context->argument(0));
bool _q_result = _q_self->intersects(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 7:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->isEmpty();
return QScriptValue(context->engine(), _q_result);
}
break;
case 8:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->isValid();
return QScriptValue(context->engine(), _q_result);
}
break;
case 9:
if (context->argumentCount() == 0) {
int _q_result = _q_self->left();
return QScriptValue(context->engine(), _q_result);
}
//.........这里部分代码省略.........
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:101,代码来源:qtscript_QItemSelectionRange.cpp
示例12: qtscript_QNetworkReply_prototype_call
static QScriptValue qtscript_QNetworkReply_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 13;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QNetworkReply* _q_self = qscriptvalue_cast<QNetworkReply*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QNetworkReply.%0(): this object is not a QNetworkReply")
.arg(qtscript_QNetworkReply_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 0) {
_q_self->abort();
return context->engine()->undefinedValue();
}
break;
case 1:
if (context->argumentCount() == 1) {
QNetworkRequest::Attribute _q_arg0 = qscriptvalue_cast<QNetworkRequest::Attribute>(context->argument(0));
QVariant _q_result = _q_self->attribute(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 0) {
QNetworkReply::NetworkError _q_result = _q_self->error();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 1) {
QByteArray _q_arg0 = qscriptvalue_cast<QByteArray>(context->argument(0));
bool _q_result = _q_self->hasRawHeader(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 4:
if (context->argumentCount() == 1) {
QNetworkRequest::KnownHeaders _q_arg0 = qscriptvalue_cast<QNetworkRequest::KnownHeaders>(context->argument(0));
QVariant _q_result = _q_self->header(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 5:
if (context->argumentCount() == 0) {
QNetworkAccessManager* _q_result = _q_self->manager();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 6:
if (context->argumentCount() == 0) {
QNetworkAccessManager::Operation _q_result = _q_self->operation();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 7:
if (context->argumentCount() == 1) {
QByteArray _q_arg0 = qscriptvalue_cast<QByteArray>(context->argument(0));
QByteArray _q_result = _q_self->rawHeader(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 8:
if (context->argumentCount() == 0) {
QList<QByteArray> _q_result = _q_self->rawHeaderList();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 9:
if (context->argumentCount() == 0) {
qint64 _q_result = _q_self->readBufferSize();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 10:
if (context->argumentCount() == 0) {
QNetworkRequest _q_result = _q_self->request();
return qScriptValueFromValue(context->engine(), _q_result);
//.........这里部分代码省略.........
开发者ID:SSMN,项目名称:MuseScore,代码行数:101,代码来源:qtscript_QNetworkReply.cpp
示例13: qtscript_QButtonGroup_prototype_call
static QScriptValue qtscript_QButtonGroup_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 8;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QButtonGroup* _q_self = qscriptvalue_cast<QButtonGroup*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QButtonGroup.%0(): this object is not a QButtonGroup")
.arg(qtscript_QButtonGroup_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 1) {
QAbstractButton* _q_arg0 = qscriptvalue_cast<QAbstractButton*>(context->argument(0));
_q_self->addButton(_q_arg0);
return context->engine()->undefinedValue();
}
if (context->argumentCount() == 2) {
QAbstractButton* _q_arg0 = qscriptvalue_cast<QAbstractButton*>(context->argument(0));
int _q_arg1 = context->argument(1).toInt32();
_q_self->addButton(_q_arg0, _q_arg1);
return context->engine()->undefinedValue();
}
break;
case 1:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
QAbstractButton* _q_result = _q_self->button(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 0) {
QList<QAbstractButton* > _q_result = _q_self->buttons();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 0) {
QAbstractButton* _q_result = _q_self->checkedButton();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 4:
if (context->argumentCount() == 0) {
int _q_result = _q_self->checkedId();
return QScriptValue(context->engine(), _q_result);
}
break;
case 5:
if (context->argumentCount() == 1) {
QAbstractButton* _q_arg0 = qscriptvalue_cast<QAbstractButton*>(context->argument(0));
int _q_result = _q_self->id(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 6:
if (context->argumentCount() == 1) {
QAbstractButton* _q_arg0 = qscriptvalue_cast<QAbstractButton*>(context->argument(0));
_q_self->removeButton(_q_arg0);
return context->engine()->undefinedValue();
}
break;
case 7:
if (context->argumentCount() == 2) {
QAbstractButton* _q_arg0 = qscriptvalue_cast<QAbstractButton*>(context->argument(0));
int _q_arg1 = context->argument(1).toInt32();
_q_self->setId(_q_arg0, _q_arg1);
return context->engine()->undefinedValue();
}
break;
case 8: {
QString result = QString::fromLatin1("QButtonGroup");
return QScriptValue(context->engine(), result);
}
default:
Q_ASSERT(false);
}
return qtscript_QButtonGroup_throw_ambiguity_error_helper(context,
qtscript_QButtonGroup_function_names[_id+1],
//.........这里部分代码省略.........
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:101,代码来源:qtscript_QButtonGroup.cpp
示例14: qtscript_QItemSelectionModel_prototype_call
static QScriptValue qtscript_QItemSelectionModel_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 12;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QItemSelectionModel* _q_self = qscriptvalue_cast<QItemSelectionModel*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QItemSelectionModel.%0(): this object is not a QItemSelectionModel")
.arg(qtscript_QItemSelectionModel_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 2) {
int _q_arg0 = context->argument(0).toInt32();
QModelIndex _q_arg1 = qscriptvalue_cast<QModelIndex>(context->argument(1));
bool _q_result = _q_self->columnIntersectsSelection(_q_arg0, _q_arg1);
return QScriptValue(context->engine(), _q_result);
}
break;
case 1:
if (context->argumentCount() == 0) {
QModelIndex _q_result = _q_self->currentIndex();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 0) {
bool _q_result = _q_self->hasSelection();
return QScriptValue(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 2) {
int _q_arg0 = context->argument(0).toInt32();
QModelIndex _q_arg1 = qscriptvalue_cast<QModelIndex>(context->argument(1));
bool _q_result = _q_self->isColumnSelected(_q_arg0, _q_arg1);
return QScriptValue(context->engine(), _q_result);
}
break;
case 4:
if (context->argumentCount() == 2) {
int _q_arg0 = context->argument(0).toInt32();
QModelIndex _q_arg1 = qscriptvalue_cast<QModelIndex>(context->argument(1));
bool _q_result = _q_self->isRowSelected(_q_arg0, _q_arg1);
return QScriptValue(context->engine(), _q_result);
}
break;
case 5:
if (context->argumentCount() == 1) {
QModelIndex _q_arg0 = qscriptvalue_cast<QModelIndex>(context->argument(0));
bool _q_result = _q_self->isSelected(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 6:
if (context->argumentCount() == 0) {
const QAbstractItemModel* _q_result = const_cast<const QAbstractItemModel*>(_q_self->model());
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 7:
if (context->argumentCount() == 2) {
int _q_arg0 = context->argument(0).toInt32();
QModelIndex _q_arg1 = qscriptvalue_cast<QModelIndex>(context->argument(1));
bool _q_result = _q_self->rowIntersectsSelection(_q_arg0, _q_arg1);
return QScriptValue(context->engine(), _q_result);
}
break;
case 8:
if (context->argumentCount() == 0) {
QList<QModelIndex > _q_result = _q_self->selectedColumns();
return qScriptValueFromSequence(context->engine(), _q_result);
}
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
QList<QModelIndex > _q_result = _q_self->selectedColumns(_q_arg0);
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 9:
//.........这里部分代码省略.........
开发者ID:ppiecuch,项目名称:qcad,代码行数:101,代码来源:qtscript_QItemSelectionModel.cpp
示例15: qtscript_QPictureIO_static_call
static QScriptValue qtscript_QPictureIO_static_call(QScriptContext *context, QScriptEngine *)
{
uint _id = context->callee().data().toUInt32();
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
switch (_id) {
case 0:
if (context->thisObject().strictlyEquals(context->engine()->globalObject())) {
return context->throwError(QString::fromLatin1("QPictureIO(): Did you forget to construct with 'new'?"));
}
if (context->argumentCount() == 0) {
QPictureIO* _q_cpp_result = new QPictureIO();
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if (context->argumentCount() == 2) {
if (qscriptvalue_cast<QIODevice*>(context->argument(0))
&& context->argument(1).isString()) {
QIODevice* _q_arg0 = qscriptvalue_cast<QIODevice*>(context->argument(0));
// TEMPLATE - core.convert_string_arg_to_char* - START
QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1();
const char * _q_arg1 = tmp__q_arg1.constData();
// TEMPLATE - core.convert_string_arg_to_char* - END
QPictureIO* _q_cpp_result = new QPictureIO(_q_arg0, _q_arg1);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if (context->argument(0).isString()
&& context->argument(1).isString()) {
QString _q_arg0 = context->argument(0).toString();
// TEMPLATE - core.convert_string_arg_to_char* - START
QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1();
const char * _q_arg1 = tmp__q_arg1.constData();
// TEMPLATE - core.convert_string_arg_to_char* - END
QPictureIO* _q_cpp_result = new QPictureIO(_q_arg0, _q_arg1);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
}
}
break;
case 1:
if (context->argumentCount() == 0) {
QList<QByteArray> _q_result = QPictureIO::inputFormats();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 0) {
QList<QByteArray> _q_result = QPictureIO::outputFormats();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 1) {
if (qscriptvalue_cast<QIODevice*>(context->argument(0))) {
QIODevice* _q_arg0 = qscriptvalue_cast<QIODevice*>(context->argument(0));
QByteArray _q_result = QPictureIO::pictureFormat(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
} else if (context->argument(0).isString()) {
QString _q_arg0 = context->argument(0).toString();
QByteArray _q_result = QPictureIO::pictureFormat(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
}
break;
default:
Q_ASSERT(false);
}
return qtscript_QPictureIO_throw_ambiguity_error_helper(context,
qtscript_QPictureIO_function_names[_id],
qtscript_QPictureIO_function_signatures[_id]);
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:76,代码来源:qtscript_QPictureIO.cpp
示例16: qtscript_QWizard_prototype_call
static QScriptValue qtscript_QWizard_prototype_call(QScriptContext *context, QScriptEngine *)
{
#if QT_VERSION > 0x040400
Q_ASSERT(context->callee().isFunction());
uint _id = context->callee().data().toUInt32();
#else
uint _id;
if (context->callee().isFunction())
_id = context->callee().data().toUInt32();
else
_id = 0xBABE0000 + 23;
#endif
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
QWizard* _q_self = qscriptvalue_cast<QWizard*>(context->thisObject());
if (!_q_self) {
return context->throwError(QScriptContext::TypeError,
QString::fromLatin1("QWizard.%0(): this object is not a QWizard")
.arg(qtscript_QWizard_function_names[_id+1]));
}
switch (_id) {
case 0:
if (context->argumentCount() == 1) {
QWizardPage* _q_arg0 = qscriptvalue_cast<QWizardPage*>(context->argument(0));
int _q_result = _q_self->addPage(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 1:
if (context->argumentCount() == 1) {
QWizard::WizardButton _q_arg0 = qscriptvalue_cast<QWizard::WizardButton>(context->argument(0));
QAbstractButton* _q_result = _q_self->button(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 1) {
QWizard::WizardButton _q_arg0 = qscriptvalue_cast<QWizard::WizardButton>(context->argument(0));
QString _q_result = _q_self->buttonText(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 0) {
QWizardPage* _q_result = _q_self->currentPage();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 4:
if (context->argumentCount() == 1) {
QString _q_arg0 = context->argument(0).toString();
QVariant _q_result = _q_self->field(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 5:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
bool _q_result = _q_self->hasVisitedPage(_q_arg0);
return QScriptValue(context->engine(), _q_result);
}
break;
case 6:
if (context->argumentCount() == 0) {
int _q_result = _q_self->nextId();
return QScriptValue(context->engine(), _q_result);
}
break;
case 7:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
QWizardPage* _q_result = _q_self->page(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 8:
if (context->argumentCount() == 0) {
QList<int > _q_result = _q_self->pageIds();
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 9:
if (context->argumentCount() == 1) {
QWizard::WizardPixmap _q_arg0 = qscriptvalue_cast<QWizard::WizardPixmap>(context->argument(0));
QPixmap _q_result = _q_self->pixmap(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 10:
//.........这里部分代码省略.........
开发者ID:DanielJSlick,项目名称:qcad,代码行数:101,代码来源:qtscript_QWizard.cpp
示例17: qtscript_QStandardItem_prototype_call
//.........这里部分代码省略.........
break;
case 63:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
_q_self->sortChildren(_q_arg0);
return context->engine()->undefinedValue();
}
if (context->argumentCount() == 2) {
int _q_arg0 = context->argument(0).toInt32();
Qt::SortOrder _q_arg1 = qscriptvalue_cast<Qt::SortOrder>(context->argument(1));
_q_self->sortChildren(_q_arg0, _q_arg1);
return context->engine()->undefinedValue();
}
break;
case 64:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->statusTip();
return QScriptValue(context->engine(), _q_result);
}
break;
case 65:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
QStandardItem* _q_result = _q_self->takeChild(_q_arg0);
return qScriptValueFromValue(context->engine(), _q_result);
}
if (context->argumentCount() == 2) {
int _q_arg0 = context->argument(0).toInt32();
int _q_arg1 = context->argument(1).toInt32();
QStandardItem* _q_result = _q_self->takeChild(_q_arg0, _q_arg1);
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 66:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
QList<QStandardItem* > _q_result = _q_self->takeColumn(_q_arg0);
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 67:
if (context->argumentCount() == 1) {
int _q_arg0 = context->argument(0).toInt32();
QList<QStandardItem* > _q_result = _q_self->takeRow(_q_arg0);
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 68:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->text();
return QScriptValue(context->engine(), _q_result);
}
break;
case 69:
if (context->argumentCount() == 0) {
QFlags<Qt::AlignmentFlag> _q_result = _q_self->textAlignment();
return qScriptValueFromValue(context->engine(), _q_result);
}
break;
case 70:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->toolTip();
return QScriptValue(context->engine(), _q_result);
}
break;
case 71:
if (context->argumentCount() == 0) {
int _q_result = _q_self->type();
return QScriptValue(context->engine(), _q_result);
}
break;
case 72:
if (context->argumentCount() == 0) {
QString _q_result = _q_self->whatsThis();
return QScriptValue(context->engine(), _q_result);
}
break;
case 73: {
QString result = QString::fromLatin1("QStandardItem");
return QScriptValue(context->engine(), result);
}
default:
Q_ASSERT(false);
}
return qtscript_QStandardItem_throw_ambiguity_error_helper(context,
qtscript_QStandardItem_function_names[_id+1],
qtscript_QStandardItem_function_signatures[_id+1]);
}
开发者ID:Alpha-Kand,项目名称:qcad,代码行数:101,代码来源:qtscript_QStandardItem.cpp
示例18: qtscript_QSslCertificate_static_call
static QScriptValue qtscript_QSslCertificate_static_call(QScriptContext *context, QScriptEngine *)
{
uint _id = context->callee().data().toUInt32();
Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000);
_id &= 0x0000FFFF;
switch (_id) {
case 0:
if (context->thisObject().strictlyEquals(context->engine()->globalObject())) {
return context->throwError(QString::fromLatin1("QSslCertificate(): Did you forget to construct with 'new'?"));
}
if (context->argumentCount() == 0) {
QSslCertificate _q_cpp_result;
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if (context->argumentCount() == 1) {
if (qscriptvalue_cast<QIODevice*>(context->argument(0))) {
QIODevice* _q_arg0 = qscriptvalue_cast<QIODevice*>(context->argument(0));
QSslCertificate _q_cpp_result(_q_arg0);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if ((qMetaTypeId<QByteArray>() == context->argument(0).toVariant().userType())) {
QByteArray _q_arg0 = qscriptvalue_cast<QByteArray>(context->argument(0));
QSslCertificate _q_cpp_result(_q_arg0);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if ((qMetaTypeId<QSslCertificate>() == context->argument(0).toVariant().userType())) {
QSslCertificate _q_arg0 = qscriptvalue_cast<QSslCertificate>(context->argument(0));
QSslCertificate _q_cpp_result(_q_arg0);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
}
} else if (context->argumentCount() == 2) {
if (qscriptvalue_cast<QIODevice*>(context->argument(0))
&& (qMetaTypeId<QSsl::EncodingFormat>() == context->argument(1).toVariant().userType())) {
QIODevice* _q_arg0 = qscriptvalue_cast<QIODevice*>(context->argument(0));
QSsl::EncodingFormat _q_arg1 = qscriptvalue_cast<QSsl::EncodingFormat>(context->argument(1));
QSslCertificate _q_cpp_result(_q_arg0, _q_arg1);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
} else if ((qMetaTypeId<QByteArray>() == context->argument(0).toVariant().userType())
&& (qMetaTypeId<QSsl::EncodingFormat>() == context->argument(1).toVariant().userType())) {
QByteArray _q_arg0 = qscriptvalue_cast<QByteArray>(context->argument(0));
QSsl::EncodingFormat _q_arg1 = qscriptvalue_cast<QSsl::EncodingFormat>(context->argument(1));
QSslCertificate _q_cpp_result(_q_arg0, _q_arg1);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
}
}
break;
case 1:
if (context->argumentCount() == 1) {
QByteArray _q_arg0 = qscriptvalue_cast<QByteArray>(context->argument(0));
QList<QSslCertificate > _q_result = QSslCertificate::fromData(_q_arg0);
return qScriptValueFromSequence(context->engine(), _q_result);
}
if (context->argumentCount() == 2) {
QByteArray _q_arg0 = qscriptvalue_cast<QByteArray>(context->argument(0));
QSsl::EncodingFormat _q_arg1 = qscriptvalue_cast<QSsl::EncodingFormat>(context->argument(1));
QList<QSslCertificate > _q_result = QSslCertificate::fromData(_q_arg0, _q_arg1);
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 2:
if (context->argumentCount() == 1) {
QIODevice* _q_arg0 = qscriptvalue_cast<QIODevice*>(context->argument(0));
QList<QSslCertificate > _q_result = QSslCertificate::fromDevice(_q_arg0);
return qScriptValueFromSequence(context->engine(), _q_result);
}
if (context->argumentCount() == 2) {
QIODevice* _q_arg0 = qscriptvalue_cast<QIODevice*>(context->argument(0));
QSsl::EncodingFormat _q_arg1 = qscriptvalue_cast<QSsl::EncodingFormat>(context->argument(1));
QList<QSslCertificate > _q_result = QSslCertificate::fromDevice(_q_arg0, _q_arg1);
return qScriptValueFromSequence(context->engine(), _q_result);
}
break;
case 3:
if (context->argumentCount() == 1) {
QString _q_arg0 = context->argument(0).toStr
|
请发表评论