Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplaceidreply.cpp
Go to the documentation of this file.
1
// Copyright (C) 2015 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
// Qt-Security score:significant reason:default
4
5
#
include
"qplaceidreply.h"
6
#
include
"qplacereply_p.h"
7
8
QT_BEGIN_NAMESPACE
9
class
QPlaceIdReplyPrivate
:
public
QPlaceReplyPrivate
10
{
11
public
:
12
QPlaceIdReplyPrivate
(
QPlaceIdReply
::
OperationType
operationType
)
13
:
operationType
(
operationType
) {}
14
~
QPlaceIdReplyPrivate
() {}
15
QString
id
;
16
QPlaceIdReply
::
OperationType
operationType
;
17
};
18
19
QT_END_NAMESPACE
20
21
QT_USE_NAMESPACE
22
23
/*!
24
\class QPlaceIdReply
25
\inmodule QtLocation
26
\ingroup QtLocation-places
27
\ingroup QtLocation-places-replies
28
\since 5.6
29
30
\brief The QPlaceIdReply class manages operations which return an identifier such as
31
saving and removal operations of places and categories.
32
33
The QPlaceIdReply can be considered a multipurpose reply in that it can
34
be used to save places, save categories, remove places and remove categories.
35
In each case it returns an identifier of the place or category that was added, modified or removed.
36
37
See \l {Saving a place cpp}{Saving a place} for an example of how to use an identifier reply.
38
\sa QPlaceManager
39
*/
40
41
/*!
42
\enum QPlaceIdReply::OperationType
43
Defines the type of operation that was used to generate this reply.
44
\value SavePlace The reply was created for a save place operation
45
\value RemovePlace The reply was created for a remove place operation.
46
\value SaveCategory The reply was created for a save category operation
47
\value RemoveCategory The reply was created for a remove category operation.
48
*/
49
50
/*!
51
Constructs a reply which contains the identifier of the object operated upon. The reply is for the given \a operationType and with \a parent.
52
*/
53
QPlaceIdReply::QPlaceIdReply(QPlaceIdReply::OperationType operationType, QObject *parent)
54
: QPlaceReply(
new
QPlaceIdReplyPrivate(operationType), parent) {}
55
56
/*!
57
Destroys the reply.
58
*/
59
QPlaceIdReply::~QPlaceIdReply()
60
{
61
}
62
63
/*!
64
Returns the type of reply.
65
*/
66
QPlaceReply::Type QPlaceIdReply::type()
const
67
{
68
return
QPlaceReply::IdReply;
69
}
70
71
/*!
72
Returns the operation type of the reply. This means whether this
73
identifier reply was for a save place operation,
74
remove category operation and so on.
75
*/
76
QPlaceIdReply::OperationType QPlaceIdReply::operationType()
const
77
{
78
Q_D(
const
QPlaceIdReply);
79
return
d->operationType;
80
}
81
82
/*!
83
Returns the relevant identifier for the operation. For example for a save place operation,
84
the identifier is that of the saved place. For a category removal operation,
85
it is the identifier of the category that was removed.
86
*/
87
QString QPlaceIdReply::id()
const
88
{
89
Q_D(
const
QPlaceIdReply);
90
return
d->id;
91
}
92
93
/*!
94
Sets the \a identifier of the reply.
95
*/
96
void
QPlaceIdReply::setId(
const
QString &identifier)
97
{
98
Q_D(QPlaceIdReply);
99
d->id = identifier;
100
}
QPlaceIdReplyPrivate
Definition
qplaceidreply.cpp:10
QPlaceIdReplyPrivate::id
QString id
Definition
qplaceidreply.cpp:15
QPlaceIdReplyPrivate::QPlaceIdReplyPrivate
QPlaceIdReplyPrivate(QPlaceIdReply::OperationType operationType)
Definition
qplaceidreply.cpp:12
QPlaceIdReplyPrivate::~QPlaceIdReplyPrivate
~QPlaceIdReplyPrivate()
Definition
qplaceidreply.cpp:14
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtlocation
src
location
places
qplaceidreply.cpp
Generated on
for Qt by
1.16.1