2017-03-29 16:15:07 +02:00
|
|
|
/***************************************************************************
|
|
|
|
sipifyheader.h - Demo for sipify.pl
|
|
|
|
--------------------------------------
|
|
|
|
Date : 28.03.2017
|
|
|
|
Copyright : (C) 2017 Denis Rouzaud
|
|
|
|
email : denis.rouzaud@gmail.com
|
|
|
|
***************************************************************************
|
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
* *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef SIPIFYHEADER_H
|
|
|
|
#define SIPIFYHEADER_H
|
|
|
|
|
|
|
|
#include "qgis_core.h"
|
|
|
|
#include <QtClass>
|
|
|
|
|
2017-05-01 16:08:35 +02:00
|
|
|
#ifdef SIP_RUN
|
|
|
|
% ModuleHeaderCode
|
|
|
|
#include <qgsnetworkspeedstrategy.h>
|
|
|
|
#include <qgsnetworkdistancestrategy.h>
|
|
|
|
% End
|
|
|
|
#endif
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
#include "sipifyheader.h"
|
|
|
|
|
|
|
|
// one shall include qgis.h to use SIP annotations
|
|
|
|
#include "qgis.h"
|
|
|
|
|
|
|
|
class QgsForwardDeclaration;
|
|
|
|
|
|
|
|
|
2017-05-01 16:08:35 +02:00
|
|
|
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
/***************************************************************************
|
|
|
|
* This is some random block comment that will not be displayed.
|
|
|
|
* Block comments shall will placed upon class, method, enum without
|
|
|
|
* any blank lines in between.
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
// typedef have no Docstring, so commenting here will not be used
|
|
|
|
#ifdef SIP_RUN
|
|
|
|
typedef qint64 QgsFeatureId;
|
|
|
|
#else
|
|
|
|
typedef WhatEver ShouldNotBeDisplayed;
|
|
|
|
#endif
|
|
|
|
|
2017-06-01 15:39:31 +02:00
|
|
|
typedef QSet<QgsFeatureId SIP_PYALTERNATIVETYPE( qint64 )> QgsFeatureIds;
|
|
|
|
typedef QMap<QgsFeatureId SIP_PYALTERNATIVETYPE( qint64 ), QgsAttributeMap SIP_PYALTERNATIVETYPE( 'QMap<int, QVariant>' )> QgsChangedAttributesMap;
|
|
|
|
typedef QMap<QgsFeatureId, QgsAttributeMap> SIP_PYALTERNATIVETYPE( 'QMap<qint64, QMap<int, QVariant> >' ) QgsChangedAttributesMap;
|
|
|
|
typedef QMap<QgsFeatureId, QPair<QMap<Something, Complex> >> SIP_PYALTERNATIVETYPE( 'QMap<qint64, QMap<int, QVariant>>' ) QgsChangedAttributesMap;
|
2017-03-30 09:57:22 +02:00
|
|
|
|
2017-10-06 08:19:00 +10:00
|
|
|
/**
|
|
|
|
* \ingroup core
|
2017-03-29 16:15:07 +02:00
|
|
|
* A super QGIS class
|
|
|
|
*/
|
|
|
|
#ifndef SIP_RUN // following will be hidden
|
|
|
|
class CORE_EXPORT QgsSuperClass : public QtClass<QVariant>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! A constructor with definition in header
|
|
|
|
QgsSuperClass()
|
|
|
|
: QtClass<QVariant>()
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
#else // following will be displayed in generated file
|
|
|
|
typedef QVector<QVariant> QgsSuperClass;
|
|
|
|
|
|
|
|
% MappedType QgsSuperClass
|
|
|
|
{
|
|
|
|
// The annotations are modified by astyle (these will be fixed by sipify.pl)
|
|
|
|
% TypeHeaderCode
|
|
|
|
#include <qgssipifyheader.h>
|
|
|
|
% End
|
|
|
|
|
|
|
|
% ConvertFromTypeCode
|
|
|
|
// Create the list.
|
|
|
|
PyObject *l;
|
|
|
|
return l;
|
|
|
|
% End
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-10-06 08:19:00 +10:00
|
|
|
/**
|
|
|
|
* \ingroup core
|
2017-03-29 16:15:07 +02:00
|
|
|
* Documentation goes here
|
2017-04-05 10:32:27 +10:00
|
|
|
*
|
|
|
|
* Here's some comment mentioning another class QgsAutoAwesomemater::makeAwesome.
|
2017-04-02 20:52:50 +10:00
|
|
|
* \note some other note
|
2018-05-28 11:20:21 -04:00
|
|
|
* \since QGIS 3.0
|
2017-03-29 16:15:07 +02:00
|
|
|
*/
|
2017-04-05 09:54:27 +02:00
|
|
|
class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBaseClass
|
2017-03-29 16:15:07 +02:00
|
|
|
{
|
2017-04-02 12:53:31 +02:00
|
|
|
|
|
|
|
#ifdef SIP_RUN
|
|
|
|
SIP_CONVERT_TO_SUBCLASS_CODE
|
|
|
|
if ( sipCpp->headerType() == QgsSipifyHeader::Special )
|
|
|
|
sipType = sipType_QgsSpecialSipifyHeader;
|
|
|
|
else
|
|
|
|
sipType = sipType_QgsStandardSipifyHeader;
|
|
|
|
SIP_END
|
|
|
|
#endif
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
public:
|
|
|
|
//! This is an enum
|
|
|
|
enum MyEnum
|
|
|
|
{
|
|
|
|
Success = 0, //!< Edit operation was successful
|
|
|
|
NoSuccess = 1, //!< Edit operation resulted in an empty geometry
|
2017-04-03 14:09:28 +10:00
|
|
|
ImaginarySuccess = 1 << 3, //!< Edit operation resulted in an imaginary geometry
|
|
|
|
RecursiveSuccess = 1 << 4, //!< Edit operation resulted in an n-dimensional wormhole
|
2017-04-19 15:03:31 +02:00
|
|
|
SuccessCombination = Success | ImaginarySuccess, //!< Holy Graal
|
2017-06-02 12:03:19 +02:00
|
|
|
PythonName SIP_PYNAME( DifferentName ), //!< Different python name
|
2017-03-29 16:15:07 +02:00
|
|
|
};
|
2017-04-03 13:53:29 +10:00
|
|
|
Q_DECLARE_FLAGS( Flags, MyEnum )
|
2017-03-29 16:15:07 +02:00
|
|
|
|
2017-04-24 14:52:10 +02:00
|
|
|
enum OneLiner { Success, NoSuccess };
|
|
|
|
|
2017-04-04 10:37:58 +02:00
|
|
|
/**
|
|
|
|
* Docstring headers for structs are not supported by sip (as of 4.18) and
|
|
|
|
* therefore this docstring must not to be copied to the sipfile.
|
|
|
|
*/
|
|
|
|
struct Data
|
|
|
|
{
|
2017-04-19 15:49:22 +02:00
|
|
|
Data( QgsMapLayer *layer, Qstring name )
|
|
|
|
: mLayer( layer )
|
|
|
|
, mName( name )
|
|
|
|
{}
|
|
|
|
|
|
|
|
QString mName;
|
|
|
|
int mCount = 100;
|
|
|
|
QgsMapLayer *mLayer = nullptr;
|
2018-11-27 13:44:54 -04:00
|
|
|
QList<QAction *> contextMenuActions = QList<QAction *>();
|
2017-04-04 10:37:58 +02:00
|
|
|
};
|
|
|
|
|
2017-05-02 20:34:25 +02:00
|
|
|
static const int MONTHS = 60 * 60 * 24 * 30; // something
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
//! A constructor with definition in header
|
|
|
|
explicit QgsSipifyHeader()
|
|
|
|
: QtClass<QVariant>()
|
|
|
|
, QgsBaseClass()
|
|
|
|
{}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A classic constructor with arguments
|
|
|
|
*/
|
|
|
|
QgsSipifyHeader( QWidget *parent SIP_TRANSFERTHIS = nullptr );
|
|
|
|
|
2017-04-02 10:54:04 +02:00
|
|
|
//! A constructor with no empty `()`
|
|
|
|
QgsSipifyHeader( bool a = true )
|
|
|
|
: mMember( nullptr )
|
|
|
|
{}
|
|
|
|
|
|
|
|
//! A constructor with some special character types
|
|
|
|
QgsSipifyHeader( QList<Point> a, const Issues &b = Issues::weDontHaveIssues(), QgsClass *b = nullptr )
|
|
|
|
: mMember( nullptr )
|
|
|
|
{}
|
|
|
|
|
2017-04-29 17:36:40 +02:00
|
|
|
Constructor() : mHasNamedNodes( false ) {}
|
|
|
|
virtual ~Destructor() { qDeleteAll( mList ); }
|
|
|
|
|
|
|
|
Constructor( const QString &name,
|
|
|
|
bool optional = false,
|
|
|
|
const QVariant &defaultValue = QVariant() )
|
2017-04-29 16:16:17 +02:00
|
|
|
: mName( name )
|
|
|
|
, mOptional( optional )
|
|
|
|
, mDefaultValue( defaultValue )
|
|
|
|
{}
|
|
|
|
|
2017-04-02 16:21:23 +10:00
|
|
|
//! Default constructor
|
|
|
|
QgsSipifyHeader() = default;
|
|
|
|
|
2017-04-02 12:53:31 +02:00
|
|
|
//! Assignment operator should be removed in sip
|
|
|
|
QgsSipifyHeader &operator=( const QgsSipifyHeader other );
|
|
|
|
|
|
|
|
//! Comparison operator should be kept
|
|
|
|
bool operator==( const QgsSipifyHeader other );
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
//! A multiline method signature
|
2017-06-01 12:18:43 +02:00
|
|
|
void multilineMethod( const QgsPointXY &startPoint,
|
2017-03-29 16:15:07 +02:00
|
|
|
QgsFeatureId featureId,
|
|
|
|
QgsVectorLayer *vl,
|
2017-04-17 17:05:45 +08:00
|
|
|
QgsSnappingResult::SnappingType snap_to ) const;
|
2017-03-29 16:15:07 +02:00
|
|
|
|
2017-04-27 10:38:12 +02:00
|
|
|
// Adding SIP_SKIP at the end of a line will discard this line
|
2017-03-29 16:15:07 +02:00
|
|
|
bool thisShouldBeSkipped() const SIP_SKIP;
|
|
|
|
|
2017-04-17 10:49:29 +10:00
|
|
|
void nonAnnotatedMethodFollowingSkip();
|
|
|
|
|
2017-04-20 14:37:22 +02:00
|
|
|
bool myMultiLineSkipped( const QList<int, QString> &list1,
|
|
|
|
const QList<int, QString> &list2,
|
|
|
|
const QList<int, QString> &list3 ) SIP_SKIP;
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
//! Factory annotation
|
|
|
|
virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) override SIP_FACTORY;
|
|
|
|
|
2017-04-02 21:19:52 +10:00
|
|
|
SomeObject *createAnother() SIP_FACTORY { return something; }
|
|
|
|
|
2017-04-17 11:03:02 +10:00
|
|
|
SomeObject *createAnother2() override SIP_FACTORY { return something; }
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
/**
|
|
|
|
* My long doc string
|
|
|
|
* is not very interesting!
|
|
|
|
*/
|
|
|
|
void LongDocStringMethod();
|
|
|
|
|
2017-04-02 21:28:20 +10:00
|
|
|
/**
|
|
|
|
* \brief some brief
|
2017-04-03 13:14:52 +10:00
|
|
|
* My long doc \a string
|
2017-04-02 21:28:20 +10:00
|
|
|
* is not very interesting!
|
2017-04-05 10:32:27 +10:00
|
|
|
* Here's some comment mentioning another class QgsAutoAwesomemater::makeLessAwesome.
|
2017-04-02 21:28:20 +10:00
|
|
|
*/
|
|
|
|
void LongDocStringMethodWithBrief();
|
|
|
|
|
2017-04-07 09:19:34 +10:00
|
|
|
/**
|
2019-02-26 21:19:42 +10:00
|
|
|
* I return a pointer. If something bad happens, I return NULLPTR.
|
2017-04-07 11:23:53 +10:00
|
|
|
* \returns pointer to something cool
|
2017-04-07 09:19:34 +10:00
|
|
|
*/
|
|
|
|
MyPointer *pointerReturnValue();
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
bool isOKwithErrMesg( QString &ErrMsg SIP_OUT );
|
|
|
|
|
|
|
|
void InOutParam( bool &ok = true SIP_INOUT );
|
|
|
|
|
|
|
|
void setDiagramRenderer( QgsDiagramRenderer *r SIP_TRANSFER );
|
|
|
|
|
2017-04-26 11:31:56 +02:00
|
|
|
void differentDefaultValue( bool defaultValue = true SIP_PYARGDEFAULT( false ), QWidget *parent = nullptr, QString msg = QString() SIP_PYARGDEFAULT( "hello" ) );
|
2017-03-30 09:57:22 +02:00
|
|
|
|
2017-06-01 15:39:31 +02:00
|
|
|
void differentType( QList<QgsFeatureId> SIP_PYALTERNATIVETYPE( QList<qint64> ) & list );
|
2017-03-30 09:57:22 +02:00
|
|
|
|
|
|
|
//! complex default value and type (i.e. containing commas) should be given as a string with single quotes
|
2017-06-01 15:39:31 +02:00
|
|
|
void complexDefaultValueAndType( QList<QPair<QgsFeatureId SIP_PYALTERNATIVETYPE( qint64 ), QMap<int, QString>>> list = QList<QPair<QgsFeatureId, QMap<int, QString>>>() SIP_PYARGDEFAULT( 'QList<QPair<qint64, QMap<int, QString>>>()' ) );
|
2017-03-30 09:57:22 +02:00
|
|
|
|
2017-04-07 11:23:53 +10:00
|
|
|
inline int inlineKeyWordShouldNotAppear();
|
2017-03-29 16:15:07 +02:00
|
|
|
|
|
|
|
QString labelForRange( double lower, double upper ) const SIP_PYNAME( labelForLowerUpper );
|
|
|
|
|
|
|
|
void setComposition( QgsComposition *c SIP_KEEPREFERENCE );
|
|
|
|
|
|
|
|
void removeProxyFactory( QNetworkProxyFactory *factory SIP_TRANSFERBACK );
|
|
|
|
|
2017-04-26 11:04:25 +02:00
|
|
|
bool removeFunctionBody( const QList<int, QString> &list, QgsVectorLayer *vl, Some::Thing _part = -1 /*default =-1*/ ) { doSomething; return true; } // some comments
|
2017-03-29 16:15:07 +02:00
|
|
|
|
2017-04-24 14:52:10 +02:00
|
|
|
static inline QgsMapLayer *skippedMethodWithBody() SIP_SKIP
|
|
|
|
{
|
|
|
|
OhNoYouShouldnotHaveReadThis();
|
2017-04-26 07:47:58 +02:00
|
|
|
if ( ThisIsTrue() )
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
2017-04-24 14:52:10 +02:00
|
|
|
}
|
|
|
|
|
2017-04-26 11:04:25 +02:00
|
|
|
void multilineBodyAndDefinition( const QList<int,
|
|
|
|
QString> &list,
|
|
|
|
QgsVectorLayer *vl,
|
|
|
|
Some::Thing _part = -1 /*default =-1*/ )
|
|
|
|
{
|
|
|
|
doSomething;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2017-04-07 09:14:44 +10:00
|
|
|
//! Removing function body with namespaced return value
|
|
|
|
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const { return mBuildPyramidsFlag; }
|
|
|
|
|
2017-04-11 16:21:38 +10:00
|
|
|
//! Removing function body with virtual const reference
|
|
|
|
virtual const QgsLayerMetadata &metadata() const { return mMetadata; }
|
|
|
|
|
2017-04-24 16:37:23 +02:00
|
|
|
//! Mulitline body
|
|
|
|
bool myMultiLineBody()
|
|
|
|
{
|
2017-04-25 07:07:30 +02:00
|
|
|
if ( isTrue() )
|
2017-04-24 16:37:23 +02:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
bool deletedFunction() = delete; // some comments
|
|
|
|
|
2017-04-02 20:45:41 +02:00
|
|
|
virtual int overriddenProperty() override { return 42; } // if in doubt, comment it out
|
|
|
|
|
2017-04-18 11:00:13 +10:00
|
|
|
int overrideWithoutVirtual() override;
|
|
|
|
|
2017-04-20 13:58:56 +02:00
|
|
|
void overrideWithoutVirtualMultLine( const QList<int, QString> &list1,
|
|
|
|
const QList<int, QString> &list2 ) override;
|
|
|
|
|
2017-04-07 11:23:53 +10:00
|
|
|
QString returnTypeString() const;
|
|
|
|
|
|
|
|
double returnTypeDouble() const;
|
|
|
|
|
|
|
|
QList< QgsAnnotation * > returnTypeList();
|
|
|
|
|
|
|
|
QVector< QgsAnnotation > returnTypeVector();
|
|
|
|
|
|
|
|
QStringList returnTypeStringList();
|
|
|
|
|
|
|
|
QSet<QgsActionScope> returnTypeSet();
|
|
|
|
|
2017-04-08 10:06:55 +02:00
|
|
|
This<Member> shouldBeIncluded;
|
|
|
|
|
2017-04-19 11:16:09 +02:00
|
|
|
Q_INVOKABLE static QString invokableMethod();
|
|
|
|
|
2017-04-18 09:53:00 +10:00
|
|
|
bool initializedMember{ false };
|
|
|
|
|
2017-04-24 11:50:46 +02:00
|
|
|
struct CORE_EXPORT PublicStruct
|
|
|
|
{
|
2017-04-26 08:22:27 +02:00
|
|
|
explicit PublicStruct( int _part = -1, int _ring = -1, int _vertex = -1, VertexType _type = SegmentVertex )
|
|
|
|
: part( _part )
|
|
|
|
, ring( _ring )
|
|
|
|
, vertex( _vertex )
|
|
|
|
, type( _type )
|
|
|
|
{}
|
|
|
|
|
|
|
|
bool isValid( const QgsAbstractGeometry *geom ) const
|
|
|
|
{
|
|
|
|
return ( part >= 0 && part < geom->partCount() ) &&
|
|
|
|
( ring < geom->ringCount( part ) ) &&
|
|
|
|
( vertex < 0 || vertex < geom->vertexCount( part, ring ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
int part;
|
|
|
|
int ring;
|
|
|
|
int vertex;
|
|
|
|
VertexType type;
|
2017-04-24 11:50:46 +02:00
|
|
|
}
|
|
|
|
|
2017-04-30 16:52:10 +02:00
|
|
|
void combinedAnnotations() SIP_FACTORY SIP_PYNAME( otherName );
|
2017-05-04 07:36:35 +02:00
|
|
|
void multiAnnotationArg( SomeClass **object SIP_OUT SIP_TRANSFERBACK, int &another SIP_OUT );
|
2017-04-30 17:16:33 +02:00
|
|
|
|
2017-04-26 11:31:56 +02:00
|
|
|
//! remove argument
|
|
|
|
void simple( bool test SIP_PYARGREMOVE );
|
2017-07-19 10:34:46 +02:00
|
|
|
void method( bool myArg SIP_PYARGREMOVE = test );
|
2017-04-26 11:31:56 +02:00
|
|
|
void test( QgsMapLayer *vl SIP_PYARGREMOVE = nullptr );
|
|
|
|
void avoidIntersections( const QList<QgsVectorLayer *> &avoidIntersectionsLayers,
|
|
|
|
const QHash<QgsVectorLayer *, QSet<QgsFeatureId> > &ignoreFeatures SIP_PYARGREMOVE = ( QHash<QgsVectorLayer *, QSet<QgsFeatureId> >() ) );
|
|
|
|
void position( bool single_remove SIP_PYARGREMOVE );
|
|
|
|
void position( bool first_remove SIP_PYARGREMOVE, bool keep );
|
|
|
|
void position( bool keep, bool middle_remove SIP_PYARGREMOVE, bool keep );
|
|
|
|
void position( bool keep, bool last_remove SIP_PYARGREMOVE );
|
|
|
|
|
2017-06-01 15:39:31 +02:00
|
|
|
static void SIP_PYALTERNATIVETYPE( SIP_PYLIST ) changeReturnType( QVector<int> *resultTree = 0, QVector<double> &resultCost = 0 );
|
2017-05-03 07:22:30 +02:00
|
|
|
|
2017-05-01 00:13:26 +02:00
|
|
|
//! Some comment
|
|
|
|
Whatever &operator[]( int i ) SIP_FACTORY;
|
|
|
|
#ifdef SIP_RUN
|
2017-04-30 16:52:10 +02:00
|
|
|
% MethodCode
|
2017-05-01 00:13:26 +02:00
|
|
|
....
|
2017-04-30 16:52:10 +02:00
|
|
|
% End
|
2017-05-01 00:13:26 +02:00
|
|
|
#endif
|
|
|
|
|
2017-04-26 07:47:58 +02:00
|
|
|
#if 0
|
|
|
|
#if Whatever
|
|
|
|
void X();
|
|
|
|
#else
|
|
|
|
void Y();
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
void ZshouldBeShown();
|
|
|
|
#endif
|
|
|
|
|
2017-04-27 10:38:12 +02:00
|
|
|
void methodCodeWithMultiLineDef();
|
|
|
|
#ifdef SIP_RUN
|
|
|
|
% MethodCode
|
|
|
|
if ( QgsWkbTypes::flatType( a0 ) != QgsWkbTypes::Point )
|
|
|
|
{
|
|
|
|
multiLineDef( PyExc_ValueError,
|
|
|
|
QString( "%1 is not nice" ).arg( QgsWkbTypes::displayString( a0 ) ).toUtf8().constData() );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-06-01 12:18:43 +02:00
|
|
|
sipCpp = new sipQgsPoint( a0, a1, a2, a3, a4 );
|
2017-04-27 10:38:12 +02:00
|
|
|
}
|
|
|
|
% End
|
|
|
|
#endif
|
2017-04-26 07:47:58 +02:00
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
protected:
|
|
|
|
bool thisShouldBeListed();
|
|
|
|
|
2017-04-05 09:46:14 +02:00
|
|
|
Whatever skipMember;
|
|
|
|
Whatever::Something *alsoSkipMember = nullptr;
|
2017-04-10 17:00:12 +10:00
|
|
|
mutable Whatever alsoSkipThis;
|
2017-04-08 10:06:55 +02:00
|
|
|
Some<Other> memberToSkip;
|
2017-04-19 15:18:54 +02:00
|
|
|
QList<QgsMapLayer *> list2skip;
|
|
|
|
QMap<QString, Qt::CheckState> map2skip;
|
2017-05-16 08:39:03 +02:00
|
|
|
FilterType mFilter = FilterNone;
|
|
|
|
QgsFeatureId mFilterFid = -1;
|
|
|
|
QgsFeatureIds mFilterFids;
|
|
|
|
std::unique_ptr< QgsExpression > mFilterExpression;
|
|
|
|
long mLimit = -1;
|
|
|
|
InvalidGeometryCheck mInvalidGeometryFilter = GeometryNoCheck;
|
|
|
|
std::function< void( const QgsFeature & ) > mInvalidGeometryCallback;
|
|
|
|
static QHash<QString, Help> sFunctionHelpTexts;
|
|
|
|
friend class QgsOgcUtils;
|
|
|
|
template<typename> friend class QgsAbstractFeatureIteratorFromSource;
|
|
|
|
const QgsAbstractGeometry *mGeometry = 0;
|
|
|
|
mutable unsigned char *mP;
|
2017-04-05 09:46:14 +02:00
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
private:
|
|
|
|
void privateMethodAreNotShown();
|
|
|
|
#ifdef SIP_RUN
|
|
|
|
void privateMethodSIPRUNareShown();
|
|
|
|
#endif
|
|
|
|
public:
|
|
|
|
void FallBackToPublic();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void PrivateAgain();
|
2017-04-07 08:50:57 +02:00
|
|
|
/* Single line block comments shouldn't break the parser */
|
2017-03-29 16:15:07 +02:00
|
|
|
|
2017-04-24 08:48:12 +02:00
|
|
|
void ShowThisPrivateOne() SIP_FORCE;
|
|
|
|
|
2017-04-03 08:38:23 +02:00
|
|
|
struct ProcessFeatureWrapper
|
|
|
|
{
|
|
|
|
QgsGeometrySnapper *instance = nullptr;
|
|
|
|
double snapTolerance;
|
|
|
|
SnapMode mode;
|
|
|
|
explicit ProcessFeatureWrapper( QgsGeometrySnapper *_instance, double snapTolerance, SnapMode mode )
|
|
|
|
: instance( _instance )
|
|
|
|
, snapTolerance( snapTolerance )
|
|
|
|
, mode( mode )
|
|
|
|
{}
|
|
|
|
void operator()( QgsFeature &feature ) { return instance->processFeature( feature, snapTolerance, mode ); }
|
|
|
|
};
|
|
|
|
|
|
|
|
enum PointFlag { SnappedToRefNode, SnappedToRefSegment, Unsnapped };
|
2017-03-29 16:15:07 +02:00
|
|
|
};
|
|
|
|
|
2017-04-02 20:30:22 +10:00
|
|
|
/**
|
|
|
|
* \class ClassWithPrivateInheritanceOnly
|
|
|
|
* \ingroup core
|
|
|
|
* Documentation goes here
|
|
|
|
*/
|
2017-05-08 07:34:37 +02:00
|
|
|
class CORE_EXPORT ClassWithPrivateInheritanceOnly : private QgsBaseClass SIP_ABSTRACT
|
2017-03-29 16:15:07 +02:00
|
|
|
{
|
2017-04-07 10:36:40 +02:00
|
|
|
public:
|
2017-03-29 16:15:07 +02:00
|
|
|
//! A constructor with definition in header on several lines
|
|
|
|
explicit ClassWithPrivateInheritanceOnly()
|
|
|
|
: QtClass<QVariant>()
|
|
|
|
, QgsBaseClass()
|
|
|
|
{
|
|
|
|
doWhatYouLike();
|
|
|
|
haveFun();
|
|
|
|
}
|
2017-04-07 10:36:40 +02:00
|
|
|
};
|
2017-03-29 16:15:07 +02:00
|
|
|
|
2017-04-05 14:14:25 +02:00
|
|
|
/**
|
|
|
|
* \class AbstractClass
|
|
|
|
* \ingroup core
|
|
|
|
* Documentation goes here
|
|
|
|
*/
|
2017-04-17 10:49:29 +10:00
|
|
|
|
2017-04-05 14:14:25 +02:00
|
|
|
class CORE_EXPORT AbstractClass SIP_ABSTRACT
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! A constructor
|
|
|
|
explicit AbstractClass()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This method should be overridden by subclasses but not exposed to the public
|
|
|
|
* or protected API.
|
|
|
|
*/
|
|
|
|
virtual QString reason() = 0;
|
2017-04-08 08:18:08 +02:00
|
|
|
};
|
2017-04-05 14:14:25 +02:00
|
|
|
|
2017-04-03 13:53:29 +10:00
|
|
|
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsSipifyHeader::Flags )
|
|
|
|
|
2017-05-16 08:39:03 +02:00
|
|
|
class CORE_EXPORT TemplateInheritance1 : public QgsTemplate<Something>
|
|
|
|
{
|
|
|
|
}
|
2017-05-18 14:16:42 +02:00
|
|
|
class CORE_EXPORT TemplateInheritance2 : public QList<Something>, private SomethingElse
|
2017-05-16 08:39:03 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
class CORE_EXPORT TemplateInheritance3 : public QgsTemplate<Something>, public SomethingElse
|
|
|
|
{
|
|
|
|
}
|
2017-05-18 14:16:42 +02:00
|
|
|
class CORE_EXPORT TemplateInheritance4 : public SomethingElse1, public QList<Something>, public SomethingElse2
|
2017-05-16 08:39:03 +02:00
|
|
|
{
|
|
|
|
}
|
2017-05-18 14:16:42 +02:00
|
|
|
class CORE_EXPORT TemplateInheritance5 : public SomethingElse, public QList<Something>
|
2017-05-16 08:39:03 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-03-29 16:15:07 +02:00
|
|
|
|
|
|
|
#endif
|