Skip to content

Commit

Permalink
Only include qgsvectorlayer.h where required
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 5, 2018
1 parent f875bb7 commit 17279a4
Show file tree
Hide file tree
Showing 116 changed files with 181 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
************************************************************************/



class QgsLayoutReportContext : QObject
{
%Docstring
Expand Down
1 change: 1 addition & 0 deletions python/core/auto_generated/qgsjsonutils.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@




class QgsJsonExporter
{
%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@




class QgsVectorLayerUndoPassthroughCommand : QgsVectorLayerUndoCommand
{
%Docstring
Expand Down
2 changes: 2 additions & 0 deletions python/gui/auto_generated/qgsfieldvalueslineedit.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@





class QgsFieldValuesLineEdit: QgsFilterLineEdit
{
%Docstring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@




class QgsNewAuxiliaryLayerDialog: QDialog
{
%Docstring
Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmextractbylocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "qgsalgorithmextractbylocation.h"
#include "qgsgeometryengine.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmimportphotos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "qgsalgorithmimportphotos.h"
#include "qgsogrutils.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmmergevector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
***************************************************************************/

#include "qgsalgorithmmergevector.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmpackage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qgsgeometryengine.h"
#include "qgsogrutils.h"
#include "qgsvectorfilewriter.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
***************************************************************************/

#include "qgsalgorithmsaveselectedfeatures.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

Expand Down
1 change: 1 addition & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrycheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "qgscurvepolygon.h"
#include "qgsgeometrycheck.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"

QgsGeometryCheckerContext::QgsGeometryCheckerContext( int _precision, const QgsCoordinateReferenceSystem &_mapCrs, const QMap<QString, QgsFeaturePool *> &_featurePools )
: tolerance( std::pow( 10, -_precision ) )
Expand Down
1 change: 0 additions & 1 deletion src/analysis/vector/geometry_checker/qgsgeometrycheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <QStringList>
#include "qgis_analysis.h"
#include "qgsfeature.h"
#include "qgsvectorlayer.h"
#include "geometry/qgsgeometry.h"
#include "qgsgeometrycheckerutils.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "qgsgeometrycheck.h"
#include "qgsfeaturepool.h"
#include "qgsproject.h"
#include "qgsvectorlayer.h"

#include <QtConcurrentMap>
#include <QFutureWatcher>
Expand Down
19 changes: 18 additions & 1 deletion src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "qgsgeos.h"
#include "qgsgeometrycollection.h"
#include "qgssurface.h"
#include "qgsvectorlayer.h"

#include <qmath.h>

namespace QgsGeometryCheckerUtils
Expand All @@ -45,7 +47,22 @@ namespace QgsGeometryCheckerUtils
double LayerFeature::layerToMapUnits() const { return mFeaturePool->getLayerToMapUnits(); }
const QgsCoordinateTransform &LayerFeature::layerToMapTransform() const { return mFeaturePool->getLayerToMapTransform(); }

/////////////////////////////////////////////////////////////////////////////
QString LayerFeature::id() const
{
return QString( "%1:%2" ).arg( layer().name() ).arg( mFeature.id() );
}

bool LayerFeature::operator==( const LayerFeature &other ) const
{
return layer().id() == other.layer().id() && feature().id() == other.feature().id();
}

bool LayerFeature::operator!=( const LayerFeature &other ) const
{
return layer().id() != other.layer().id() || feature().id() != other.feature().id();
}

/////////////////////////////////////////////////////////////////////////////

LayerFeatures::iterator::iterator( const QStringList::const_iterator &layerIt, const LayerFeatures *parent )
: mLayerIt( layerIt )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#define QGS_GEOMETRYCHECKERUTILS_H

#include "qgsfeature.h"
#include "qgsvectorlayer.h"
#include "geometry/qgsabstractgeometry.h"
#include "geometry/qgspoint.h"
#include <qmath.h>
Expand All @@ -41,9 +40,9 @@ namespace QgsGeometryCheckerUtils
const QgsCoordinateTransform &layerToMapTransform() const;
const QgsAbstractGeometry *geometry() const { return mGeometry; }
QString geometryCrs() const { return mMapCrs ? layerToMapTransform().destinationCrs().authid() : layerToMapTransform().sourceCrs().authid(); }
QString id() const { return QString( "%1:%2" ).arg( layer().name() ).arg( mFeature.id() ); }
bool operator==( const LayerFeature &other ) const { return layer().id() == other.layer().id() && feature().id() == other.feature().id(); }
bool operator!=( const LayerFeature &other ) const { return layer().id() != other.layer().id() || feature().id() != other.feature().id(); }
QString id() const;
bool operator==( const LayerFeature &other ) const;
bool operator!=( const LayerFeature &other ) const;

private:
const QgsFeaturePool *mFeaturePool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "qgsgeometryengine.h"
#include "qgsgeometrycontainedcheck.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"


void QgsGeometryContainedCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &messages, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define QGS_GEOMETRY_COVER_CHECK_H

#include "qgsgeometrycheck.h"
#include "qgsvectorlayer.h"

class ANALYSIS_EXPORT QgsGeometryContainedCheckError : public QgsGeometryCheckError
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "qgsgeometrydanglecheck.h"
#include "qgslinestring.h"
#include "qgsvectorlayer.h"

void QgsGeometryDangleCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &/*messages*/, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "qgsspatialindex.h"
#include "qgsgeometry.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"

QString QgsGeometryDuplicateCheckError::duplicatesString( const QMap<QString, QgsFeaturePool *> &featurePools, const QMap<QString, QList<QgsFeatureId>> &duplicates )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "qgsgeometryengine.h"
#include "qgsproject.h"
#include "qgsspatialindex.h"

#include "qgsvectorlayer.h"

QgsGeometryFollowBoundariesCheck::QgsGeometryFollowBoundariesCheck( QgsGeometryCheckerContext *context, QgsVectorLayer *checkLayer )
: QgsGeometryCheck( FeatureNodeCheck, {QgsWkbTypes::PolygonGeometry}, context )
Expand Down
2 changes: 2 additions & 0 deletions src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include "qgsgeometrygapcheck.h"
#include "qgsgeometrycollection.h"
#include "qgsfeaturepool.h"
#include "qgsvectorlayer.h"

#include "geos_c.h"

void QgsGeometryGapCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &messages, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "qgsgeometrylineintersectioncheck.h"
#include "qgslinestring.h"
#include "qgsvectorlayer.h"

void QgsGeometryLineIntersectionCheck::collectErrors( QList<QgsGeometryCheckError *> &errors, QStringList &/*messages*/, QAtomicInt *progressCounter, const QMap<QString, QgsFeatureIds> &ids ) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define QGS_GEOMETRY_OVERLAP_CHECK_H

#include "qgsgeometrycheck.h"
#include "qgsvectorlayer.h"

class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckError
{
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutmapgridwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "qgslayout.h"
#include "qgsmapsettings.h"
#include "qgsexpressionbuilderdialog.h"
#include "qgsvectorlayer.h"

QgsLayoutMapGridWidget::QgsLayoutMapGridWidget( QgsLayoutItemMapGrid *mapGrid, QgsLayoutItemMap *map )
: QgsLayoutItemBaseWidget( nullptr, mapGrid )
Expand Down
1 change: 1 addition & 0 deletions src/app/layout/qgslayoutpagepropertieswidget.cpp