Skip to content
Permalink
Browse files

forward declaration of QgsProject

  • Loading branch information
3nids committed Oct 8, 2018
1 parent 0901a21 commit 711ec1de470a1af9351c419bd302476e950928ec
@@ -9,6 +9,7 @@




%ModuleHeaderCode
#include <qgsgraphbuilder.h>
%End
@@ -31,7 +32,8 @@ QgsGraphBuilder and QgsGraphDirector both use a "builder" design pattern
%End
public:

QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true,
double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
%Docstring
Default constructor

@@ -11,6 +11,8 @@





class QgsConfigCache : QObject
{
%Docstring
@@ -12,6 +12,7 @@




class QgsServerCacheFilter
{
%Docstring
@@ -11,6 +11,7 @@




class QgsServerCacheManager
{
%Docstring
@@ -9,6 +9,8 @@





%ModuleHeaderCode
#include "qgsserverprojectutils.h"
%End
@@ -130,6 +130,7 @@ SET(QGIS_ANALYSIS_SRCS

network/qgsgraph.cpp
network/qgsgraphbuilder.cpp
network/qgsgraphbuilderinterface.cpp
network/qgsnetworkspeedstrategy.cpp
network/qgsnetworkdistancestrategy.cpp
network/qgsvectorlayerdirector.cpp
@@ -0,0 +1,45 @@
/***************************************************************************
qgsgraphbuilderinterface.cpp
--------------------------------------
Date : 2018-10-08
Copyright : (C) 2018 Denis Rouzaud
Email : denis@opengis.ch
****************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgsgraphbuilderinterface.h"

#include "qgsproject.h"

QgsGraphBuilderInterface::QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled,
double topologyTolerance, const QString &ellipsoidID )
: mCrs( crs )
, mCtfEnabled( ctfEnabled )
, mTopologyTolerance( topologyTolerance )
{
mDa.setSourceCrs( mCrs, QgsProject::instance()->transformContext() );
mDa.setEllipsoid( ellipsoidID );
}

void QgsGraphBuilderInterface::addVertex( int id, const QgsPointXY &pt )
{
Q_UNUSED( id );
Q_UNUSED( pt );
}

void QgsGraphBuilderInterface::addEdge( int pt1id, const QgsPointXY &pt1,
int pt2id, const QgsPointXY &pt2,
const QVector<QVariant> &strategies )
{
Q_UNUSED( pt1id );
Q_UNUSED( pt1 );
Q_UNUSED( pt2id );
Q_UNUSED( pt2 );
Q_UNUSED( strategies );
}
@@ -19,12 +19,12 @@
#include <QVector>
#include <QVariant>

#include "qgspoint.h"
#include "qgsproject.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsdistancearea.h"
#include "qgis_analysis.h"

class QgsPoint;

#ifdef SIP_RUN
% ModuleHeaderCode
#include <qgsgraphbuilder.h>
@@ -58,14 +58,8 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* \param topologyTolerance sqrt distance between source point as one graph vertex
* \param ellipsoidID ellipsoid for edge measurement
*/
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" )
: mCrs( crs )
, mCtfEnabled( ctfEnabled )
, mTopologyTolerance( topologyTolerance )
{
mDa.setSourceCrs( mCrs, QgsProject::instance()->transformContext() );
mDa.setEllipsoid( ellipsoidID );
}
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true,
double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );

virtual ~QgsGraphBuilderInterface() = default;

@@ -99,11 +93,7 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* \param pt vertex coordinates
* \note id and pt are redundant. You can use pt or id to identify the vertex
*/
virtual void addVertex( int id, const QgsPointXY &pt )
{
Q_UNUSED( id );
Q_UNUSED( pt );
}
virtual void addVertex( int id, const QgsPointXY &pt );

/**
* Add edge to the graph
@@ -114,14 +104,7 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* \param strategies optimization strategies
* \note pt1id, pt1 and pt2id, pt2 is a redundant interface. You can use vertex coordinates or their identificators.
*/
virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies )
{
Q_UNUSED( pt1id );
Q_UNUSED( pt1 );
Q_UNUSED( pt2id );
Q_UNUSED( pt2 );
Q_UNUSED( strategies );
}
virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies );

private:
QgsCoordinateReferenceSystem mCrs;
@@ -35,7 +35,6 @@
#include "qgis_app.h"
#include "qgsaddattrdialog.h"
#include "qgslogger.h"
#include "qgsproject.h"
#include "qgsexpressionbuilderdialog.h"
#include "qgsfieldcalculator.h"
#include "qgsfieldexpressionwidget.h"
@@ -18,7 +18,6 @@
#define QGSHANDLEBADLAYERS_H

#include "ui_qgshandlebadlayersbase.h"
#include "qgsproject.h"
#include "qgsprojectbadlayerhandler.h"
#include "qgis_app.h"

@@ -20,6 +20,7 @@
#include "qgslayertree.h"
#include "qgslayertreemodel.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"

QgsLayerCapabilitiesModel::QgsLayerCapabilitiesModel( QgsProject *project, QObject *parent )
: QSortFilterProxyModel( parent )
@@ -19,12 +19,15 @@
#define QGSLAYERCAPABILITIESMODEL_H

#include <QObject>
#include <QSortFilterProxyModel>

#include "qgis_app.h"
#include "qgsproject.h"

class QgsLayerTreeModel;
class QgsLayerTreeNode;
class QgsProject;
class QgsMapLayer;


class APP_EXPORT QgsLayerCapabilitiesModel : public QSortFilterProxyModel
{
@@ -16,6 +16,7 @@

#include "qgssourcefieldsproperties.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"

QgsSourceFieldsProperties::QgsSourceFieldsProperties( QgsVectorLayer *layer, QWidget *parent )
: QWidget( parent )
@@ -35,7 +35,6 @@
#include "qgis_app.h"
#include "qgsaddattrdialog.h"
#include "qgslogger.h"
#include "qgsproject.h"
#include "qgsexpressionbuilderdialog.h"
#include "qgsfieldcalculator.h"

@@ -28,7 +28,9 @@

#include "qgis_server.h"
#include "qgis_sip.h"
#include "qgsproject.h"


class QgsProject;

/**
* \ingroup server
@@ -23,11 +23,12 @@
#include <QMultiMap>
#include <QDomDocument>
#include <QObject>
#include "qgsproject.h"
#include "qgsserverrequest.h"
#include "qgis_server.h"
#include "qgis_sip.h"

class QgsProject;

SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )

class QgsServerInterface;
@@ -25,10 +25,11 @@

#include <QMultiMap>
#include <QDomDocument>
#include "qgsproject.h"
#include "qgis_server.h"
#include "qgis_sip.h"

class QgsProject;

SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )

/**
@@ -16,6 +16,7 @@
***************************************************************************/

#include "qgsserverprojectutils.h"
#include "qgsproject.h"

bool QgsServerProjectUtils::owsServiceCapabilities( const QgsProject &project )
{
@@ -18,8 +18,12 @@
#ifndef QGSSERVERPROJECTUTILS_H
#define QGSSERVERPROJECTUTILS_H

#include <QString>

#include "qgis_server.h"
#include "qgsproject.h"

class QgsProject;
class QgsRectangle;

#ifdef SIP_RUN
% ModuleHeaderCode
@@ -16,17 +16,20 @@
* (at your option) any later version. *
* *
***************************************************************************/

#include <QTemporaryFile>

#include "qgswcsutils.h"
#include "qgsserverprojectutils.h"
#include "qgswcsgetcoverage.h"

#include "qgsproject.h"
#include "qgsrasterlayer.h"
#include "qgsrasterdataprovider.h"
#include "qgsrasterpipe.h"
#include "qgsrasterprojector.h"
#include "qgsrasterfilewriter.h"

#include <QTemporaryFile>

namespace QgsWcs
{
@@ -19,6 +19,8 @@
* (at your option) any later version. *
* *
***************************************************************************/


#include "qgswfsutils.h"
#include "qgsserverprojectutils.h"
#include "qgsfields.h"
@@ -31,6 +33,8 @@
#include "qgsfilterrestorer.h"
#include "qgsogcutils.h"
#include "qgswfstransaction.h"
#include "qgsproject.h"


namespace QgsWfs
{
@@ -19,12 +19,15 @@
* (at your option) any later version. *
* *
***************************************************************************/


#include "qgswfsutils.h"
#include "qgsserverprojectutils.h"
#include "qgsfields.h"
#include "qgsexpression.h"
#include "qgsgeometry.h"
#include "qgsmaplayer.h"
#include "qgsproject.h"
#include "qgsfeatureiterator.h"
#include "qgsvectordataprovider.h"
#include "qgsvectorlayer.h"
@@ -26,6 +26,7 @@
#include "qgsserverprojectutils.h"
#include "qgswfsparameters.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"

namespace QgsWfs
{
@@ -20,6 +20,7 @@

#include <QList>
#include <QDomDocument>
#include <QMap>

#include "qgsfeatureid.h"

@@ -49,6 +50,7 @@ class QgsLayerRestorer
~QgsLayerRestorer();

private:

struct QgsLayerSettings
{
QString name;
@@ -18,9 +18,11 @@
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgswmsutils.h"
#include "qgswmsdescribelayer.h"
#include "qgsserverprojectutils.h"
#include "qgsproject.h"

namespace QgsWms
{
@@ -18,14 +18,18 @@
* (at your option) any later version. *
* *
***************************************************************************/


#include "qgswmsutils.h"
#include "qgswmsgetstyles.h"
#include "qgsserverprojectutils.h"

#include "qgsproject.h"
#include "qgsrenderer.h"
#include "qgsvectorlayer.h"
#include "qgsmaplayerstylemanager.h"


namespace QgsWms
{

0 comments on commit 711ec1d

Please sign in to comment.
You can’t perform that action at this time.