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

API reference - Class QDomElement

Notation used in Ruby API documentation

Module: QtXml

Description: Binding of QDomElement

Class hierarchy: QDomElement » QDomNode

Public constructors

new QDomElementnewConstructor QDomElement::QDomElement()
new QDomElementnew(const QDomElement x)Constructor QDomElement::QDomElement(const QDomElement &x)

Public methods

void_assign(const QDomElement other)Assigns another object to self
[const]QDomElement 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.
QDomElementassign(const QDomElement arg1)Method QDomElement &QDomElement::operator=(const QDomElement &)
[const]stringattribute(string name,
string defValue = QString())
Method QString QDomElement::attribute(const QString &name, const QString &defValue)
[const]stringattributeNS(string nsURI,
string localName,
string defValue = QString())
Method QString QDomElement::attributeNS(const QString nsURI, const QString &localName, const QString &defValue)
voidattributeNS_d=(string nsURI,
string qName,
double value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, double value)
voidattributeNS_i=(string nsURI,
string qName,
int value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, int value)
voidattributeNS_ll=(string nsURI,
string qName,
long long value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qlonglong value)
voidattributeNS_ui=(string nsURI,
string qName,
unsigned int value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, unsigned int value)
voidattributeNS_ull=(string nsURI,
string qName,
unsigned long long value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qulonglong value)
QDomAttrattributeNode(string name)Method QDomAttr QDomElement::attributeNode(const QString &name)
QDomAttrattributeNodeNS(string nsURI,
string localName)
Method QDomAttr QDomElement::attributeNodeNS(const QString &nsURI, const QString &localName)
voidattribute_d=(string name,
double value)
Method void QDomElement::setAttribute(const QString &name, double value)
voidattribute_f=(string name,
float value)
Method void QDomElement::setAttribute(const QString &name, float value)
voidattribute_i=(string name,
int value)
Method void QDomElement::setAttribute(const QString &name, int value)
voidattribute_ll=(string name,
long long value)
Method void QDomElement::setAttribute(const QString &name, qlonglong value)
voidattribute_ui=(string name,
unsigned int value)
Method void QDomElement::setAttribute(const QString &name, unsigned int value)
voidattribute_ull=(string name,
unsigned long long value)
Method void QDomElement::setAttribute(const QString &name, qulonglong value)
[const]QDomNamedNodeMapattributesMethod QDomNamedNodeMap QDomElement::attributes()
[const]new QDomElement ptrdupCreates a copy of self
[const]QDomNodeListelementsByTagName(string tagname)Method QDomNodeList QDomElement::elementsByTagName(const QString &tagname)
[const]QDomNodeListelementsByTagNameNS(string nsURI,
string localName)
Method QDomNodeList QDomElement::elementsByTagNameNS(const QString &nsURI, const QString &localName)
[const]boolhasAttribute(string name)Method bool QDomElement::hasAttribute(const QString &name)
[const]boolhasAttributeNS(string nsURI,
string localName)
Method bool QDomElement::hasAttributeNS(const QString &nsURI, const QString &localName)
[const]QDomNode_NodeTypenodeTypeMethod QDomNode::NodeType QDomElement::nodeType()
voidremoveAttribute(string name)Method void QDomElement::removeAttribute(const QString &name)
voidremoveAttributeNS(string nsURI,
string localName)
Method void QDomElement::removeAttributeNS(const QString &nsURI, const QString &localName)
QDomAttrremoveAttributeNode(const QDomAttr oldAttr)Method QDomAttr QDomElement::removeAttributeNode(const QDomAttr &oldAttr)
voidsetAttribute(string name,
string value)
Method void QDomElement::setAttribute(const QString &name, const QString &value)
voidsetAttributeNS(string nsURI,
string qName,
string value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, const QString &value)
voidsetAttributeNS_d(string nsURI,
string qName,
double value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, double value)
voidsetAttributeNS_i(string nsURI,
string qName,
int value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, int value)
voidsetAttributeNS_ll(string nsURI,
string qName,
long long value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qlonglong value)
voidsetAttributeNS_ui(string nsURI,
string qName,
unsigned int value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, unsigned int value)
voidsetAttributeNS_ull(string nsURI,
string qName,
unsigned long long value)
Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qulonglong value)
QDomAttrsetAttributeNode(const QDomAttr newAttr)Method QDomAttr QDomElement::setAttributeNode(const QDomAttr &newAttr)
QDomAttrsetAttributeNodeNS(const QDomAttr newAttr)Method QDomAttr QDomElement::setAttributeNodeNS(const QDomAttr &newAttr)
voidsetAttribute_d(string name,
double value)
Method void QDomElement::setAttribute(const QString &name, double value)
voidsetAttribute_f(string name,
float value)
Method void QDomElement::setAttribute(const QString &name, float value)
voidsetAttribute_i(string name,
int value)
Method void QDomElement::setAttribute(const QString &name, int value)
voidsetAttribute_ll(string name,
long long value)
Method void QDomElement::setAttribute(const QString &name, qlonglong value)
voidsetAttribute_ui(string name,
unsigned int value)
Method void QDomElement::setAttribute(const QString &name, unsigned int value)
voidsetAttribute_ull(string name,
unsigned long long value)
Method void QDomElement::setAttribute(const QString &name, qulonglong value)
voidsetTagName(string name)Method void QDomElement::setTagName(const QString &name)
[const]stringtagNameMethod QString QDomElement::tagName()
voidtagName=(string name)Method void QDomElement::setTagName(const QString &name)
[const]stringtextMethod QString QDomElement::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

