本文整理汇总了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;
}
示例2: data
QString QDomCharacterDataProto:: data() const
{
QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
if (item)
return item->data();
return QString();
}
示例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)]");
}
示例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;
}
示例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();
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例10: setData
void QDomCharacterDataProto:: setData(const QString&data)
{
QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
if (item)
item->setData(data);
}
示例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);
}
示例12: deleteData
void QDomCharacterDataProto:: deleteData(unsigned long offset, unsigned long count)
{
QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
if (item)
item->deleteData(offset, count);
}
示例13: appendData
void QDomCharacterDataProto:: appendData(const QString& arg)
{
QDomCharacterData *item = qscriptvalue_cast<QDomCharacterData*>(thisObject());
if (item)
item->appendData(arg);
}