if ((context->argumentCount() == 1) && (qMetaTypeId<QTextFormat>() == context->argument(0).toVariant().userType())) {
QTextFormat _q_arg0 = qscriptvalue_cast<QTextFormat>(context->argument(0));
QTextFormat _q_cpp_result(_q_arg0);
QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result));
return _q_result;
}
return new QTreeWidgetItemIterator(*copy);
delete copy;
return new QInputMethodEvent::Attribute(copy->type, copy->start, copy->length, copy->value);
delete copy;
return new QConicalGradient(copy->center(), copy->angle());
delete copy;
return new QFontInfo(*copy);
delete copy;
QFontInfo & %out% = *qscriptvalue_cast<QFontInfo*>(%in%);
return new QRadialGradient(copy->center(), copy->radius(), copy->focalPoint());
delete copy;
QImage* new_QImage( const uchar * data, int width, int height, QImage::Format format )
{
QImage* image = new QImage(width, height, format);
memcpy(image->bits(), data, image->byteCount());
return image;
}
PyObject* bits(QImage* image) {
return PythonQtPrivate::wrapMemoryAsBuffer(image->bits(), image->bytesPerLine()* image->height());
}
#if QT_VERSION >= QT_VERSION_CHECK(4,7,0)
PyObject* constBits(QImage* image) {
return PythonQtPrivate::wrapMemoryAsBuffer(image->constBits(), image->byteCount());
}
#endif
PyObject* scanLine(QImage* image, int line) {
return PythonQtPrivate::wrapMemoryAsBuffer(image->scanLine(line), image->bytesPerLine());
}
#if QT_VERSION >= QT_VERSION_CHECK(4,7,0)
PyObject* constScanLine(QImage* image, int line) {
return PythonQtPrivate::wrapMemoryAsBuffer(image->constScanLine(line), image->bytesPerLine());
}
#endif
return new QColormap(*copy);
delete copy;
QGradient & %out% = *qscriptvalue_cast<QGradient*>(%in%);
return new QFontMetricsF(*copy);
delete copy;
return new QFontMetrics(*copy);
delete copy;
Q_UNUSED(copy)
qWarning("Copying empty QGradient object");
return new QGradient();
delete copy;
QLinearGradient *lg = new QLinearGradient(copy->start(), copy->finalStop());
lg->setSpread(copy->spread());
lg->setStops(copy->stops());
return (void *) lg;
delete copy;
if (%1 != null) disableGarbageCollection();
QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers)
{ return QModelIndex(); }
Q_DECLARE_METATYPE(QScriptValue)
QAction* addAction (QMenu* menu, const QString & text, PyObject* callable, const QKeySequence & shortcut = 0) {
QAction* a = menu->addAction(text);
a->setShortcut(shortcut);
PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable);
return a;
}
QAction* addAction (QMenu* menu, const QIcon& icon, const QString& text, PyObject* callable, const QKeySequence& shortcut = 0)
{
QAction* a = menu->addAction(text);
a->setIcon(icon);
a->setShortcut(shortcut);
PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable);
return a;
}
QAction* addAction (QMenuBar* menu, const QString & text, PyObject* callable)
{
QAction* a = menu->addAction(text);
PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable);
return a;
}
// nothing
int __length = %out;
jobjectArray graphicsItemArrayHolder = %out;
jobjectArray styleOptionArrayHolder = %out;
qtjambi_invalidate_array(__jni_env, styleOptionArrayHolder);
qtjambi_invalidate_array(__jni_env, graphicsItemArrayHolder);
Q_DECLARE_METATYPE(QScriptValue)
if (%1 != null) disableGarbageCollection();
if (%2 != null) disableGarbageCollection();
extern "C" JNIEXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_com_trolltech_qt_gui_QWidget__1_1qt_1QMessageBox_1setWindowTitle)
(JNIEnv *__jni_env,
jclass,
jlong __this_nativeId,
jobject title0)
{
QTJAMBI_DEBUG_TRACE("(native) entering: QMessageBox::setWindowTitle(const QString & title)");
QString __qt_title0 = qtjambi_to_qstring(__jni_env, (jstring) title0);
QTJAMBI_EXCEPTION_CHECK(__jni_env);
QMessageBox *__qt_this = (QMessageBox *) qtjambi_from_jlong(__this_nativeId);
QTJAMBI_EXCEPTION_CHECK(__jni_env);
Q_ASSERT(__qt_this);
__qt_this->setWindowTitle((const QString& )__qt_title0);
QTJAMBI_DEBUG_TRACE("(native) -> leaving: QMessageBox::setWindowTitle(const QString & title)");
}
extern "C" JNIEXPORT void JNICALL QTJAMBI_FUNCTION_PREFIX(Java_com_trolltech_qt_gui_QWidget__1_1qt_1QMessageBox_1setWindowModality)
(JNIEnv *__jni_env,
jclass,
jlong __this_nativeId,
jint windowModality0)
{
Q_UNUSED(__jni_env);
QTJAMBI_DEBUG_TRACE("(native) entering: QMessageBox::setWindowModality(Qt::WindowModality modality)");
Qt::WindowModality __qt_windowModality0 = (Qt::WindowModality) windowModality0;
QTJAMBI_EXCEPTION_CHECK(__jni_env);
QMessageBox *__qt_this = (QMessageBox *) qtjambi_from_jlong(__this_nativeId);
QTJAMBI_EXCEPTION_CHECK(__jni_env);
Q_ASSERT(__qt_this);
__qt_this->setWindowModality((Qt::WindowModality )__qt_windowModality0);
QTJAMBI_DEBUG_TRACE("(native) -> leaving: QMessageBox::setWindowModality(Qt::WindowModality modality)");
}
jobject %out = qtjambi_from_object(__jni_env, %in, "QImage", "com/trolltech/qt/gui/", false);
QtJambiLink *__link = %out != 0 ? QtJambiLink::findLink(__jni_env, %out) : 0;
QImage *%out = (QImage *) qtjambi_to_object(__jni_env, %in);
// Invalidate object
if (__link != 0) __link->resetObject(__jni_env);
bool %out = (bool) %in;
QAction* addAction (QToolBar* menu, const QString & text, PyObject* callable)
{
QAction* a = menu->addAction(text);
PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable);
return a;
}
QAction* addAction (QToolBar* menu, const QIcon& icon, const QString& text, PyObject* callable)
{
QAction* a = menu->addAction(text);
a->setIcon(icon);
PythonQt::self()->addSignalHandler(a, SIGNAL(triggered(bool)), callable);
return a;
}
>