7#include "GeoSceneLayer.h"
9#include "GeoSceneAbstractDataset.h"
10#include "GeoSceneFilter.h"
11#include "GeoSceneTypes.h"
16class GeoSceneLayerPrivate
19 GeoSceneLayerPrivate(
const QString &name);
20 ~GeoSceneLayerPrivate();
27 GeoSceneFilter *m_filter =
nullptr;
36GeoSceneLayerPrivate::GeoSceneLayerPrivate(
const QString &name)
45GeoSceneLayerPrivate::~GeoSceneLayerPrivate()
47 qDeleteAll(m_datasets);
50GeoSceneLayer::GeoSceneLayer(
const QString &name)
51 : d(new GeoSceneLayerPrivate(
name))
55GeoSceneLayer::~GeoSceneLayer()
60const char *GeoSceneLayer::nodeType()
const
62 return GeoSceneTypes::GeoSceneLayerType;
69 while (it != d->m_datasets.end()) {
71 if (currentAbstractDataset->name() == dataset->name()) {
72 delete currentAbstractDataset;
73 d->m_datasets.erase(it);
81 d->m_datasets.append(dataset);
91 for (; it != end; ++it) {
92 if ((*it)->name() == name) {
102GeoSceneAbstractDataset *GeoSceneLayer::dataset(
const QString &name)
104 return const_cast<GeoSceneAbstractDataset *
>(
static_cast<GeoSceneLayer
const *
>(
this)->dataset(name));
107const GeoSceneAbstractDataset *GeoSceneLayer::groundDataset()
const
109 if (d->m_datasets.isEmpty())
112 return d->m_datasets.first();
117GeoSceneAbstractDataset *GeoSceneLayer::groundDataset()
119 return const_cast<GeoSceneAbstractDataset *
>(
static_cast<GeoSceneLayer
const *
>(
this)->groundDataset());
124 return d->m_datasets;
127QString GeoSceneLayer::name()
const
132QString GeoSceneLayer::backend()
const
137void GeoSceneLayer::setBackend(
const QString &backend)
139 d->m_backend = backend;
142bool GeoSceneLayer::isTiled()
const
147void GeoSceneLayer::setTiled(
bool tiled)
152QString GeoSceneLayer::role()
const
157void GeoSceneLayer::setRole(
const QString &role)
162const GeoSceneFilter *GeoSceneLayer::filter()
const
167GeoSceneFilter *GeoSceneLayer::filter()
172void GeoSceneLayer::addFilter(GeoSceneFilter *filter)
177void GeoSceneLayer::removeFilter(GeoSceneFilter *filter)
179 if (filter == d->m_filter) {
180 d->m_filter =
nullptr;
Contents used inside a layer.
QString name(StandardAction id)
Binds a QML item to a specific geodetic location in screen coordinates.
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)