コード例 #1
0
// Perform any required initialisation.
void qpycore_init()
{
    // Initialise the meta-type.
    qpycore_pyqtWrapperType_Type.tp_base = sipWrapperType_Type;

    if (PyType_Ready(&qpycore_pyqtWrapperType_Type) < 0)
        Py_FatalError("PyQt4.QtCore: Failed to initialise pyqtWrapperType type");

    // Register the meta-type.
    if (sipRegisterPyType((PyTypeObject *)&qpycore_pyqtWrapperType_Type) < 0)
        Py_FatalError("PyQt4.QtCore: Failed to register pyqtWrapperType type");

    // Export the helpers.
    sipExportSymbol("qtcore_qt_metaobject",
            (void *)qpycore_qobject_metaobject);
    sipExportSymbol("qtcore_qt_metacall", (void *)qpycore_qobject_qt_metacall);
    sipExportSymbol("qtcore_qt_metacast", (void *)qpycore_qobject_qt_metacast);
    sipExportSymbol("qpycore_qobject_receivers",
            (void *)qpycore_qobject_receivers);

    sipExportSymbol("pyqt_kw_handler", (void *)qpycore_pyqtconfigure);

    sipExportSymbol("qpycore_ArgvToC", (void *)qpycore_ArgvToC);
    sipExportSymbol("qpycore_UpdatePyArgv", (void *)qpycore_UpdatePyArgv);
}
コード例 #2
0
ファイル: qpyopengl_init.cpp プロジェクト: imxiaohui/pyqt5
// Perform any required initialisation.
void qpyopengl_init()
{
    // Initialise the OpenGL data cache type.
    if (PyType_Ready(&qpyopengl_dataCache_Type) < 0)
        Py_FatalError("PyQt5.QtGui: Failed to initialise dataCache type");

    // Export the private helpers, ie. those that should not be used by
    // external handwritten code.
#if QT_VERSION >= 0x050100
    sipExportSymbol("qpyopengl_value_array", (void *)qpyopengl_value_array);
    sipExportSymbol("qpyopengl_value_array_cached",
            (void *)qpyopengl_value_array_cached);
    sipExportSymbol("qpyopengl_from_GLint", (void *)qpyopengl_from_GLint);
    sipExportSymbol("qpyopengl_from_GLuint", (void *)qpyopengl_from_GLuint);
    sipExportSymbol("qpyopengl_from_GLboolean",
            (void *)qpyopengl_from_GLboolean);
    sipExportSymbol("qpyopengl_from_GLfloat", (void *)qpyopengl_from_GLfloat);
    sipExportSymbol("qpyopengl_from_GLdouble",
            (void *)qpyopengl_from_GLdouble);
#endif
}
コード例 #3
0
// Perform any required initialisation.
void qpycore_init()
{
    // Initialise the meta-type.
    qpycore_pyqtWrapperType_Type.tp_base = sipWrapperType_Type;

    if (PyType_Ready(&qpycore_pyqtWrapperType_Type) < 0)
        Py_FatalError("PyQt4.QtCore: Failed to initialise pyqtWrapperType type");

    // Register the meta-type.
    if (sipRegisterPyType((PyTypeObject *)&qpycore_pyqtWrapperType_Type) < 0)
        Py_FatalError("PyQt4.QtCore: Failed to register pyqtWrapperType type");

    // Export the helpers.
    sipExportSymbol("qtcore_qt_metaobject",
            (void *)qpycore_qobject_metaobject);
    sipExportSymbol("qtcore_qt_metacall", (void *)qpycore_qobject_qt_metacall);
    sipExportSymbol("qtcore_qt_metacast", (void *)qpycore_qobject_qt_metacast);
    sipExportSymbol("qpycore_qobject_sender", (void *)qpycore_qobject_sender);
    sipExportSymbol("qpycore_qobject_receivers",
            (void *)qpycore_qobject_receivers);

    sipExportSymbol("qpycore_ArgvToC", (void *)qpycore_ArgvToC);
    sipExportSymbol("qpycore_UpdatePyArgv", (void *)qpycore_UpdatePyArgv);

    sipExportSymbol("qpycore_pyqtsignal_get_parts",
            (void *)qpycore_pyqtsignal_get_parts);
    sipExportSymbol("qpycore_pyqtslot_get_parts",
            (void *)qpycore_pyqtslot_get_parts);

    sipExportSymbol("qpycore_qvariant_value", (void *)qpycore_qvariant_value);

    sipExportSymbol("qpycore_register_to_pyobject",
            (void *)Chimera::registerToPyObject);
    sipExportSymbol("qpycore_register_to_qvariant",
            (void *)Chimera::registerToQVariant);
    sipExportSymbol("qpycore_register_to_qvariant_data",
            (void *)Chimera::registerToQVariantData);
}
コード例 #4
0
ファイル: qpycore_init.cpp プロジェクト: HunterChen/pyqt5
// Perform any required initialisation.
void qpycore_init()
{
    // Initialise the meta-type.
    qpycore_pyqtWrapperType_Type.tp_base = sipWrapperType_Type;

    if (PyType_Ready(&qpycore_pyqtWrapperType_Type) < 0)
        Py_FatalError("PyQt5.QtCore: Failed to initialise pyqtWrapperType type");

    // Register the meta-type.
    if (sipRegisterPyType((PyTypeObject *)&qpycore_pyqtWrapperType_Type) < 0)
        Py_FatalError("PyQt5.QtCore: Failed to register pyqtWrapperType type");

    // Export the private helpers, ie. those that should not be used by
    // external handwritten code.
    sipExportSymbol("qtcore_qt_metaobject",
            (void *)qpycore_qobject_metaobject);
    sipExportSymbol("qtcore_qt_metacall", (void *)qpycore_qobject_qt_metacall);
    sipExportSymbol("qtcore_qt_metacast", (void *)qpycore_qobject_qt_metacast);
    sipExportSymbol("qtcore_qobject_sender",
            (void *)PyQtSlotProxy::lastSender);

    // Export the public API.
    sipExportSymbol("pyqt5_from_argv_list", (void *)pyqt5_from_argv_list);
    sipExportSymbol("pyqt5_from_qvariant_by_type",
            (void *)pyqt5_from_qvariant_by_type);
    sipExportSymbol("pyqt5_get_connection_parts",
            (void *)pyqt5_get_connection_parts);
    sipExportSymbol("pyqt5_get_pyqtsignal_parts",
            (void *)pyqt5_get_pyqtsignal_parts);
    sipExportSymbol("pyqt5_get_pyqtslot_parts",
            (void *)pyqt5_get_pyqtslot_parts);
    sipExportSymbol("pyqt5_get_qmetaobject", (void *)pyqt5_get_qmetaobject);
    sipExportSymbol("pyqt5_get_signal_signature",
            (void *)pyqt5_get_signal_signature);
    sipExportSymbol("pyqt5_register_from_qvariant_convertor",
            (void *)pyqt5_register_from_qvariant_convertor);
    sipExportSymbol("pyqt5_register_to_qvariant_convertor",
            (void *)pyqt5_register_to_qvariant_convertor);
    sipExportSymbol("pyqt5_register_to_qvariant_data_convertor",
            (void *)pyqt5_register_to_qvariant_data_convertor);
    sipExportSymbol("pyqt5_update_argv_list", (void *)pyqt5_update_argv_list);
}