QScriptValue ProgressDialog::constructor(QScriptContext *context, QScriptEngine *engine) { ProgressDialog *progressDialog = new ProgressDialog; progressDialog->setupConstructorParameters(context, engine, context->argument(0)); QScriptValueIterator it(context->argument(0)); while(it.hasNext()) { it.next(); if(it.name() == "value") progressDialog->mProgressDialog->setValue(it.value().toInt32()); else if(it.name() == "labelText") progressDialog->mProgressDialog->setLabelText(it.value().toString()); else if(it.name() == "minimum") progressDialog->mProgressDialog->setMinimum(it.value().toInt32()); else if(it.name() == "maximum") progressDialog->mProgressDialog->setMaximum(it.value().toInt32()); else if(it.name() == "range") { progressDialog->mProgressDialog->setMinimum(it.value().property("minimum").toInt32()); progressDialog->mProgressDialog->setMaximum(it.value().property("maximum").toInt32()); } else if(it.name() == "onCanceled") progressDialog->mOnCanceled = it.value(); } return CodeClass::constructor(progressDialog, context, engine); }