![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtLocation More...
#include <qplaceicon.h>
Public Member Functions | |
QPlaceIcon () | |
Constructs an icon. | |
QPlaceIcon (const QPlaceIcon &other) noexcept | |
Constructs a copy of other. | |
QPlaceIcon (QPlaceIcon &&other) noexcept=default | |
~QPlaceIcon () | |
Destroys the icon. | |
QPlaceIcon & | operator= (const QPlaceIcon &other) noexcept |
Assigns other to this icon and returns a reference to this icon. | |
void | swap (QPlaceIcon &other) noexcept |
Q_INVOKABLE QUrl | url (const QSize &size=QSize()) const |
Returns an icon URL according to the given size. | |
QPlaceManager * | manager () const |
Returns the manager that this icon is associated with. | |
void | setManager (QPlaceManager *manager) |
Sets the manager that this icon is associated with. | |
QVariantMap | parameters () const |
Returns a set of parameters for the icon that are manager/plugin specific. | |
void | setParameters (const QVariantMap ¶meters) |
Sets the parameters of the icon to parameters. | |
bool | isEmpty () const |
Returns a boolean indicating whether the all the fields of the icon are empty or not. | |
Static Public Attributes | |
static const QString | SingleUrl |
\qmlvaluetype icon \inqmlmodule QtLocation | |
Properties | |
QML_STRUCTURED_VALUEQVariantMap | parameters |
QPlaceManager * | manager |
Friends | |
bool | operator== (const QPlaceIcon &lhs, const QPlaceIcon &rhs) noexcept |
Returns true if lhs is equal to rhs, otherwise returns false. | |
bool | operator!= (const QPlaceIcon &lhs, const QPlaceIcon &rhs) noexcept |
Returns true if lhs is not equal to rhs, otherwise returns false. | |
\inmodule QtLocation
The QPlaceIcon class represents an icon.
The typical usage of an icon is to use the url() function to specify a preferred icon size.
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 \l {Qt Location#Plugin References and Parameters}{plugin} 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.
Definition at line 22 of file qplaceicon.h.
QPlaceIcon::QPlaceIcon | ( | ) |
Constructs an icon.
Definition at line 88 of file qplaceicon.cpp.
|
defaultnoexcept |
Constructs a copy of other.
|
defaultnoexcept |
|
default |
Destroys the icon.
bool QPlaceIcon::isEmpty | ( | ) | const |
Returns a boolean indicating whether the all the fields of the icon are empty or not.
Definition at line 204 of file qplaceicon.cpp.
QPlaceManager * QPlaceIcon::manager | ( | ) | const |
Returns the manager that this icon is associated with.
Definition at line 187 of file qplaceicon.cpp.
|
noexcept |
Assigns other to this icon and returns a reference to this icon.
Definition at line 106 of file qplaceicon.cpp.
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 \l {Qt Location#Plugin References and Parameters}{plugin documentation} for what parameters are supported and how they should be used.
Definition at line 171 of file qplaceicon.cpp.
void QPlaceIcon::setManager | ( | QPlaceManager * | manager | ) |
Sets the manager that this icon is associated with.
The icon does not take ownership of the pointer.
Definition at line 196 of file qplaceicon.cpp.
void QPlaceIcon::setParameters | ( | const QVariantMap & | parameters | ) |
Sets the parameters of the icon to parameters.
Definition at line 179 of file qplaceicon.cpp.
|
inlinenoexcept |
Definition at line 42 of file qplaceicon.h.
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.
Definition at line 144 of file qplaceicon.cpp.
|
friend |
Returns true if lhs is not equal to rhs, otherwise returns false.
Definition at line 46 of file qplaceicon.h.
|
friend |
Returns true if lhs is equal to rhs, otherwise returns false.
Definition at line 44 of file qplaceicon.h.
|
static |
\qmlvaluetype icon \inqmlmodule QtLocation
The icon type represents the icon of a place.
The typical usage of an icon is to use the url() function to specify a preferred icon size.
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 \l {Qt Location#Plugin References and Parameters}{plugin} 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.
\variable QPlaceIcon::SingleUrl
Parameter key for an icon that only has a single image URL.
The parameter value to be used with this key is a QUrl. An icon with this parameter set will always return the specified URL regardless of the requested size when url() is called.
Definition at line 32 of file qplaceicon.h.
|
readwrite |
Definition at line 29 of file qplaceicon.h.
|
readwrite |
Definition at line 28 of file qplaceicon.h.