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  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QPlaceIcon Class

The QPlaceIcon class represents an icon. More...

 #include <QPlaceIcon>

This class was introduced in Qt Location 5.0.

Public Functions

QPlaceIcon()
QPlaceIcon(const QPlaceIcon & other)
~QPlaceIcon()
bool isEmpty() const
QPlaceManager * manager() const
QVariantMap parameters() const
void setManager(QPlaceManager * manager)
void setParameters(const QVariantMap & parameters)
QUrl url(const QSize & size = QSize()) const
bool operator!=(const QPlaceIcon & other) const
QPlaceIcon & operator=(const QPlaceIcon & other)
bool operator==(const QPlaceIcon & other) const

Detailed Description

The QPlaceIcon class represents an icon.

Usage

The typical usage of an icon is to use the url() function to specify a preferred icon size.

 QUrl iconSourceUrl = place.icon().url(QSize(32,32));

 //A default icon may also be requested like so
 iconSourceUrl = place.icon().url();

The icons are typically backend dependent, if a manager backend does not support a given size, the URL of the icon that most closely matches those parameters is returned.

The icon class also has a key-value set of parameters. The precise key one needs to use depends on the plugin backend being used. These parameters influence which icon URL is returned by the manager and may also be used to specify icon URL locations when saving icons.

If there is only ever one image for an icon, then QPlaceIcon::SingleUrl can be used as a parameter key with a QUrl as the associated value. If this key is set, then the url() function will always return the specified URL and not defer to any manager.

Member Function Documentation

QPlaceIcon::QPlaceIcon()

Constructs an icon.

QPlaceIcon::QPlaceIcon(const QPlaceIcon & other)

Constructs a copy of other.

QPlaceIcon::~QPlaceIcon()

Destroys the icon.

bool QPlaceIcon::isEmpty() const

Returns a boolean indicating whether the all the fields of the icon are empty or not.

QPlaceManager * QPlaceIcon::manager() const

Returns the manager that this icon is associated with.

See also setManager().

QVariantMap QPlaceIcon::parameters() const

Returns a set of parameters for the icon that are manager/plugin specific. These parameters are used by the manager to return the appropriate URL when url() is called and to specify locations to save to when saving icons.

Consult the plugin documentation for what parameters are supported and how they should be used.

See also setParameters().

void QPlaceIcon::setManager(QPlaceManager * manager)

Sets the manager that this icon is associated with. The icon does not take ownership of the pointer.

See also manager().

void QPlaceIcon::setParameters(const QVariantMap & parameters)

Sets the parameters of the icon.

See also parameters().

QUrl QPlaceIcon::url(const QSize & size = QSize()) const

Returns an icon URL according to the given size.

If no manager has been assigned to the icon, and the parameters do not contain the QPlaceIcon::SingleUrl key, a default constructed QUrl is returned.

bool QPlaceIcon::operator!=(const QPlaceIcon & other) const

Returns true if other is not equal to this icon, otherwise returns false.

QPlaceIcon & QPlaceIcon::operator=(const QPlaceIcon & other)

Assigns other to this icon and returns a reference to this icon.

bool QPlaceIcon::operator==(const QPlaceIcon & other) const

Returns true if this icon is equal to other, otherwise returns false.

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 5.0-snapshot
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