7#include "GeoSceneMap.h"
9#include "DgmlAuxillaryDictionary.h"
10#include "GeoSceneFilter.h"
11#include "GeoSceneLayer.h"
12#include "GeoSceneTypes.h"
16#include <GeoDataCoordinates.h>
23class GeoSceneMapPrivate
26 GeoSceneMapPrivate() =
default;
31 qDeleteAll(m_filters);
34 QVariantList m_center;
49 QColor m_highlightBrushColor;
50 QColor m_highlightPenColor;
53GeoSceneMap::GeoSceneMap()
54 : d(new GeoSceneMapPrivate)
58GeoSceneMap::~GeoSceneMap()
63const char *GeoSceneMap::nodeType()
const
65 return GeoSceneTypes::GeoSceneMapType;
72 while (it != d->m_layers.end()) {
74 if (currentLayer->name() == layer->name()) {
76 d->m_layers.erase(it);
84 d->m_layers.append(layer);
94 for (; it != end; ++it) {
95 if ((*it)->name() == name) {
115 for (; it != end; ++it) {
116 if ((*it)->name() == name) {
133 while (it != d->m_filters.end()) {
135 if (currentFilter->name() == filter->name()) {
136 delete currentFilter;
137 d->m_filters.erase(it);
145 d->m_filters.append(filter);
149QVariantList GeoSceneMap::center()
const
154void GeoSceneMap::setCenter(
const QString &coordinatesString)
157 if (coordinatesList.
count() == 2) {
158 bool success =
false;
159 const GeoDataCoordinates coordinates = GeoDataCoordinates::fromString(coordinatesString, success);
163 lonLat <<
QVariant(coordinates.longitude(GeoDataCoordinates::Degree)) <<
QVariant(coordinates.latitude(GeoDataCoordinates::Degree));
164 d->m_center = lonLat;
168 else if (coordinatesList.
count() == 4) {
169 QVariantList northSouthEastWest;
180 for (; it != end; ++it) {
181 if ((*it)->name() == name) {
200bool GeoSceneMap::hasTextureLayers()
const
204 for (; it != end; ++it) {
206 && (*it)->datasets().count() > 0)
213bool GeoSceneMap::hasVectorLayers()
const
217 for (; it != end; ++it) {
219 && (*it)->datasets().count() > 0)
226QColor GeoSceneMap::backgroundColor()
const
228 return d->m_backgroundColor;
231void GeoSceneMap::setBackgroundColor(
const QColor &backgroundColor)
233 d->m_backgroundColor = backgroundColor;
236QColor GeoSceneMap::labelColor()
const
238 return d->m_labelColor;
241void GeoSceneMap::setLabelColor(
const QColor &backgroundColor)
243 d->m_labelColor = backgroundColor;
246QColor GeoSceneMap::highlightBrushColor()
const
248 return d->m_highlightBrushColor;
251void GeoSceneMap::setHighlightBrushColor(
const QColor &highlightBrushColor)
253 d->m_highlightBrushColor = highlightBrushColor;
256QColor GeoSceneMap::highlightPenColor()
const
258 return d->m_highlightPenColor;
261void GeoSceneMap::setHighlightPenColor(
const QColor &highlightPenColor)
263 d->m_highlightPenColor = highlightPenColor;
A 3d point representation.
Filter of a GeoScene document.
Layer of a GeoScene document.
Binds a QML item to a specific geodetic location in screen coordinates.
const_reference at(qsizetype i) const const
qsizetype count() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const