summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanjiban Bairagya <sanjiban22393@gmail.com>2016-09-24 19:29:01 (GMT)
committerSanjiban Bairagya <sanjiban22393@gmail.com>2016-09-24 19:29:01 (GMT)
commit1368ec36ded88665dc113d619698bcb7a68e8547 (patch)
tree825257d2b786439908406af6a18dd4efe1181356
parenta8f0f4b72ff236c170acded452c692e01e1686aa (diff)
Kml_scaleTagHandler{.cpp, .h} -> KmlScaleTagHandler{.cpp, .h}
-rw-r--r--src/lib/marble/geodata/CMakeLists.txt2
-rw-r--r--src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.cpp63
-rw-r--r--src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.h47
-rw-r--r--src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.cpp58
-rw-r--r--src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.h48
5 files changed, 72 insertions, 146 deletions
diff --git a/src/lib/marble/geodata/CMakeLists.txt b/src/lib/marble/geodata/CMakeLists.txt
index e21f3b1..bdb9fd9 100644
--- a/src/lib/marble/geodata/CMakeLists.txt
+++ b/src/lib/marble/geodata/CMakeLists.txt
@@ -326,7 +326,7 @@ geodata/handlers/kml/KmlRoleTagHandler.cpp
geodata/handlers/kml/KmlRollTagHandler.cpp
geodata/handlers/kml/KmlRotationTagHandler.cpp
geodata/handlers/kml/KmlRotationXYTagHandler.cpp
-geodata/handlers/kml/Kml_scaleTagHandler.cpp
+geodata/handlers/kml/KmlScaleTagHandler.cpp
geodata/handlers/kml/KmlSchemaDataTagHandler.cpp
geodata/handlers/kml/KmlSchemaTagHandler.cpp
geodata/handlers/kml/KmlScreenOverlayTagHandler.cpp
diff --git a/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.cpp b/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.cpp
index cc31168..9ac36d9 100644
--- a/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.cpp
+++ b/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.cpp
@@ -1,44 +1,57 @@
-//
-// This file is part of the Marble Virtual Globe.
-//
-// This program is free software licensed under the GNU LGPL. You can
-// find a copy of this license in LICENSE.txt in the top directory of
-// the source code.
-//
-// Copyright 2013 Mayank Madan <maddiemadan@gmail.com>
-//
+/*
+ Copyright (C) 2008 Patrick Spendrin <ps_ml@gmx.de>
+
+ This file is part of the KDE project
+
+ This library is free software you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+// be aware that there is another Tag called Scale which uses the name KmlscaleTagHandler.h
+// as it is impossible to use the name KmlscaleTagHandler then, use an underscore
+// to mark the lower case variant
#include "KmlScaleTagHandler.h"
#include "MarbleDebug.h"
#include "KmlElementDictionary.h"
-#include "KmlObjectTagHandler.h"
-#include "GeoDataScale.h"
-#include "GeoDataGeometry.h"
-#include "GeoDataModel.h"
-#include "GeoDataParser.h"
+#include "GeoDataIconStyle.h"
+#include "GeoDataLabelStyle.h"
+#include "GeoParser.h"
namespace Marble
{
namespace kml
{
-KML_DEFINE_TAG_HANDLER( Scale )
+KML_DEFINE_TAG_HANDLER( scale )
-GeoNode* KmlScaleTagHandler::parse( GeoParser& parser ) const
+GeoNode* KmlscaleTagHandler::parse( GeoParser& parser ) const
{
- Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1String(kmlTag_Scale)));
+ Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1String(kmlTag_scale)));
- GeoDataScale scale;
- KmlObjectTagHandler::parseIdentifiers( parser, &scale );
GeoStackItem parentItem = parser.parentElement();
-
- if( parentItem.represents( kmlTag_Model ) ) {
- parentItem.nodeAs<GeoDataModel>()->setScale(scale);
- return &parentItem.nodeAs<GeoDataModel>()->scale();
- } else {
- return 0;
+
+ if ( parentItem.represents( kmlTag_IconStyle ) ) {
+ parentItem.nodeAs<GeoDataIconStyle>()->setScale(
+ parser.readElementText().trimmed().toFloat() );
+ } else if( parentItem.represents( kmlTag_LabelStyle ) ) {
+ parentItem.nodeAs<GeoDataLabelStyle>()->setScale(
+ parser.readElementText().trimmed().toFloat() );
}
+ return 0;
}
}
diff --git a/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.h b/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.h
index a4f37b5..031bf44 100644
--- a/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.h
+++ b/src/lib/marble/geodata/handlers/kml/KmlScaleTagHandler.h
@@ -1,15 +1,33 @@
-//
-// This file is part of the Marble Virtual Globe.
-//
-// This program is free software licensed under the GNU LGPL. You can
-// find a copy of this license in LICENSE.txt in the top directory of
-// the source code.
-//
-// Copyright 2013 Mayank Madan <maddiemadan@gmail.com>
-//
-
-#ifndef KMLSCALETAGHANDLER_H
-#define KMLSCALETAGHANDLER_H
+/*
+ Copyright (C) 2008 Patrick Spendrin <ps_ml@gmx.de>
+
+ This file is part of the KDE project
+
+ This library is free software you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ aint with this library see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef MARBLE_KML_KMLsCALETAGHANDLER_H
+#define MARBLE_KML_KMLsCALETAGHANDLER_H
+
+// be aware that there is another Tag called Scale which uses the name KmlscaleTagHandler.h
+// as it is impossible to use the name KmlscaleTagHandler then, use an underscore
+// to mark the lower case variant
+// FIXME: is this really the case nowadays?
+// There does not seem to be a KmlscaleTagHandler.h, nor seems kmlTag_Scale to be used anymore.
+// As a reminder let's keep the small 's' for now.
#include "GeoTagHandler.h"
@@ -18,7 +36,7 @@ namespace Marble
namespace kml
{
-class KmlScaleTagHandler : public GeoTagHandler
+class KmlscaleTagHandler : public GeoTagHandler
{
public:
virtual GeoNode* parse(GeoParser&) const;
@@ -26,4 +44,5 @@ public:
}
}
-#endif // KMLSCALETAGHANDLER_H
+
+#endif
diff --git a/src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.cpp b/src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.cpp
deleted file mode 100644
index b05344c..0000000
--- a/src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Copyright (C) 2008 Patrick Spendrin <ps_ml@gmx.de>
-
- This file is part of the KDE project
-
- This library is free software you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- aint with this library see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-// be aware that there is another Tag called Scale which uses the name KmlscaleTagHandler.h
-// as it is impossible to use the name KmlscaleTagHandler then, use an underscore
-// to mark the lower case variant
-
-#include "Kml_scaleTagHandler.h"
-
-#include "MarbleDebug.h"
-
-#include "KmlElementDictionary.h"
-#include "GeoDataIconStyle.h"
-#include "GeoDataLabelStyle.h"
-#include "GeoParser.h"
-
-namespace Marble
-{
-namespace kml
-{
-KML_DEFINE_TAG_HANDLER( scale )
-
-GeoNode* KmlscaleTagHandler::parse( GeoParser& parser ) const
-{
- Q_ASSERT(parser.isStartElement() && parser.isValidElement(QLatin1String(kmlTag_scale)));
-
- GeoStackItem parentItem = parser.parentElement();
-
- if ( parentItem.represents( kmlTag_IconStyle ) ) {
- parentItem.nodeAs<GeoDataIconStyle>()->setScale(
- parser.readElementText().trimmed().toFloat() );
- } else if( parentItem.represents( kmlTag_LabelStyle ) ) {
- parentItem.nodeAs<GeoDataLabelStyle>()->setScale(
- parser.readElementText().trimmed().toFloat() );
- }
- return 0;
-}
-
-}
-}
diff --git a/src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.h b/src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.h
deleted file mode 100644
index 031bf44..0000000
--- a/src/lib/marble/geodata/handlers/kml/Kml_scaleTagHandler.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- Copyright (C) 2008 Patrick Spendrin <ps_ml@gmx.de>
-
- This file is part of the KDE project
-
- This library is free software you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- aint with this library see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef MARBLE_KML_KMLsCALETAGHANDLER_H
-#define MARBLE_KML_KMLsCALETAGHANDLER_H
-
-// be aware that there is another Tag called Scale which uses the name KmlscaleTagHandler.h
-// as it is impossible to use the name KmlscaleTagHandler then, use an underscore
-// to mark the lower case variant
-// FIXME: is this really the case nowadays?
-// There does not seem to be a KmlscaleTagHandler.h, nor seems kmlTag_Scale to be used anymore.
-// As a reminder let's keep the small 's' for now.
-
-#include "GeoTagHandler.h"
-
-namespace Marble
-{
-namespace kml
-{
-
-class KmlscaleTagHandler : public GeoTagHandler
-{
-public:
- virtual GeoNode* parse(GeoParser&) const;
-};
-
-}
-}
-
-#endif