KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class QXmlStreamWriter

Notation used in Ruby API documentation

Module: QtCore

Description: Binding of QXmlStreamWriter

Public constructors

new QXmlStreamWriternewConstructor QXmlStreamWriter::QXmlStreamWriter()
new QXmlStreamWriternew(QIODevice ptr device)Constructor QXmlStreamWriter::QXmlStreamWriter(QIODevice *device)
new QXmlStreamWriternew(bytes ptr array)Constructor QXmlStreamWriter::QXmlStreamWriter(QByteArray *array)
new QXmlStreamWriternew(string ptr string)Constructor QXmlStreamWriter::QXmlStreamWriter(QString *string)

Public methods

[const]QXmlStreamWriter ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]boolautoFormattingMethod bool QXmlStreamWriter::autoFormatting()
voidautoFormatting=(bool arg1)Method void QXmlStreamWriter::setAutoFormatting(bool)
[const]intautoFormattingIndentMethod int QXmlStreamWriter::autoFormattingIndent()
voidautoFormattingIndent=(int spacesOrTabs)Method void QXmlStreamWriter::setAutoFormattingIndent(int spacesOrTabs)
[const]QTextCodec ptrcodecMethod QTextCodec *QXmlStreamWriter::codec()
voidcodec=(QTextCodec ptr codec)Method void QXmlStreamWriter::setCodec(QTextCodec *codec)
voidcodec=(string codecName)Method void QXmlStreamWriter::setCodec(const char *codecName)
[const]QIODevice ptrdeviceMethod QIODevice *QXmlStreamWriter::device()
voiddevice=(QIODevice ptr device)Method void QXmlStreamWriter::setDevice(QIODevice *device)
[const]boolhasErrorMethod bool QXmlStreamWriter::hasError()
voidsetAutoFormatting(bool arg1)Method void QXmlStreamWriter::setAutoFormatting(bool)
voidsetAutoFormattingIndent(int spacesOrTabs)Method void QXmlStreamWriter::setAutoFormattingIndent(int spacesOrTabs)
voidsetCodec(QTextCodec ptr codec)Method void QXmlStreamWriter::setCodec(QTextCodec *codec)
voidsetCodec(string codecName)Method void QXmlStreamWriter::setCodec(const char *codecName)
voidsetDevice(QIODevice ptr device)Method void QXmlStreamWriter::setDevice(QIODevice *device)
voidwriteAttribute(string qualifiedName,
string value)
Method void QXmlStreamWriter::writeAttribute(const QString &qualifiedName, const QString &value)
voidwriteAttribute(string namespaceUri,
string name,
string value)
Method void QXmlStreamWriter::writeAttribute(const QString &namespaceUri, const QString &name, const QString &value)
voidwriteAttribute(const QXmlStreamAttribute attribute)Method void QXmlStreamWriter::writeAttribute(const QXmlStreamAttribute &attribute)
voidwriteAttributes(const QXmlStreamAttributes attributes)Method void QXmlStreamWriter::writeAttributes(const QXmlStreamAttributes &attributes)
voidwriteCDATA(string text)Method void QXmlStreamWriter::writeCDATA(const QString &text)
voidwriteCharacters(string text)Method void QXmlStreamWriter::writeCharacters(const QString &text)
voidwriteComment(string text)Method void QXmlStreamWriter::writeComment(const QString &text)
voidwriteCurrentToken(const QXmlStreamReader reader)Method void QXmlStreamWriter::writeCurrentToken(const QXmlStreamReader &reader)
voidwriteDTD(string dtd)Method void QXmlStreamWriter::writeDTD(const QString &dtd)
voidwriteDefaultNamespace(string namespaceUri)Method void QXmlStreamWriter::writeDefaultNamespace(const QString &namespaceUri)
voidwriteEmptyElement(string qualifiedName)Method void QXmlStreamWriter::writeEmptyElement(const QString &qualifiedName)
voidwriteEmptyElement(string namespaceUri,
string name)
Method void QXmlStreamWriter::writeEmptyElement(const QString &namespaceUri, const QString &name)
voidwriteEndDocumentMethod void QXmlStreamWriter::writeEndDocument()
voidwriteEndElementMethod void QXmlStreamWriter::writeEndElement()
voidwriteEntityReference(string name)Method void QXmlStreamWriter::writeEntityReference(const QString &name)
voidwriteNamespace(string namespaceUri,
string prefix = QString())
Method void QXmlStreamWriter::writeNamespace(const QString &namespaceUri, const QString &prefix)
voidwriteProcessingInstruction(string target,
string data = QString())
Method void QXmlStreamWriter::writeProcessingInstruction(const QString &target, const QString &data)
voidwriteStartDocumentMethod void QXmlStreamWriter::writeStartDocument()
voidwriteStartDocument(string version)Method void QXmlStreamWriter::writeStartDocument(const QString &version)
voidwriteStartDocument(string version,
bool standalone)
Method void QXmlStreamWriter::writeStartDocument(const QString &version, bool standalone)
voidwriteStartElement(string qualifiedName)Method void QXmlStreamWriter::writeStartElement(const QString &qualifiedName)
voidwriteStartElement(string namespaceUri,
string name)
Method void QXmlStreamWriter::writeStartElement(const QString &namespaceUri, const QString &name)
voidwriteTextElement(string qualifiedName,
string text)
Method void QXmlStreamWriter::writeTextElement(const QString &qualifiedName, const QString &text)
voidwriteTextElement(string namespaceUri,
string name,
string text)
Method void QXmlStreamWriter::writeTextElement(const QString &namespaceUri, const QString &name, const QString &text)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

