File indexing completed on 2024-05-12 03:50:18

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2013 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
0004 //
0005 
0006 #include "GeoDataTour.h"
0007 #include "GeoDataTour_p.h"
0008 
0009 
0010 namespace Marble
0011 {
0012 
0013 const GeoDataTour GeoDataTour::null;
0014 
0015 GeoDataTour::GeoDataTour()
0016     : GeoDataFeature( new GeoDataTourPrivate )
0017 {
0018     // nothing to do
0019 }
0020 
0021 GeoDataTour::GeoDataTour(const GeoDataTour& other)
0022     : GeoDataFeature(other, new GeoDataTourPrivate(*other.d_func()))
0023 {
0024 }
0025 
0026 GeoDataTour::~GeoDataTour()
0027 {
0028     // nothing to do;
0029 }
0030 
0031 GeoDataTour& GeoDataTour::operator=(const GeoDataTour& other)
0032 {
0033     if (this != &other) {
0034         Q_D(GeoDataTour);
0035         *d = *other.d_func();
0036     }
0037 
0038     return *this;
0039 }
0040 
0041 
0042 bool GeoDataTour::operator==(const GeoDataTour& other) const
0043 {
0044     Q_D(const GeoDataTour);
0045     return equals( other ) &&
0046            *d->m_playlist == *other.d_func()->m_playlist;
0047 }
0048 
0049 bool GeoDataTour::operator!=(const GeoDataTour& other) const
0050 {
0051     return !this->operator==(other);
0052 }
0053 
0054 GeoDataFeature * GeoDataTour::clone() const
0055 {
0056     return new GeoDataTour(*this);
0057 }
0058 
0059 
0060 GeoDataPlaylist* GeoDataTour::playlist()
0061 {
0062     Q_D(GeoDataTour);
0063     return d->m_playlist;
0064 }
0065 
0066 const GeoDataPlaylist* GeoDataTour::playlist() const
0067 {
0068     Q_D(const GeoDataTour);
0069     return d->m_playlist;
0070 }
0071 
0072 void GeoDataTour::setPlaylist(GeoDataPlaylist *playlist)
0073 {
0074     Q_D(GeoDataTour);
0075     d->m_playlist = playlist;
0076     d->m_playlist->setParent(this);
0077 }
0078 
0079 const char *GeoDataTour::nodeType() const
0080 {
0081     return GeoDataTypes::GeoDataTourType;
0082 }
0083 
0084 } // namespace Marble