_assign

Signature: void _assign (const QDomElement other)

Description: Assigns another object to self

_const_cast

Signature: [const] QDomElement 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.

assign

Signature: QDomElement assign (const QDomElement arg1)

Description: Method QDomElement &QDomElement::operator=(const QDomElement &)

attribute

Signature: [const] string attribute (string name, string defValue = QString())

Description: Method QString QDomElement::attribute(const QString &name, const QString &defValue)

attributeNS

Signature: [const] string attributeNS (string nsURI, string localName, string defValue = QString())

Description: Method QString QDomElement::attributeNS(const QString nsURI, const QString &localName, const QString &defValue)

attributeNS_d=

Signature: void attributeNS_d= (string nsURI, string qName, double value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, double value)

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

attributeNS_i=

Signature: void attributeNS_i= (string nsURI, string qName, int value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, int value)

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

attributeNS_ll=

Signature: void attributeNS_ll= (string nsURI, string qName, long long value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qlonglong value)

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

attributeNS_ui=

Signature: void attributeNS_ui= (string nsURI, string qName, unsigned int value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, unsigned int value)

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

attributeNS_ull=

Signature: void attributeNS_ull= (string nsURI, string qName, unsigned long long value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qulonglong value)

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

attributeNode

Signature: QDomAttr attributeNode (string name)

Description: Method QDomAttr QDomElement::attributeNode(const QString &name)

attributeNodeNS

Signature: QDomAttr attributeNodeNS (string nsURI, string localName)

Description: Method QDomAttr QDomElement::attributeNodeNS(const QString &nsURI, const QString &localName)

attribute_d=

Signature: void attribute_d= (string name, double value)

Description: Method void QDomElement::setAttribute(const QString &name, double value)

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

attribute_f=

Signature: void attribute_f= (string name, float value)

Description: Method void QDomElement::setAttribute(const QString &name, float value)

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

attribute_i=

Signature: void attribute_i= (string name, int value)

Description: Method void QDomElement::setAttribute(const QString &name, int value)

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

attribute_ll=

Signature: void attribute_ll= (string name, long long value)

Description: Method void QDomElement::setAttribute(const QString &name, qlonglong value)

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

attribute_ui=

Signature: void attribute_ui= (string name, unsigned int value)

Description: Method void QDomElement::setAttribute(const QString &name, unsigned int value)

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

attribute_ull=

Signature: void attribute_ull= (string name, unsigned long long value)

Description: Method void QDomElement::setAttribute(const QString &name, qulonglong value)

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

attributes

Signature: [const] QDomNamedNodeMap attributes

Description: Method QDomNamedNodeMap QDomElement::attributes()

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.

dup

Signature: [const] new QDomElement ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

elementsByTagName

Signature: [const] QDomNodeList elementsByTagName (string tagname)

Description: Method QDomNodeList QDomElement::elementsByTagName(const QString &tagname)

