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

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2013 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
0004 //
0005 
0006 #ifndef GEODATAPLAYLIST_H
0007 #define GEODATAPLAYLIST_H
0008 
0009 #include "GeoDataObject.h"
0010 #include "GeoDataTourPrimitive.h"
0011 
0012 #include <QList>
0013 
0014 namespace Marble
0015 {
0016 
0017 /**
0018  */
0019 class GEODATA_EXPORT GeoDataPlaylist : public GeoDataObject
0020 {
0021 public:
0022 
0023     bool operator==( const GeoDataPlaylist &other ) const;
0024     bool operator!=( const GeoDataPlaylist &other ) const;
0025     const char *nodeType() const override;
0026 
0027     GeoDataTourPrimitive* primitive( int index );
0028     const GeoDataTourPrimitive* primitive( int index ) const;
0029     void addPrimitive( GeoDataTourPrimitive* primitive );
0030     void insertPrimitive( int index, GeoDataTourPrimitive* primitive );
0031     void removePrimitiveAt( int index );
0032     void swapPrimitives( int indexA, int indexB );
0033 
0034     int size() const;
0035 
0036 private:
0037     QList<GeoDataTourPrimitive*> m_primitives;
0038 };
0039 
0040 } // namespace Marble
0041 
0042 #endif // GEODATAPLAYLIST_H