_const_cast

Signature: [const] QXmlStreamWriter ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

autoFormatting

Signature: [const] bool autoFormatting

Description: Method bool QXmlStreamWriter::autoFormatting()

Python specific notes:
The object exposes a readable attribute 'autoFormatting'. This is the getter.

autoFormatting=

Signature: void autoFormatting= (bool arg1)

Description: Method void QXmlStreamWriter::setAutoFormatting(bool)

Python specific notes:
The object exposes a writable attribute 'autoFormatting'. This is the setter.

autoFormattingIndent

Signature: [const] int autoFormattingIndent

Description: Method int QXmlStreamWriter::autoFormattingIndent()

Python specific notes:
The object exposes a readable attribute 'autoFormattingIndent'. This is the getter.

autoFormattingIndent=

Signature: void autoFormattingIndent= (int spacesOrTabs)

Description: Method void QXmlStreamWriter::setAutoFormattingIndent(int spacesOrTabs)

Python specific notes:
The object exposes a writable attribute 'autoFormattingIndent'. This is the setter.

codec

Signature: [const] QTextCodec ptr codec

Description: Method QTextCodec *QXmlStreamWriter::codec()

Python specific notes:
The object exposes a readable attribute 'codec'. This is the getter.

codec=

(1) Signature: void codec= (QTextCodec ptr codec)

Description: Method void QXmlStreamWriter::setCodec(QTextCodec *codec)

Python specific notes:
The object exposes a writable attribute 'codec'. This is the setter.

(2) Signature: void codec= (string codecName)

Description: Method void QXmlStreamWriter::setCodec(const char *codecName)

Python specific notes:
The object exposes a writable attribute 'codec'. This is the setter.

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

device

Signature: [const] QIODevice ptr device

Description: Method QIODevice *QXmlStreamWriter::device()

Python specific notes:
The object exposes a readable attribute 'device'. This is the getter.

device=

Signature: void device= (QIODevice ptr device)

Description: Method void QXmlStreamWriter::setDevice(QIODevice *device)

Python specific notes:
The object exposes a writable attribute 'device'. This is the setter.

hasError

Signature: [const] bool hasError

Description: Method bool QXmlStreamWriter::hasError()

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

new

(1) Signature: [static] new QXmlStreamWriter new

Description: Constructor QXmlStreamWriter::QXmlStreamWriter()

This method creates an object of class QXmlStreamWriter.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QXmlStreamWriter new (QIODevice ptr device)

Description: Constructor QXmlStreamWriter::QXmlStreamWriter(QIODevice *device)

This method creates an object of class QXmlStreamWriter.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QXmlStreamWriter new (bytes ptr array)

Description: Constructor QXmlStreamWriter::QXmlStreamWriter(QByteArray *array)

This method creates an object of class QXmlStreamWriter.

Python specific notes:
This method is the default initializer of the object.

(4) Signature: [static] new QXmlStreamWriter new (string ptr string)

Description: Constructor QXmlStreamWriter::QXmlStreamWriter(QString *string)

This method creates an object of class QXmlStreamWriter.

Python specific notes:
This method is the default initializer of the object.

setAutoFormatting

Signature: void setAutoFormatting (bool arg1)

Description: Method void QXmlStreamWriter::setAutoFormatting(bool)

Python specific notes:
The object exposes a writable attribute 'autoFormatting'. This is the setter.

setAutoFormattingIndent

Signature: void setAutoFormattingIndent (int spacesOrTabs)

Description: Method void QXmlStreamWriter::setAutoFormattingIndent(int spacesOrTabs)

Python specific notes:
The object exposes a writable attribute 'autoFormattingIndent'. This is the setter.

