Qt 4.8
Public Functions | List of all members
QDomTextPrivate Class Reference
Inheritance diagram for QDomTextPrivate:
QDomCharacterDataPrivate QDomNodePrivate QDomCDATASectionPrivate

Public Functions

QDomNodePrivatecloneNode (bool deep=true)
 
virtual bool isText () const
 
QDomNode::NodeType nodeType () const
 
 QDomTextPrivate (QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
 
 QDomTextPrivate (QDomTextPrivate *n, bool deep)
 
virtual void save (QTextStream &s, int, int) const
 
QDomTextPrivatesplitText (int offset)
 
- Public Functions inherited from QDomCharacterDataPrivate
void appendData (const QString &arg)
 
uint dataLength () const
 
void deleteData (unsigned long offset, unsigned long count)
 
void insertData (unsigned long offset, const QString &arg)
 
virtual bool isCharacterData () const
 
 QDomCharacterDataPrivate (QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
 
 QDomCharacterDataPrivate (QDomCharacterDataPrivate *n, bool deep)
 
void replaceData (unsigned long offset, unsigned long count, const QString &arg)
 
QString substringData (unsigned long offset, unsigned long count) const
 
- Public Functions inherited from QDomNodePrivate
virtual QDomNodePrivateappendChild (QDomNodePrivate *newChild)
 
virtual void clear ()
 
virtual QDomNodePrivateinsertAfter (QDomNodePrivate *newChild, QDomNodePrivate *refChild)
 
virtual QDomNodePrivateinsertBefore (QDomNodePrivate *newChild, QDomNodePrivate *refChild)
 
virtual bool isAttr () const
 
virtual bool isCDATASection () const
 
virtual bool isComment () const
 
virtual bool isDocument () const
 
virtual bool isDocumentFragment () const
 
virtual bool isDocumentType () const
 
virtual bool isElement () const
 
virtual bool isEntity () const
 
virtual bool isEntityReference () const
 
virtual bool isNotation () const
 
virtual bool isProcessingInstruction () const
 
QDomNodePrivatenamedItem (const QString &name)
 
QString nodeName () const
 
QString nodeValue () const
 
virtual void normalize ()
 
QDomDocumentPrivateownerDocument ()
 
QDomNodePrivateparent () const
 
 QDomNodePrivate (QDomDocumentPrivate *, QDomNodePrivate *parent=0)
 
 QDomNodePrivate (QDomNodePrivate *n, bool deep)
 
virtual QDomNodePrivateremoveChild (QDomNodePrivate *oldChild)
 
virtual QDomNodePrivatereplaceChild (QDomNodePrivate *newChild, QDomNodePrivate *oldChild)
 
void setLocation (int lineNumber, int columnNumber)
 
virtual void setNodeValue (const QString &v)
 
void setNoParent ()
 
void setOwnerDocument (QDomDocumentPrivate *doc)
 
void setParent (QDomNodePrivate *p)
 
virtual ~QDomNodePrivate ()
 

Additional Inherited Members

- Public Variables inherited from QDomNodePrivate
int columnNumber
 
bool createdWithDom1Interface: 1
 
QDomNodePrivatefirst
 
bool hasParent: 1
 
QDomNodePrivatelast
 
int lineNumber
 
QString name
 
QString namespaceURI
 
QDomNodePrivatenext
 
QDomNodePrivateownerNode
 
QString prefix
 
QDomNodePrivateprev
 
QAtomicInt ref
 
QString value
 

Detailed Description

Definition at line 343 of file qdom.cpp.

Constructors and Destructors

◆ QDomTextPrivate() [1/2]

QDomTextPrivate::QDomTextPrivate ( QDomDocumentPrivate d,
QDomNodePrivate parent,
const QString val 
)

Definition at line 5282 of file qdom.cpp.

5283  : QDomCharacterDataPrivate(d, parent, val)
5284 {
5285  name = QLatin1String("#text");
5286 }
QString name
Definition: qdom.cpp:198
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QDomCharacterDataPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
Definition: qdom.cpp:3966

◆ QDomTextPrivate() [2/2]

QDomTextPrivate::QDomTextPrivate ( QDomTextPrivate n,
bool  deep 
)

Definition at line 5288 of file qdom.cpp.

5289  : QDomCharacterDataPrivate(n, deep)
5290 {
5291 }
QDomCharacterDataPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &data)
Definition: qdom.cpp:3966

Functions

◆ cloneNode()

QDomNodePrivate * QDomTextPrivate::cloneNode ( bool  deep = true)
virtual

Reimplemented from QDomCharacterDataPrivate.

Reimplemented in QDomCDATASectionPrivate.

Definition at line 5293 of file qdom.cpp.

5294 {
5295  QDomNodePrivate* p = new QDomTextPrivate(this, deep);
5296  // We are not interested in this node
5297  p->ref.deref();
5298  return p;
5299 }
QAtomicInt ref
Definition: qdom.cpp:191
bool deref()
Atomically decrements the value of this QAtomicInt.
QDomTextPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
Definition: qdom.cpp:5282

◆ isText()

virtual bool QDomTextPrivate::isText ( ) const
inlinevirtual

Reimplemented from QDomNodePrivate.

Definition at line 353 of file qdom.cpp.

353 { return true; }

◆ nodeType()

QDomNode::NodeType QDomTextPrivate::nodeType ( ) const
inlinevirtual

Reimplemented from QDomCharacterDataPrivate.

Reimplemented in QDomCDATASectionPrivate.

Definition at line 354 of file qdom.cpp.

354 { return QDomNode::TextNode; }

◆ save()

void QDomTextPrivate::save ( QTextStream s,
int  depth,
int  indent 
) const
virtual
Warning
This function is not part of the public interface. depth is used for indentation, it seems.

Reimplemented from QDomNodePrivate.

Reimplemented in QDomCDATASectionPrivate.

Definition at line 5316 of file qdom.cpp.

5317 {
5318  QDomTextPrivate *that = const_cast<QDomTextPrivate*>(this);
5319  s << encodeText(value, s, !(that->parent() && that->parent()->isElement()), false, true);
5320 }
QDomNodePrivate * parent() const
Definition: qdom.cpp:161
virtual bool isElement() const
Definition: qdom.cpp:175
QString value
Definition: qdom.cpp:199
static QString encodeText(const QString &str, QTextStream &s, const bool encodeQuotes=true, const bool performAVN=false, const bool encodeEOLs=false)
Definition: qdom.cpp:4245

◆ splitText()

QDomTextPrivate * QDomTextPrivate::splitText ( int  offset)

Definition at line 5301 of file qdom.cpp.

5302 {
5303  if (!parent()) {
5304  qWarning("QDomText::splitText The node has no parent. So I can not split");
5305  return 0;
5306  }
5307 
5308  QDomTextPrivate* t = new QDomTextPrivate(ownerDocument(), 0, value.mid(offset));
5309  value.truncate(offset);
5310 
5311  parent()->insertAfter(t, this);
5312 
5313  return t;
5314 }
QDomNodePrivate * parent() const
Definition: qdom.cpp:161
virtual QDomNodePrivate * insertAfter(QDomNodePrivate *newChild, QDomNodePrivate *refChild)
Definition: qdom.cpp:1661
QDomDocumentPrivate * ownerDocument()
Definition: qdom.cpp:1893
void truncate(int pos)
Truncates the string at the given position index.
Definition: qstring.cpp:4603
QString value
Definition: qdom.cpp:199
Q_CORE_EXPORT void qWarning(const char *,...)
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Definition: qstring.cpp:3706
QDomTextPrivate(QDomDocumentPrivate *, QDomNodePrivate *parent, const QString &val)
Definition: qdom.cpp:5282

The documentation for this class was generated from the following file: