Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qplacesupplier.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qplacesupplier.h"
5#include "qplacesupplier_p.h"
6
8
10
12{
13 return (
14 this->name == other.name
15 && this->supplierId == other.supplierId
16 && this->url == other.url
17 && this->icon == other.icon
18 );
19}
20
22{
23 return (name.isEmpty()
25 && url.isEmpty()
26 && icon.isEmpty()
27 );
28}
29
81
85QPlaceSupplier::QPlaceSupplier(const QPlaceSupplier &other) noexcept = default;
86
91
97{
98 if (this == &other)
99 return *this;
100
101 d = other.d;
102 return *this;
103}
104
117bool QPlaceSupplier::isEqual(const QPlaceSupplier &other) const noexcept
118{
119 return (*(d.constData()) == *(other.d.constData()));
120}
121
142{
143 return d->name;
144}
145
150{
151 d->name = name;
152}
153
170{
171 return d->supplierId;
172}
173
178{
179 d->supplierId = identifier;
180}
181
193{
194 return d->url;
195}
196
201{
202 d->url = url;
203}
204
216{
217 return d->icon;
218}
219
224{
225 d->icon = icon;
226}
227
232{
233 return d->isEmpty();
234}
235
236#include "moc_qplacesupplier.cpp"
\inmodule QtLocation
Definition qplaceicon.h:23
bool isEmpty() const
Returns a boolean indicating whether the all the fields of the icon are empty or not.
\inmodule QtLocation
QUrl url
\qmlproperty url Supplier::url
void setUrl(const QUrl &data)
Sets the url of the supplier's website.
QPlaceSupplier()
\qmlvaluetype supplier \inqmlmodule QtLocation
~QPlaceSupplier()
Destroys the supplier object.
QML_STRUCTURED_VALUEQString name
\qmlproperty string Supplier::name
void setName(const QString &data)
Sets the name of the supplier.
QPlaceSupplier & operator=(const QPlaceSupplier &other) noexcept
Assigns other to this supplier and returns a reference to this supplier.
QPlaceIcon icon
\qmlproperty PlaceIcon Supplier::icon
bool isEmpty() const
Returns true if all fields of the place supplier are 0; otherwise returns false.
void setIcon(const QPlaceIcon &icon)
Sets the icon of the supplier.
void setSupplierId(const QString &identifier)
Sets the identifier of the supplier.
QString supplierId
\qmlproperty string Supplier::supplierId
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
\inmodule QtCore
Definition qurl.h:94
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
Definition qurl.cpp:1896
#define this
Definition dialogs.cpp:9
GLuint name
#define QT_DEFINE_QSDP_SPECIALIZATION_DTOR(Class)
QUrl url("example.com")
[constructor-url-reference]
QSharedPointer< T > other(t)
[5]