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
qgeomapversion.cpp
Go to the documentation of this file.
1// Copyright (C) 2014 Appello Systems AB.
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 "qgeomapversion.h"
5
6#include <QJsonDocument>
7
9
11 : m_version(-1) {}
12
13bool QGeoMapVersion::isNewVersion(const QJsonObject &newVersionData) const
14{
15 return m_versionData != newVersionData;
16}
17
19{
20 return m_version;
21}
22
24{
25 m_version = version;
26}
27
29{
30 m_versionData = versionData;
31}
32
33
35{
36
38 object[QLatin1String("version")] = m_version;
39 object[QLatin1String("data")] = m_versionData;
40
41 QJsonDocument document(object);
42
43 return document.toJson();
44}
45
\inmodule QtCore
Definition qbytearray.h:57
void setVersion(const int)
void setVersionData(const QJsonObject &versionData)
bool isNewVersion(const QJsonObject &newVersionData) const
int version() const
QByteArray toJson() const
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
Combined button and popup list for selecting options.
GLuint object
[3]
QLatin1StringView QLatin1String
Definition qstringfwd.h:31