Struct qt_core::QXmlStreamAttribute
source · #[repr(C)]pub struct QXmlStreamAttribute { /* private fields */ }
Expand description
The QXmlStreamAttribute class represents a single XML attribute
C++ class: QXmlStreamAttribute
.
The QXmlStreamAttribute class represents a single XML attribute
An attribute consists of an optionally empty namespaceUri(), a name(), a value(), and an isDefault() attribute.
The raw XML attribute name is returned as qualifiedName().
Implementations§
source§impl QXmlStreamAttribute
impl QXmlStreamAttribute
sourcepub unsafe fn copy_from(
&self,
arg1: impl CastInto<Ref<QXmlStreamAttribute>>
) -> Ref<QXmlStreamAttribute>
pub unsafe fn copy_from( &self, arg1: impl CastInto<Ref<QXmlStreamAttribute>> ) -> Ref<QXmlStreamAttribute>
Assigns other to this attribute.
Calls C++ function: QXmlStreamAttribute& QXmlStreamAttribute::operator=(const QXmlStreamAttribute& arg1)
.
Assigns other to this attribute.
sourcepub unsafe fn is_default(&self) -> bool
pub unsafe fn is_default(&self) -> bool
Returns true
if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns false
.
Calls C++ function: bool QXmlStreamAttribute::isDefault() const
.
Returns true
if the parser added this attribute with a default value following an ATTLIST declaration in the DTD; otherwise returns false
.
sourcepub unsafe fn name(&self) -> CppBox<QStringRef>
pub unsafe fn name(&self) -> CppBox<QStringRef>
Returns the attribute's local name.
Calls C++ function: QStringRef QXmlStreamAttribute::name() const
.
Returns the attribute’s local name.
sourcepub unsafe fn namespace_uri(&self) -> CppBox<QStringRef>
pub unsafe fn namespace_uri(&self) -> CppBox<QStringRef>
Returns the attribute's resolved namespaceUri, or an empty string reference if the attribute does not have a defined namespace.
Calls C++ function: QStringRef QXmlStreamAttribute::namespaceUri() const
.
Returns the attribute’s resolved namespaceUri, or an empty string reference if the attribute does not have a defined namespace.
sourcepub unsafe fn new_0a() -> CppBox<QXmlStreamAttribute>
pub unsafe fn new_0a() -> CppBox<QXmlStreamAttribute>
Creates an empty attribute.
Calls C++ function: [constructor] void QXmlStreamAttribute::QXmlStreamAttribute()
.
Creates an empty attribute.
sourcepub unsafe fn new_2a(
qualified_name: impl CastInto<Ref<QString>>,
value: impl CastInto<Ref<QString>>
) -> CppBox<QXmlStreamAttribute>
pub unsafe fn new_2a( qualified_name: impl CastInto<Ref<QString>>, value: impl CastInto<Ref<QString>> ) -> CppBox<QXmlStreamAttribute>
Constructs an attribute with qualified name qualifiedName and value value.
Calls C++ function: [constructor] void QXmlStreamAttribute::QXmlStreamAttribute(const QString& qualifiedName, const QString& value)
.
Constructs an attribute with qualified name qualifiedName and value value.
sourcepub unsafe fn new_3a(
namespace_uri: impl CastInto<Ref<QString>>,
name: impl CastInto<Ref<QString>>,
value: impl CastInto<Ref<QString>>
) -> CppBox<QXmlStreamAttribute>
pub unsafe fn new_3a( namespace_uri: impl CastInto<Ref<QString>>, name: impl CastInto<Ref<QString>>, value: impl CastInto<Ref<QString>> ) -> CppBox<QXmlStreamAttribute>
Constructs an attribute in the namespace described with namespaceUri with name and value value.
Calls C++ function: [constructor] void QXmlStreamAttribute::QXmlStreamAttribute(const QString& namespaceUri, const QString& name, const QString& value)
.
Constructs an attribute in the namespace described with namespaceUri with name and value value.
sourcepub unsafe fn new_copy(
arg1: impl CastInto<Ref<QXmlStreamAttribute>>
) -> CppBox<QXmlStreamAttribute>
pub unsafe fn new_copy( arg1: impl CastInto<Ref<QXmlStreamAttribute>> ) -> CppBox<QXmlStreamAttribute>
Creates a copy of other.
Calls C++ function: [constructor] void QXmlStreamAttribute::QXmlStreamAttribute(const QXmlStreamAttribute& arg1)
.
Creates a copy of other.
sourcepub unsafe fn prefix(&self) -> CppBox<QStringRef>
pub unsafe fn prefix(&self) -> CppBox<QStringRef>
Returns the attribute's namespace prefix.
Calls C++ function: QStringRef QXmlStreamAttribute::prefix() const
.
Returns the attribute’s namespace prefix.
This function was introduced in Qt 4.4.
See also name() and qualifiedName().
sourcepub unsafe fn qualified_name(&self) -> CppBox<QStringRef>
pub unsafe fn qualified_name(&self) -> CppBox<QStringRef>
Returns the attribute's qualified name.
Calls C++ function: QStringRef QXmlStreamAttribute::qualifiedName() const
.
Returns the attribute’s qualified name.
A qualified name is the raw name of an attribute in the XML data. It consists of the namespace prefix(), followed by colon, followed by the attribute's local name(). Since the namespace prefix is not unique (the same prefix can point to different namespaces and different prefixes can point to the same namespace), you shouldn't use qualifiedName(), but the resolved namespaceUri() and the attribute's local name().
sourcepub unsafe fn value(&self) -> CppBox<QStringRef>
pub unsafe fn value(&self) -> CppBox<QStringRef>
Returns the attribute's value.
Calls C++ function: QStringRef QXmlStreamAttribute::value() const
.
Returns the attribute’s value.
Trait Implementations§
source§impl CppDeletable for QXmlStreamAttribute
impl CppDeletable for QXmlStreamAttribute
source§impl PartialEq<Ref<QXmlStreamAttribute>> for QXmlStreamAttribute
impl PartialEq<Ref<QXmlStreamAttribute>> for QXmlStreamAttribute
source§fn eq(&self, other: &Ref<QXmlStreamAttribute>) -> bool
fn eq(&self, other: &Ref<QXmlStreamAttribute>) -> bool
Compares this attribute with other and returns true
if they are equal; otherwise returns false
.
Calls C++ function: bool QXmlStreamAttribute::operator==(const QXmlStreamAttribute& other) const
.
Compares this attribute with other and returns true
if they are equal; otherwise returns false
.