Marble

DgmlBlendingTagHandler.cpp
1 // SPDX-FileCopyrightText: 2010 Jens-Michael Hoffmann <[email protected]>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #include "DgmlBlendingTagHandler.h"
6 
7 #include "DgmlAttributeDictionary.h"
8 #include "DgmlElementDictionary.h"
9 #include "GeoParser.h"
10 #include "GeoSceneTileDataset.h"
11 #include "MarbleDebug.h"
12 
13 namespace Marble
14 {
15 namespace dgml
16 {
17 static GeoTagHandlerRegistrar registrar( GeoParser::QualifiedName( dgmlTag_Blending,
18  dgmlTag_nameSpace20 ),
19  new DgmlBlendingTagHandler );
20 
21 GeoNode* DgmlBlendingTagHandler::parse( GeoParser& parser ) const
22 {
23  // Check whether the tag is valid
24  Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1String(dgmlTag_Blending)));
25 
26  // Checking for parent item
27  GeoStackItem parentItem = parser.parentElement();
28  if ( !parentItem.represents( dgmlTag_Texture ) && !parentItem.represents( dgmlTag_Vectortile ))
29  return nullptr;
30 
31  // Attribute name, default to ""
32  const QString name = parser.attribute( dgmlAttr_name ).trimmed();
33  mDebug() << "DgmlBlendingTagHandler::parse" << name;
34  parentItem.nodeAs<GeoSceneTileDataset>()->setBlending( name );
35  return nullptr;
36 }
37 
38 
39 }
40 }
Binds a QML item to a specific geodetic location in screen coordinates.
const char * name(StandardAction id)
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:31
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.