Commit 61e174ee authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Normalize headers

parent 1f5dc1b5
......@@ -18,6 +18,8 @@
#include <QDebug>
#include <QSharedPointer>
using namespace Marble;
class LinkedPoint {
public:
explicit LinkedPoint(const QPointF& point, bool isEntering=false, bool isLeaving=false) : m_point(point),
......
......@@ -13,13 +13,11 @@
#ifndef BASECLIPPER_H
#define BASECLIPPER_H
#include <QPointF>
#include <QPolygonF>
#include "GeoDataLinearRing.h"
#include "GeoDataLatLonBox.h"
using namespace Marble;
#include <QPointF>
#include <QPolygonF>
class BaseClipper
{
......@@ -34,7 +32,7 @@ public:
{
QPolygonF polygon;
if(!reverseOrder) {
foreach (const GeoDataCoordinates& coord, lineString) {
foreach (const Marble::GeoDataCoordinates& coord, lineString) {
// Need to flip the Y axis(latitude)
QPointF point(coord.longitude(), -coord.latitude());
polygon.append(point);
......@@ -58,13 +56,13 @@ public:
if(!reverseOrder) {
foreach (const QPointF& point, polygon) {
// Flipping back the Y axis
GeoDataCoordinates coord(point.x(), -point.y());
Marble::GeoDataCoordinates coord(point.x(), -point.y());
lineString.append(coord);
}
} else {
for(int i = polygon.size()-1; i >= 0; --i) {
// Need to flip the Y axis(latitude)
GeoDataCoordinates coord(polygon.at(i).x(), -polygon.at(i).y());
Marble::GeoDataCoordinates coord(polygon.at(i).x(), -polygon.at(i).y());
lineString.append(coord);
}
}
......@@ -72,14 +70,13 @@ public:
return lineString;
}
void initClipRect(const GeoDataLatLonBox& clippingBox, int pointsToAddAtEdges);
void initClipRect(const Marble::GeoDataLatLonBox& clippingBox, int pointsToAddAtEdges);
void clipPolyObject ( const QPolygonF & sourcePolygon,
QVector<QPolygonF> & clippedPolyObjects,
bool isClosed );
private:
int sector( const QPointF & point ) const;
int borderSector( const QPointF & point ) const;
bool isCornerPoint (const QPointF & point) const;
......
......@@ -18,7 +18,7 @@ class LineStringProcessor : public PlacemarkFilter
public:
explicit LineStringProcessor(GeoDataDocument* document);
virtual void process();
void process() override;
};
......
......@@ -17,7 +17,7 @@
class NodeReducer : public PlacemarkFilter {
public:
NodeReducer(GeoDataDocument* document, int zoomLevel);
virtual void process();
void process() override;
private:
GeoDataLineString* reduce(GeoDataLineString* lineString);
......
......@@ -18,7 +18,7 @@ class ShpCoastlineProcessor : public PlacemarkFilter
public:
explicit ShpCoastlineProcessor(GeoDataDocument* document);
virtual void process();
void process() override;
GeoDataDocument* cutToTiles(unsigned int zoomLevel, unsigned int tileX, unsigned int tileY);
};
......
......@@ -13,10 +13,10 @@
#define MARBLE_TAGSFILTER_H
#include "PlacemarkFilter.h"
#include <QMap>
#include <QString>
namespace Marble{
class GeoDataDocument;
......@@ -26,9 +26,10 @@ class TagsFilter : public PlacemarkFilter
public:
//Filters placemarks which have tags in the hash
TagsFilter(GeoDataDocument* document, const QStringList& tagsList, bool andFlag = false);
virtual void process();
void process() override;
QVector<GeoDataPlacemark*>::const_iterator rejectedObjectsBegin() const;
QVector<GeoDataPlacemark*>::const_iterator rejectedObjectsEnd() const;
private:
QVector<GeoDataPlacemark*> m_rejectedObjects;
};
......
......@@ -19,7 +19,7 @@ class TinyPlanetProcessor : public PlacemarkFilter
public:
explicit TinyPlanetProcessor(GeoDataDocument* document);
virtual void process();
void process() override;
GeoDataDocument* cutToTiles(unsigned int zoomLevel, unsigned int tileX, unsigned int tileY);
......
......@@ -11,11 +11,10 @@
#ifndef MARBLE_WAYCHUNK_H
#define MARBLE_WAYCHUNK_H
#include <QList>
#include "GeoDataFeature.h"
#include "GeoDataLineString.h"
#include <QList>
namespace Marble
{
......@@ -51,7 +50,6 @@ private:
qint64 m_first;
qint64 m_last;
GeoDataFeature::GeoDataVisualCategory m_visualCategory;
};
}
......
......@@ -22,12 +22,10 @@ class WayConcatenator : public TagsFilter
{
public:
WayConcatenator(GeoDataDocument *document, const QStringList &tagsList, bool andFlag = false);
virtual void process();
~WayConcatenator();
void process() override;
private:
QMultiHash<qint64, WayChunk*> m_hash;
QVector<WayChunk*> m_chunks;
QVector<GeoDataPlacemark> m_wayPlacemarks;
void createWayChunk(GeoDataPlacemark *placemark, qint64 firstId, qint64 lastId);
WayChunk* getWayChunk(GeoDataPlacemark *placemark, qint64 matchId);
void concatFirst(GeoDataPlacemark *placemark, WayChunk *chunk);
......@@ -36,6 +34,10 @@ private:
void addRejectedPlacemarks();
void addWayChunks();
void modifyDocument();
QMultiHash<qint64, WayChunk*> m_hash;
QVector<WayChunk*> m_chunks;
QVector<GeoDataPlacemark> m_wayPlacemarks;
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment