Marble
9#include "DgmlVectortileTagHandler.h"
13#include "MarbleDebug.h"
15#include "DgmlElementDictionary.h"
16#include "DgmlAttributeDictionary.h"
17#include "DgmlAuxillaryDictionary.h"
19#include "GeoSceneLayer.h"
20#include "GeoSceneVectorTileDataset.h"
26DGML_DEFINE_TAG_HANDLER(Vectortile)
28GeoNode* DgmlVectortileTagHandler::parse( GeoParser& parser )
const
31 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(dgmlTag_Vectortile)));
35 const QString expireStr = parser.attribute( dgmlAttr_expire ).
trimmed();
36 int expire = std::numeric_limits<int>::max();
38 expire = expireStr.
toInt();
40 GeoSceneTileDataset *texture =
nullptr;
43 GeoStackItem parentItem = parser.parentElement();
47 if ( parentItem.represents( dgmlTag_Layer )
48 && parentItem.nodeAs<GeoSceneLayer>()->backend() == dgmlValue_vectortile ) {
50 texture =
new GeoSceneVectorTileDataset( name );
51 texture->setExpire( expire );
52 parentItem.nodeAs<GeoSceneLayer>()->addDataset( texture );
QString name(StandardShortcut id)
Binds a QML item to a specific geodetic location in screen coordinates.
bool isEmpty() const const
int toInt(bool *ok, int base) const const
QString trimmed() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.