Marble

RouteItem.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Utku Aydın <utkuaydin34@gmail.com>
4//
5
6#include "RouteItem.h"
7
8#include <QIcon>
9#include <QUrl>
10
11namespace Marble
12{
13
14class Q_DECL_HIDDEN RouteItem::Private
15{
16public:
17 QString m_identifier;
18 QString m_name;
19 QIcon m_preview;
20 QUrl m_previewUrl;
21 QString m_distance;
22 QString m_duration;
23 bool m_onCloud;
24};
25
26RouteItem::RouteItem()
27 : d(new Private())
28{
29}
30
31RouteItem::RouteItem(const RouteItem &other)
32 : d(new Private(*other.d))
33{
34}
35
36RouteItem::~RouteItem()
37{
38 delete d;
39}
40
41RouteItem &RouteItem::operator=(const RouteItem &other)
42{
43 *d = *other.d;
44 return *this;
45}
46
47bool RouteItem::operator==(const RouteItem &other) const
48{
49 return identifier() == other.identifier();
50}
51
52QString RouteItem::identifier() const
53{
54 return d->m_identifier;
55}
56
57void RouteItem::setIdentifier(const QString &timestamp)
58{
59 d->m_identifier = timestamp;
60}
61
62QString RouteItem::name() const
63{
64 return d->m_name;
65}
66
67void RouteItem::setName(const QString &name)
68{
69 d->m_name = name;
70}
71
72QIcon RouteItem::preview() const
73{
74 return d->m_preview;
75}
76
77void RouteItem::setPreview(const QIcon &preview)
78{
79 d->m_preview = preview;
80}
81
82QUrl RouteItem::previewUrl() const
83{
84 return d->m_previewUrl;
85}
86
87void RouteItem::setPreviewUrl(const QUrl &previewUrl)
88{
89 d->m_previewUrl = previewUrl;
90}
91
92QString RouteItem::distance() const
93{
94 return d->m_distance;
95}
96
97void RouteItem::setDistance(const QString &distance)
98{
99 d->m_distance = distance;
100}
101
102QString RouteItem::duration() const
103{
104 return d->m_duration;
105}
106
107void RouteItem::setDuration(const QString &duration)
108{
109 d->m_duration = duration;
110}
111
112bool RouteItem::onCloud() const
113{
114 return d->m_onCloud;
115}
116
117void RouteItem::setOnCloud(const bool onCloud)
118{
119 d->m_onCloud = onCloud;
120}
121
122}
QString name(GameStandardAction id)
Binds a QML item to a specific geodetic location in screen coordinates.
KOSM_EXPORT double distance(const std::vector< const OSM::Node * > &path, Coordinate coord)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.