Marble

KmlOpenTagHandler.cpp
1 /*
2  SPDX-FileCopyrightText: 2008 Patrick Spendrin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "KmlOpenTagHandler.h"
8 
9 #include "MarbleDebug.h"
10 
11 #include "KmlElementDictionary.h"
12 
13 #include "GeoDataFeature.h"
14 #include "GeoParser.h"
15 
16 namespace Marble
17 {
18 namespace kml
19 {
20 KML_DEFINE_TAG_HANDLER( open )
21 
22 GeoNode* KmlopenTagHandler::parse( GeoParser& parser ) const
23 {
24  Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1String(kmlTag_open)));
25 
26  GeoStackItem parentItem = parser.parentElement();
27 
28  if( parentItem.is<GeoDataFeature>() ) {
29  QString open = parser.readElementText().trimmed();
30 /* if (open == QLatin1String("1"))
31  parentItem.nodeAs<GeoDataFeature>()->setOpen( true );
32  else
33  parentItem.nodeAs<GeoDataFeature>()->setOpen( false );*/
34  }
35 
36  return nullptr;
37 }
38 
39 }
40 }
QAction * open(const QObject *recvr, const char *slot, QObject *parent)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.