Marble
9 #include "DgmlVectortileTagHandler.h"
13 #include "MarbleDebug.h"
15 #include "DgmlElementDictionary.h"
16 #include "DgmlAttributeDictionary.h"
17 #include "DgmlAuxillaryDictionary.h"
18 #include "GeoParser.h"
19 #include "GeoSceneLayer.h"
20 #include "GeoSceneVectorTileDataset.h"
26 DGML_DEFINE_TAG_HANDLER(Vectortile)
28 GeoNode* 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 trimmed() const const
bool isEmpty() const const
int toInt(bool *ok, int base) const const
Binds a QML item to a specific geodetic location in screen coordinates.
QString name(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:07 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.