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 <QUrl>
9#include <QIcon>
10
11namespace Marble {
12
13class Q_DECL_HIDDEN RouteItem::Private {
14
15public:
16 QString m_identifier;
17 QString m_name;
18 QIcon m_preview;
19 QUrl m_previewUrl;
20 QString m_distance;
21 QString m_duration;
22 bool m_onCloud;
23};
24
25RouteItem::RouteItem() : d( new Private() )
26{
27}
28
29RouteItem::RouteItem( const RouteItem &other ) : d( new Private( *other.d ) )
30{
31}
32
33RouteItem::~RouteItem()
34{
35 delete d;
36}
37
38RouteItem &RouteItem::operator=( const RouteItem &other )
39{
40 *d = *other.d;
41 return *this;
42}
43
44bool RouteItem::operator==( const RouteItem& other ) const
45{
46 return identifier() == other.identifier();
47}
48
49QString RouteItem::identifier() const
50{
51 return d->m_identifier;
52}
53
54void RouteItem::setIdentifier( const QString &timestamp )
55{
56 d->m_identifier = timestamp;
57}
58
59QString RouteItem::name() const
60{
61 return d->m_name;
62}
63
64void RouteItem::setName( const QString &name )
65{
66 d->m_name = name;
67}
68
69QIcon RouteItem::preview() const
70{
71 return d->m_preview;
72}
73
74void RouteItem::setPreview( const QIcon &preview )
75{
76 d->m_preview = preview;
77}
78
79QUrl RouteItem::previewUrl() const
80{
81 return d->m_previewUrl;
82}
83
84void RouteItem::setPreviewUrl( const QUrl &previewUrl )
85{
86 d->m_previewUrl = previewUrl;
87}
88
89QString RouteItem::distance() const
90{
91 return d->m_distance;
92}
93
94void RouteItem::setDistance( const QString &distance )
95{
96 d->m_distance = distance;
97}
98
99QString RouteItem::duration() const
100{
101 return d->m_duration;
102}
103
104void RouteItem::setDuration( const QString &duration )
105{
106 d->m_duration = duration;
107}
108
109bool RouteItem::onCloud() const
110{
111 return d->m_onCloud;
112}
113
114void RouteItem::setOnCloud( const bool onCloud )
115{
116 d->m_onCloud = onCloud;
117}
118
119}
QString name(StandardAction 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 Fri Jun 21 2024 12:00:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.