当前位置: 首页>>代码示例>>C++>>正文


C++ QDomCharacterData类代码示例

本文整理汇总了C++中QDomCharacterData的典型用法代码示例。如果您正苦于以下问题:C++ QDomCharacterData类的具体用法?C++ QDomCharacterData怎么用?C++ QDomCharacterData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QDomCharacterData类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: nodeType

int QDomCharacterDataProto:: nodeType() const
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    return item->nodeType();
  return 0;
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:7,代码来源:qdomcharacterdataproto.cpp

示例2: data

QString QDomCharacterDataProto:: data() const
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    return item->data();
  return QString();
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:7,代码来源:qdomcharacterdataproto.cpp

示例3: QString

QString QDomCharacterDataProto::toString() const
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    return QString("[QDomCharacterData(length=%1)]").arg(item->length());
  return QString("[QDomCharacterData(unknown)]");
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:7,代码来源:qdomcharacterdataproto.cpp

示例4: sipReleaseType

static PyObject *meth_QDomCharacterData_replaceData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        unsigned long a0;
        unsigned long a1;
        const QString* a2;
        int a2State = 0;
        QDomCharacterData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BmmJ1", &sipSelf, sipType_QDomCharacterData, &sipCpp, &a0, &a1, sipType_QString,&a2, &a2State))
        {
            sipCpp->replaceData(a0,a1,*a2);
            sipReleaseType(const_cast<QString *>(a2),sipType_QString,a2State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QDomCharacterData, sipName_replaceData, doc_QDomCharacterData_replaceData);

    return NULL;
}
开发者ID:rff255,项目名称:python-qt5,代码行数:26,代码来源:sipQtXmlQDomCharacterData.cpp

示例5: substringData

QString QDomCharacterDataProto:: substringData(unsigned long offset, unsigned long count)
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    return item->substringData(offset, count);
  return QString();
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:7,代码来源:qdomcharacterdataproto.cpp

示例6: sipConvertFromNewType

static PyObject *meth_QDomCharacterData_substringData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        unsigned long a0;
        unsigned long a1;
        QDomCharacterData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bmm", &sipSelf, sipType_QDomCharacterData, &sipCpp, &a0, &a1))
        {
            QString*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new QString(sipCpp->substringData(a0,a1));
            Py_END_ALLOW_THREADS

            return sipConvertFromNewType(sipRes,sipType_QString,NULL);
        }
    }
开发者ID:PLJV,项目名称:commodity_crop_dev_suitability_model,代码行数:20,代码来源:sipQtXmlQDomCharacterData.cpp

示例7: changeDomElementContents

bool changeDomElementContents(const QDomElement &element,
                           Predicate p,
                           const QString &newValue,
                           QString *ptrToOldValue = 0)
{
    // Find text in "<element>text</element>"
    const QDomNodeList children = element.childNodes();
    if (children.size() != 1)
        return false;
    const QDomNode first = children.at(0);
    if (first.nodeType() != QDomNode::TextNode)
        return false;
    QDomCharacterData data = first.toCharacterData();
    const QString oldValue = data.data();

    if (p(oldValue)) {
        if (ptrToOldValue)
            *ptrToOldValue = oldValue;
        data.setData(newValue);
        return true;
    }
    return false;
}
开发者ID:Herysutrisno,项目名称:qt-creator,代码行数:23,代码来源:formtemplatewizardpage.cpp

示例8: Py_INCREF

static PyObject *meth_QDomCharacterData_deleteData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        unsigned long a0;
        unsigned long a1;
        QDomCharacterData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bmm", &sipSelf, sipType_QDomCharacterData, &sipCpp, &a0, &a1))
        {
            sipCpp->deleteData(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QDomCharacterData, sipName_deleteData, doc_QDomCharacterData_deleteData);

    return NULL;
}
开发者ID:rff255,项目名称:python-qt5,代码行数:23,代码来源:sipQtXmlQDomCharacterData.cpp

示例9: QString

static PyObject *meth_QDomCharacterData_substringData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = NULL;

    {
        unsigned long a0;
        unsigned long a1;
        QDomCharacterData *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bmm", &sipSelf, sipType_QDomCharacterData, &sipCpp, &a0, &a1))
        {
            QString*sipRes;

            sipRes = new QString(sipCpp->substringData(a0,a1));

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

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_QDomCharacterData, sipName_substringData, doc_QDomCharacterData_substringData);

    return NULL;
}
开发者ID:rff255,项目名称:python-qt5,代码行数:24,代码来源:sipQtXmlQDomCharacterData.cpp

示例10: setData

void QDomCharacterDataProto:: setData(const QString&data)
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    item->setData(data);
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:6,代码来源:qdomcharacterdataproto.cpp

示例11: replaceData

void QDomCharacterDataProto:: replaceData(unsigned long offset, unsigned long count, const QString& arg)
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    item->replaceData(offset, count, arg);
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:6,代码来源:qdomcharacterdataproto.cpp

示例12: deleteData

void QDomCharacterDataProto:: deleteData(unsigned long offset, unsigned long count)
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    item->deleteData(offset, count);
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:6,代码来源:qdomcharacterdataproto.cpp

示例13: appendData

void QDomCharacterDataProto:: appendData(const QString& arg)
{
  QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
  if (item)
    item->appendData(arg);
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:6,代码来源:qdomcharacterdataproto.cpp


注:本文中的QDomCharacterData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。