6#include "GeoDataPlaylist.h"
8#include "GeoDataTypes.h"
13bool GeoDataPlaylist::operator==(
const GeoDataPlaylist &other)
const
15 if (this->m_primitives.
size() != other.m_primitives.size()) {
19 for (GeoDataTourPrimitive *m_primitive : m_primitives) {
20 if (*m_primitive != *other.m_primitives.at(index)) {
30bool GeoDataPlaylist::operator!=(
const GeoDataPlaylist &other)
const
32 return !this->operator==(other);
35const char *GeoDataPlaylist::nodeType()
const
37 return GeoDataTypes::GeoDataPlaylistType;
40GeoDataTourPrimitive *GeoDataPlaylist::primitive(
int id)
42 if (size() <=
id ||
id < 0) {
45 return m_primitives.
at(
id);
48const GeoDataTourPrimitive *GeoDataPlaylist::primitive(
int id)
const
50 if (size() <=
id ||
id < 0) {
53 return m_primitives.
at(
id);
56void GeoDataPlaylist::addPrimitive(GeoDataTourPrimitive *primitive)
58 primitive->setParent(
this);
62void GeoDataPlaylist::insertPrimitive(
int position, GeoDataTourPrimitive *primitive)
64 primitive->setParent(
this);
65 int const index = qBound(0, position, m_primitives.
size());
66 m_primitives.
insert(index, primitive);
69void GeoDataPlaylist::removePrimitiveAt(
int position)
74void GeoDataPlaylist::swapPrimitives(
int positionA,
int positionB)
76 if (qMin(positionA, positionB) >= 0 && qMax(positionA, positionB) < m_primitives.
size()) {
81int GeoDataPlaylist::size()
const
83 return m_primitives.
size();
Binds a QML item to a specific geodetic location in screen coordinates.
const_reference at(qsizetype i) const const
iterator insert(const_iterator before, parameter_type value)
void push_back(parameter_type value)
void removeAt(qsizetype i)
qsizetype size() const const
void swapItemsAt(qsizetype i, qsizetype j)