elementsByTagNameNS

Signature: [const] QDomNodeList elementsByTagNameNS (string nsURI, string localName)

Description: Method QDomNodeList QDomElement::elementsByTagNameNS(const QString &nsURI, const QString &localName)

hasAttribute

Signature: [const] bool hasAttribute (string name)

Description: Method bool QDomElement::hasAttribute(const QString &name)

hasAttributeNS

Signature: [const] bool hasAttributeNS (string nsURI, string localName)

Description: Method bool QDomElement::hasAttributeNS(const QString &nsURI, const QString &localName)

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 QDomElement new

Description: Constructor QDomElement::QDomElement()

This method creates an object of class QDomElement.

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

(2) Signature: [static] new QDomElement new (const QDomElement x)

Description: Constructor QDomElement::QDomElement(const QDomElement &x)

This method creates an object of class QDomElement.

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

nodeType

Signature: [const] QDomNode_NodeType nodeType

Description: Method QDomNode::NodeType QDomElement::nodeType()

removeAttribute

Signature: void removeAttribute (string name)

Description: Method void QDomElement::removeAttribute(const QString &name)

removeAttributeNS

Signature: void removeAttributeNS (string nsURI, string localName)

Description: Method void QDomElement::removeAttributeNS(const QString &nsURI, const QString &localName)

removeAttributeNode

Signature: QDomAttr removeAttributeNode (const QDomAttr oldAttr)

Description: Method QDomAttr QDomElement::removeAttributeNode(const QDomAttr &oldAttr)

setAttribute

Signature: void setAttribute (string name, string value)

Description: Method void QDomElement::setAttribute(const QString &name, const QString &value)

setAttributeNS

Signature: void setAttributeNS (string nsURI, string qName, string value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, const QString &value)

setAttributeNS_d

Signature: void setAttributeNS_d (string nsURI, string qName, double value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, double value)

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

setAttributeNS_i

Signature: void setAttributeNS_i (string nsURI, string qName, int value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, int value)

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

setAttributeNS_ll

Signature: void setAttributeNS_ll (string nsURI, string qName, long long value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qlonglong value)

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

setAttributeNS_ui

Signature: void setAttributeNS_ui (string nsURI, string qName, unsigned int value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, unsigned int value)

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

setAttributeNS_ull

Signature: void setAttributeNS_ull (string nsURI, string qName, unsigned long long value)

Description: Method void QDomElement::setAttributeNS(const QString nsURI, const QString &qName, qulonglong value)

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

setAttributeNode

Signature: QDomAttr setAttributeNode (const QDomAttr newAttr)

Description: Method QDomAttr QDomElement::setAttributeNode(const QDomAttr &newAttr)

setAttributeNodeNS

Signature: QDomAttr setAttributeNodeNS (const QDomAttr newAttr)

Description: Method QDomAttr QDomElement::setAttributeNodeNS(const QDomAttr &newAttr)

setAttribute_d

Signature: void setAttribute_d (string name, double value)

Description: Method void QDomElement::setAttribute(const QString &name, double value)

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

setAttribute_f

Signature: void setAttribute_f (string name, float value)

Description: Method void QDomElement::setAttribute(const QString &name, float value)

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

setAttribute_i

Signature: void setAttribute_i (string name, int value)

Description: Method void QDomElement::setAttribute(const QString &name, int value)

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

setAttribute_ll

Signature: void setAttribute_ll (string name, long long value)

Description: Method void QDomElement::setAttribute(const QString &name, qlonglong value)

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

setAttribute_ui

Signature: void setAttribute_ui (string name, unsigned int value)

Description: Method void QDomElement::setAttribute(const QString &name, unsigned int value)

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

setAttribute_ull

Signature: void setAttribute_ull (string name, unsigned long long value)

Description: Method void QDomElement::setAttribute(const QString &name, qulonglong value)

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

setTagName

Signature: void setTagName (string name)

Description: Method void QDomElement::setTagName(const QString &name)

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

tagName

Signature: [const] string tagName

Description: Method QString QDomElement::tagName()

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

tagName=

Signature: void tagName= (string name)

Description: Method void QDomElement::setTagName(const QString &name)

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

text

Signature: [const] string text

Description: Method QString QDomElement::text()