setCodec

(1) Signature: void setCodec (QTextCodec ptr codec)

Description: Method void QXmlStreamWriter::setCodec(QTextCodec *codec)

Python specific notes:
The object exposes a writable attribute 'codec'. This is the setter.

(2) Signature: void setCodec (string codecName)

Description: Method void QXmlStreamWriter::setCodec(const char *codecName)

Python specific notes:
The object exposes a writable attribute 'codec'. This is the setter.

setDevice

Signature: void setDevice (QIODevice ptr device)

Description: Method void QXmlStreamWriter::setDevice(QIODevice *device)

Python specific notes:
The object exposes a writable attribute 'device'. This is the setter.

writeAttribute

(1) Signature: void writeAttribute (string qualifiedName, string value)

Description: Method void QXmlStreamWriter::writeAttribute(const QString &qualifiedName, const QString &value)

(2) Signature: void writeAttribute (string namespaceUri, string name, string value)

Description: Method void QXmlStreamWriter::writeAttribute(const QString &namespaceUri, const QString &name, const QString &value)

(3) Signature: void writeAttribute (const QXmlStreamAttribute attribute)

Description: Method void QXmlStreamWriter::writeAttribute(const QXmlStreamAttribute &attribute)

writeAttributes

Signature: void writeAttributes (const QXmlStreamAttributes attributes)

Description: Method void QXmlStreamWriter::writeAttributes(const QXmlStreamAttributes &attributes)

writeCDATA

Signature: void writeCDATA (string text)

Description: Method void QXmlStreamWriter::writeCDATA(const QString &text)

writeCharacters

Signature: void writeCharacters (string text)

Description: Method void QXmlStreamWriter::writeCharacters(const QString &text)

writeComment

Signature: void writeComment (string text)

Description: Method void QXmlStreamWriter::writeComment(const QString &text)

writeCurrentToken

Signature: void writeCurrentToken (const QXmlStreamReader reader)

Description: Method void QXmlStreamWriter::writeCurrentToken(const QXmlStreamReader &reader)

writeDTD

Signature: void writeDTD (string dtd)

Description: Method void QXmlStreamWriter::writeDTD(const QString &dtd)

writeDefaultNamespace

Signature: void writeDefaultNamespace (string namespaceUri)

Description: Method void QXmlStreamWriter::writeDefaultNamespace(const QString &namespaceUri)

writeEmptyElement

(1) Signature: void writeEmptyElement (string qualifiedName)

Description: Method void QXmlStreamWriter::writeEmptyElement(const QString &qualifiedName)

(2) Signature: void writeEmptyElement (string namespaceUri, string name)

Description: Method void QXmlStreamWriter::writeEmptyElement(const QString &namespaceUri, const QString &name)

writeEndDocument

Signature: void writeEndDocument

Description: Method void QXmlStreamWriter::writeEndDocument()

writeEndElement

Signature: void writeEndElement

Description: Method void QXmlStreamWriter::writeEndElement()

writeEntityReference

Signature: void writeEntityReference (string name)

Description: Method void QXmlStreamWriter::writeEntityReference(const QString &name)

writeNamespace

Signature: void writeNamespace (string namespaceUri, string prefix = QString())

Description: Method void QXmlStreamWriter::writeNamespace(const QString &namespaceUri, const QString &prefix)

writeProcessingInstruction

Signature: void writeProcessingInstruction (string target, string data = QString())

Description: Method void QXmlStreamWriter::writeProcessingInstruction(const QString &target, const QString &data)

writeStartDocument

(1) Signature: void writeStartDocument

Description: Method void QXmlStreamWriter::writeStartDocument()

(2) Signature: void writeStartDocument (string version)

Description: Method void QXmlStreamWriter::writeStartDocument(const QString &version)

(3) Signature: void writeStartDocument (string version, bool standalone)

Description: Method void QXmlStreamWriter::writeStartDocument(const QString &version, bool standalone)

writeStartElement

(1) Signature: void writeStartElement (string qualifiedName)

Description: Method void QXmlStreamWriter::writeStartElement(const QString &qualifiedName)

(2) Signature: void writeStartElement (string namespaceUri, string name)

Description: Method void QXmlStreamWriter::writeStartElement(const QString &namespaceUri, const QString &name)

writeTextElement

(1) Signature: void writeTextElement (string qualifiedName, string text)

Description: Method void QXmlStreamWriter::writeTextElement(const QString &qualifiedName, const QString &text)

(2) Signature: void writeTextElement (string namespaceUri, string name, string text)

Description: Method void QXmlStreamWriter::writeTextElement(const QString &namespaceUri, const QString &name, const QString &text)