Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Tous les espaces de nom  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QXmlStreamAttributes Class Reference
[QtCore module]

The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute. More...

 #include <QXmlStreamAttributes>

Inherits QVector<QXmlStreamAttribute>.

Note: All the functions in this class are reentrant.

This class was introduced in Qt 4.3.

Public Functions

  • void append ( const QString & namespaceUri, const QString & name, const QString & value )
  • void append ( const QXmlStreamAttribute & attribute )
  • void append ( const QString & qualifiedName, const QString & value )
  • QStringRef value ( const QString & namespaceUri, const QString & name ) const
  • QStringRef value ( const QString & namespaceUri, const QLatin1String & name ) const
  • QStringRef value ( const QLatin1String & namespaceUri, const QLatin1String & name ) const
  • QStringRef value ( const QString & qualifiedName ) const
  • QStringRef value ( const QLatin1String & qualifiedName ) const
  • 62 public functions inherited from QVector

Additional Inherited Members

  • 2 static public members inherited from QVector

Detailed Description

The QXmlStreamAttributes class represents a vector of QXmlStreamAttribute.

Attributes are returned by a QXmlStreamReader in attributes() when the reader reports a start element. The class can also be used with a QXmlStreamWriter as an argument to writeAttributes().

The convenience function value() loops over the vector and returns an attribute value for a given namespaceUri and an attribute's name.

New attributes can be added with append().


Member Function Documentation

void QXmlStreamAttributes::append ( const QString & namespaceUri, const QString & name, const QString & value )

Appends a new attribute with name in the namespace described with namespaceUri, and value value. The namespaceUri can be empty.

void QXmlStreamAttributes::append ( const QXmlStreamAttribute & attribute )

This is an overloaded member function, provided for convenience.

Appends the given attribute to the end of the vector.

See also QVector::append().

void QXmlStreamAttributes::append ( const QString & qualifiedName, const QString & value )

This is an overloaded member function, provided for convenience.

Appends a new attribute with qualified name qualifiedName and value value.

QStringRef QXmlStreamAttributes::value ( const QString & namespaceUri, const QString & name ) const

Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

QStringRef QXmlStreamAttributes::value ( const QString & namespaceUri, const QLatin1String & name ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

QStringRef QXmlStreamAttributes::value ( const QLatin1String & namespaceUri, const QLatin1String & name ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined. The namespaceUri can be empty.

QStringRef QXmlStreamAttributes::value ( const QString & qualifiedName ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. 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 qualified names, but a resolved namespaceUri and the attribute's local name.

QStringRef QXmlStreamAttributes::value ( const QLatin1String & qualifiedName ) const

This is an overloaded member function, provided for convenience.

Returns the value of the attribute with qualified name qualifiedName , or an empty string reference if the attribute is not defined. 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 qualified names, but a resolved namespaceUri and the attribute's local name.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 53
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Livre blanc de l'outillage de Qt Quick

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web