%PYARG_0 = %CONVERTTOPYTHON[long](qAbs(%1));
QPointF p;
%RETURN_TYPE retval = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &p);
%PYARG_0 = Shiboken::makeTuple(retval, p);
#if PY_VERSION_HEX < 0x03000000
SbkQString_Type.super.ht_type.tp_as_buffer = &SbkQStringBufferProc;
SbkQString_Type.super.ht_type.tp_flags |= Py_TPFLAGS_HAVE_GETCHARBUFFER;
#endif
QByteArray utf8 = %CPPSELF.toUtf8();
%PYARG_0 = PyUnicode_DecodeUTF8(utf8.data(), utf8.count(), 0);
return %CPPSELF.count();
if (_i < 0 || _i >= %CPPSELF.size()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
}
return %CONVERTTOPYTHON[%TYPE](%CPPSELF.at(_i));
%CPPSELF.remove(_i, 1);
PyObject* args = Py_BuildValue("(nO)", _i, _value);
PyObject* result = SbkQStringFunc_insert(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;
int year, month, day;
%CPPSELF.%FUNCTION_NAME(&year, &month, &day);
%PYARG_0 = Shiboken::makeTuple(year, month, day);
int yearNumber;
int week = %CPPSELF.%FUNCTION_NAME(&yearNumber);
%PYARG_0 = Shiboken::makeTuple(week, yearNumber);
return %CPPSELF.size();
if (_i < 0 || _i >= %CPPSELF.size()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
}
return %CONVERTTOPYTHON[bool](%CPPSELF.at(_i));
PyObject* args = Py_BuildValue("(iiO)", _i, 1, _value);
PyObject* result = SbkQBitArrayFunc_setBit(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.%FUNCTION_NAME(%1, %2, %PYARG_3));
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.%FUNCTION_NAME());
// %FUNCTION_NAME() - disable generation of function call.
%PYARG_0 = %CONVERTTOPYTHON[bool](qobjectConnect(%1, %2, %3, %4, %5));
// %FUNCTION_NAME() - disable generation of function call.
%PYARG_0 = %CONVERTTOPYTHON[bool](qobjectConnectCallback(%1, %2, %PYARG_3, %4));
// %FUNCTION_NAME() - disable generation of function call.
%PYARG_0 = %CONVERTTOPYTHON[bool](qobjectConnectCallback(%CPPSELF, %1, %PYARG_2, %3));
// %FUNCTION_NAME() - disable generation of function call.
%PYARG_0 = %CONVERTTOPYTHON[bool](qobjectConnect(%CPPSELF, %1, %2, %3, %4));
%PYARG_0 = %CONVERTTOPYTHON[bool](PySide::SignalManager::instance().emitSignal(%CPPSELF, %1, %PYARG_2));
// %FUNCTION_NAME() - disable generation of function call.
%PYARG_0 = %CONVERTTOPYTHON[bool](qobjectDisconnectCallback(%CPPSELF, %1, %2));
// %FUNCTION_NAME() - disable generation of function call.
%PYARG_0 = %CONVERTTOPYTHON[bool](qobjectDisconnectCallback(%1, %2, %3));
static bool
qobjectInheritsInternal(PyTypeObject *objType, const char *class_name)
{
if (strcmp(objType->tp_name, class_name) == 0)
return true;
PyTypeObject* base = (objType)->tp_base;
if (base == 0)
return false;
return qobjectInheritsInternal(base, class_name);
}
bool retval = qobjectInheritsInternal(self->ob_type, %1) ? true : %CPPSELF.%FUNCTION_NAME(%1);
%PYARG_0 = %CONVERTTOPYTHON[bool](retval);
const bool isEmpty = %2.isEmpty();
foreach(QObject* o, %CPPSELF.children()) {
if (isEmpty || %2 == o->objectName()) {
PyObject* obj = %CONVERTTOPYTHON[QObject*](o);
Shiboken::setParent(self, obj);
if (PyType_IsSubtype(obj->ob_type, (PyTypeObject*)%PYARG_1))
%PYARG_0 = obj;
else
Py_DECREF(obj);
}
}
%PYARG_0 = PyList_New(0);
const bool isEmpty = %2.isEmpty();
foreach(QObject* o, %CPPSELF.children()) {
if (isEmpty || %2 == o->objectName()) {
PyObject* obj = %CONVERTTOPYTHON[QObject*](o);
Shiboken::setParent(self, obj);
if (PyType_IsSubtype(obj->ob_type, (PyTypeObject*)%PYARG_1))
PyList_Append(%PYARG_0, obj);
Py_DECREF(obj);
}
}
QString result;
if (QCoreApplication::instance()) {
PyObject *klass = PyObject_GetAttrString(%PYSELF, "__class__");
PyObject *cname = PyObject_GetAttrString(klass, "__name__");
result = QString(QCoreApplication::instance()->translate(PyString_AsString(cname), %1, %2, QCoreApplication::CodecForTr, %3));
Py_DECREF(klass);
Py_DECREF(cname);
} else {
result = QString(QString::fromLatin1(%1));
}
%PYARG_0 = %CONVERTTOPYTHON[QString](result);
QString result;
if (QCoreApplication::instance()) {
PyObject *klass = PyObject_GetAttrString(%PYSELF, "__class__");
PyObject *cname = PyObject_GetAttrString(klass, "__name__");
result = QString(QCoreApplication::instance()->translate(PyString_AsString(cname), %1, %2, QCoreApplication::UnicodeUTF8, %3));
Py_DECREF(klass);
Py_DECREF(cname);
} else {
result = QString(QString::fromLatin1(%1));
}
%PYARG_0 = %CONVERTTOPYTHON[QString](result);
>
cptr = new %TYPE(%CONVERTTOCPP[QVariant](%PYARG_1));
const char* type_name = %CPPSELF.typeName();
uint type_id = QMetaType::type(type_name);
if (!type_id || type_id > QVariant::UserType) {
%PYARG_0 = %CPPSELF.value<PyObjectHolder>();
} else if (type_id == QVariant::String) {
%PYARG_0 = %CONVERTTOPYTHON[QString](%CPPSELF.toString());
} else {
%PYARG_0 = Py_None;
Py_INCREF(Py_None);
}
if (%CPPSELF.isNull()) {
%PYARG_0 = Py_None;
Py_INCREF(Py_None);
} else if (%CPPSELF.userType() == QMetaTypeId<PyObjectHolder>::qt_metatype_id()) {
// emulate PyQt4 behaviour
PyObject* obj = %CPPSELF.value<PyObjectHolder>();
if (PySequence_Check(obj))
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE]("QVariantList");
}
if (!%PYARG_0)
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.typeName());
return %CPPSELF.count();
if (_i < 0 || _i >= %CPPSELF.size()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
}
return %CONVERTTOPYTHON[QString](%CPPSELF.at(_i));
PyObject* args = Py_BuildValue("(nO)", _i, _value);
PyObject* result = SbkQStringListFunc_replace(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;
return 0;
int size = PyString_Size(pyargs[0]);
cptr = new QByteArray(cpp_arg0, size);
#if PY_VERSION_HEX < 0x03000000
SbkQByteArray_Type.super.ht_type.tp_as_buffer = &SbkQByteArrayBufferProc;
SbkQByteArray_Type.super.ht_type.tp_flags |= Py_TPFLAGS_HAVE_GETCHARBUFFER;
#endif
char c = PyString_AS_STRING(%PYARG_1)[0];
if (c) {
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.%FUNCTION_NAME(c));
}
%PYARG_0 = PyString_FromString(%CPPSELF.data());
return %CPPSELF.count();
if (_i < 0 || _i >= %CPPSELF.size()) {
PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0;
} else {
char res[2];
res[0] = %CPPSELF.at(_i);
res[1] = 0;
return PyString_FromString(res);
}
%CPPSELF.remove(_i, 1);
PyObject* args = Py_BuildValue("(nO)", _i, _value);
PyObject* result = SbkQByteArrayFunc_insert(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;
// %FUNCTION_NAME() - disable generation of c++ function call
Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
PyObject* pyTimer = SbkQTimer_Type.super.ht_type.tp_new((PyTypeObject*)&SbkQTimer_Type, emptyTuple, 0);
SbkQTimer_Type.super.ht_type.tp_init(pyTimer, emptyTuple, 0);
QTimer* timer = SbkQTimer_cptr(pyTimer);
PyObject* result = PyObject_CallMethod(pyTimer, "connect", "OsOs", pyTimer, SIGNAL(timeout()), %PYARG_2, %3);
Py_DECREF(result);
timer->setSingleShot(true);
timer->connect(timer, SIGNAL("timeout()"), timer, SLOT("deleteLater()"));
timer->start(%1);
// %FUNCTION_NAME() - disable generation of c++ function call
Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
PyObject* pyTimer = SbkQTimer_Type.super.ht_type.tp_new((PyTypeObject*)&SbkQTimer_Type, emptyTuple, 0);
SbkQTimer_Type.super.ht_type.tp_init(pyTimer, emptyTuple, 0);
QTimer* timer = SbkQTimer_cptr(pyTimer);
timer->setSingleShot(true);
timer->connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater()));
PyObject* result = PyObject_CallMethod(pyTimer, "connect", "OsO", pyTimer, SIGNAL(timeout()), pyargs[2-1]);
Py_DECREF(result);
timer->start(cpp_arg0);
qint64 pid;
%RETURN_TYPE retval = %TYPE::%FUNCTION_NAME(%1, %2, %3, &pid);
%PYARG_0 = Shiboken::makeTuple(retval, pid);
.. class:: QCoreApplication(args)
Constructs a Qt kernel application. Kernel applications are applications
without a graphical user interface. These type of applications are used
at the console or as server processes.
The *args* argument is processed by the application, and made available
in a more convenient form by the :meth:`~QCoreApplication.arguments()`
method.
%RETURN_TYPE _cpp_result;
(*%CPPSELF) >> _cpp_result;
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](_cpp_result);
(*%CPPSELF) << cpp_arg0;
%PYARG_0 = (PyObject*)%CPPSELF.%FUNCTION_NAME();
if (!%PYARG_0)
%PYARG_0 = Py_None;
Py_XINCREF(%PYARG_0);
for(int counter = 0; counter < %CPPSELF.animationCount(); ++counter ) {
PyObject* obj = %CONVERTTOPYTHON[QAbstractAnimation*](%CPPSELF.animationAt(counter));
Shiboken::setParent(NULL, obj);
Py_DECREF(obj);
}
%CPPSELF.clear();
QString signalName(%2);
if (PySide::SignalManager::registerMetaMethod(%1, signalName.mid(1).toAscii().data(), QMetaMethod::Signal)) {
%PYARG_0 = %CONVERTTOPYTHON[QSignalTransition*](%CPPSELF->addTransition(%1, %2, %3));
} else {
%PYARG_0 = Py_None;
}
%PYARG_0 = PySet_New(0);
foreach(QAbstractState* abs_state, %CPPSELF.configuration()) {
Shiboken::AutoDecRef obj(%CONVERTTOPYTHON[QAbstractState*](abs_state));
Shiboken::setParent(self, obj);
PySet_Add(%PYARG_0, obj);
}
%PYARG_0 = PyList_New(0);
foreach(QAbstractAnimation* abs_anim, %CPPSELF.defaultAnimations()) {
Shiboken::AutoDecRef obj(%CONVERTTOPYTHON[QAbstractAnimation*](abs_anim));
Shiboken::setParent(self, obj);
PyList_Append(%PYARG_0, obj);
}
%PYARG_0 = PyString_FromFormat("2%s", QMetaObject::normalizedSignature(%1).constData());
%PYARG_0 = PyString_FromFormat("1%s", QMetaObject::normalizedSignature(%1).constData());
%PYARG_0 = %PYARG_1;
%PYARG_0 = %PYARG_1;
%PYARG_0 = %PYARG_1;
%PYARG_0 = %PYARG_1;
extern bool
qRegisterResourceData(int,
const unsigned char *,
const unsigned char *,
const unsigned char *);
extern bool
qUnregisterResourceData(int,
const unsigned char *,
const unsigned char *,
const unsigned char *);
%PYARG_0 = %CONVERTTOPYTHON[bool](%FUNCTION_NAME(%1, (uchar*)%2, (uchar*)%3, (uchar*)%4));
%PYARG_0 = %CONVERTTOPYTHON[bool](%FUNCTION_NAME(%1, (uchar*)%2, (uchar*)%3, (uchar*)%4));