QDomDocument QDomImplementationProto:: createDocument(const QString& nsURI, const QString& qName, const QDomDocumentType& doctype)
{
  QDomImplementation *item = qscriptvalue_cast<QDomImplementation*>(thisObject());
  if (item)
    return item->createDocument(nsURI, qName, doctype);
  return QDomDocument();
}
static PyObject *meth_QDomImplementation_createDocument(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        const QString * a0;
        int a0State = 0;
        const QString * a1;
        int a1State = 0;
        const QDomDocumentType * a2;
        QDomImplementation *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1J9", &sipSelf, sipType_QDomImplementation, &sipCpp, sipType_QString,&a0, &a0State, sipType_QString,&a1, &a1State, sipType_QDomDocumentType, &a2))
        {
            QDomDocument *sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QDomDocument(sipCpp->createDocument(*a0,*a1,*a2));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);
            sipReleaseType(const_cast<QString *>(a1),sipType_QString,a1State);

            return sipConvertFromNewType(sipRes,sipType_QDomDocument,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QDomImplementation, sipName_createDocument, NULL);

    return NULL;
}
示例#3
0
void MenuFile::create()
{
   QDomImplementation impl;
   QDomDocumentType docType = impl.createDocumentType( MF_MENU, MF_PUBLIC_ID, MF_SYSTEM_ID );
   m_doc = impl.createDocument(QString(), MF_MENU, docType);
}