mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Merge pull request #9128 from m-kuhn/todo-qgis-4
Move QGIS 3 todos to QGIS 4
This commit is contained in:
commit
09407c1258
@ -499,7 +499,22 @@ In case of error -1 will be returned.
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
|
||||
QgsPointXY closestVertex( const QgsPointXY &point, int &atVertex /Out/, int &beforeVertex /Out/, int &afterVertex /Out/, double &sqrDist /Out/ ) const;
|
||||
%Docstring
|
||||
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
|
||||
and the indices of the vertices before and after the closest vertex.
|
||||
|
||||
:param point: point to search for
|
||||
:param beforeVertex: will be set to the vertex index of the previous vertex from the closest one. Will be set to -1 if
|
||||
not present.
|
||||
:param afterVertex: will be set to the vertex index of the next vertex after the closest one. Will be set to -1 if
|
||||
not present.
|
||||
:param sqrDist: will be set to the square distance between the closest vertex and the specified point
|
||||
|
||||
:return: - closest point in geometry. If not found (empty geometry), returns null point nad sqrDist is negative.
|
||||
- atVertex: will be set to the vertex index of the closest found vertex
|
||||
%End
|
||||
|
||||
double distanceToVertex( int vertex ) const;
|
||||
%Docstring
|
||||
|
@ -175,6 +175,7 @@ Constructs an invalid CRS object
|
||||
|
||||
~QgsCoordinateReferenceSystem();
|
||||
|
||||
|
||||
explicit QgsCoordinateReferenceSystem( const QString &definition );
|
||||
%Docstring
|
||||
Constructs a CRS object from a string definition using createFromString()
|
||||
@ -191,9 +192,9 @@ If no prefix is specified, WKT definition is assumed.
|
||||
:param definition: A String containing a coordinate reference system definition.
|
||||
|
||||
.. seealso:: :py:func:`createFromString`
|
||||
/ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
||||
%End
|
||||
|
||||
|
||||
explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );
|
||||
%Docstring
|
||||
Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS CRS ID.
|
||||
@ -205,7 +206,6 @@ Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS
|
||||
|
||||
:param id: The ID valid for the chosen CRS ID type
|
||||
:param type: One of the types described in CrsType
|
||||
/ // TODO QGIS 3: remove type and always use EPSG code
|
||||
%End
|
||||
|
||||
QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs );
|
||||
@ -294,6 +294,7 @@ Creates a CRS from a specified QGIS SRS ID.
|
||||
%End
|
||||
|
||||
|
||||
|
||||
bool createFromId( long id, CrsType type = PostgisCrsId );
|
||||
%Docstring
|
||||
Sets this CRS by lookup of the given ID in the CRS database.
|
||||
@ -304,9 +305,9 @@ Sets this CRS by lookup of the given ID in the CRS database.
|
||||
|
||||
We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
|
||||
wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
||||
/ // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
|
||||
%End
|
||||
|
||||
|
||||
bool createFromOgcWmsCrs( const QString &crs );
|
||||
%Docstring
|
||||
Sets this CRS to the given OGC WMS-format Coordinate Reference Systems.
|
||||
@ -322,9 +323,9 @@ and refer to QGIS internal CRS IDs.
|
||||
this method uses an internal cache. Call invalidateCache() to clear the cache.
|
||||
|
||||
.. seealso:: :py:func:`fromOgcWmsCrs`
|
||||
/ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
||||
%End
|
||||
|
||||
|
||||
bool createFromSrid( long srid );
|
||||
%Docstring
|
||||
Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
|
||||
@ -332,7 +333,6 @@ Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
|
||||
:param srid: The PostGIS SRID for the desired spatial reference system.
|
||||
|
||||
:return: True on success else false
|
||||
/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
||||
%End
|
||||
|
||||
bool createFromWkt( const QString &wkt );
|
||||
@ -489,6 +489,7 @@ if that involves resorting to a hard coded default of geocs:wgs84.
|
||||
.. seealso:: :py:func:`setCustomCrsValidation`
|
||||
%End
|
||||
|
||||
|
||||
long findMatchingProj();
|
||||
%Docstring
|
||||
Walks the CRS databases (both system and user database) trying to match
|
||||
@ -500,7 +501,6 @@ pieces of information about CRS.
|
||||
The ellipsoid and projection acronyms must be set as well as the proj4string!
|
||||
|
||||
:return: long the SrsId of the matched CRS, zero if no match was found
|
||||
/ // TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
||||
%End
|
||||
|
||||
bool operator==( const QgsCoordinateReferenceSystem &srs ) const;
|
||||
@ -538,12 +538,12 @@ Returns the internal CRS ID, if available.
|
||||
:return: the internal sqlite3 srs.db primary key for this CRS
|
||||
%End
|
||||
|
||||
|
||||
long postgisSrid() const;
|
||||
%Docstring
|
||||
Returns PostGIS SRID for the CRS.
|
||||
|
||||
:return: the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
|
||||
/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
||||
%End
|
||||
|
||||
QString authid() const;
|
||||
|
@ -54,6 +54,7 @@ class QgsPalLayerSettings
|
||||
~QgsPalLayerSettings();
|
||||
|
||||
|
||||
|
||||
enum Placement
|
||||
{
|
||||
AroundPoint,
|
||||
@ -82,12 +83,14 @@ class QgsPalLayerSettings
|
||||
BottomRight,
|
||||
};
|
||||
|
||||
|
||||
enum OffsetType
|
||||
{
|
||||
FromPoint,
|
||||
FromSymbolBounds,
|
||||
};
|
||||
|
||||
|
||||
enum LinePlacementFlags
|
||||
{
|
||||
OnLine,
|
||||
@ -131,6 +134,7 @@ class QgsPalLayerSettings
|
||||
MultiFollowPlacement
|
||||
};
|
||||
|
||||
|
||||
enum ObstacleType
|
||||
{
|
||||
PolygonInterior,
|
||||
|
@ -844,7 +844,24 @@ of any layers these layers will also be deleted.
|
||||
.. versionadded:: 1.8
|
||||
%End
|
||||
|
||||
|
||||
void removeMapLayers( const QList<QgsMapLayer *> &layers );
|
||||
%Docstring
|
||||
Remove a set of layers from the registry.
|
||||
|
||||
The specified layers will be removed from the registry. If the registry has ownership
|
||||
of any layers these layers will also be deleted.
|
||||
|
||||
:param layers: A list of layers to remove. Null pointers are ignored.
|
||||
|
||||
.. note::
|
||||
|
||||
As a side-effect the QgsProject instance is marked dirty.
|
||||
|
||||
.. seealso:: :py:func:`removeMapLayer`
|
||||
|
||||
.. seealso:: :py:func:`removeAllMapLayers`
|
||||
%End
|
||||
|
||||
void removeMapLayer( const QString &layerId );
|
||||
%Docstring
|
||||
@ -1323,7 +1340,14 @@ Emitted after a layer was removed from the registry.
|
||||
.. seealso:: :py:func:`layerWillBeRemoved`
|
||||
%End
|
||||
|
||||
|
||||
void removeAll();
|
||||
%Docstring
|
||||
Emitted when all layers are removed, before layersWillBeRemoved() and
|
||||
layerWillBeRemoved() signals are emitted. The layersWillBeRemoved() and
|
||||
layerWillBeRemoved() signals will still be emitted following this signal.
|
||||
You can use this signal to do easy (and fast) cleanup.
|
||||
%End
|
||||
|
||||
void layersAdded( const QList<QgsMapLayer *> &layers );
|
||||
%Docstring
|
||||
|
@ -27,6 +27,7 @@ in your application.
|
||||
public:
|
||||
QgsVectorLayerTools();
|
||||
|
||||
|
||||
virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature /Out/ = 0 ) const = 0;
|
||||
%Docstring
|
||||
This method should/will be called, whenever a new feature will be added to the layer
|
||||
@ -37,10 +38,9 @@ This method should/will be called, whenever a new feature will be added to the l
|
||||
|
||||
:return: - True in case of success, False if the operation failed/was aborted
|
||||
- feature: Updated feature after adding will be written back to this
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
%End
|
||||
|
||||
|
||||
virtual bool startEditing( QgsVectorLayer *layer ) const = 0;
|
||||
%Docstring
|
||||
This will be called, whenever a vector layer should be switched to edit mode. Check the providers
|
||||
@ -50,10 +50,9 @@ If successful layer->startEditing() will be called and true returned.
|
||||
:param layer: The layer on which to start an edit session
|
||||
|
||||
:return: True, if the editing session was started
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
%End
|
||||
|
||||
|
||||
virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;
|
||||
%Docstring
|
||||
Will be called, when an editing session is ended and the features should be committed.
|
||||
@ -63,10 +62,9 @@ Appropriate dialogs should be shown like
|
||||
:param allowCancel: True if a cancel button should be offered
|
||||
|
||||
:return: True if successful
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
%End
|
||||
|
||||
|
||||
virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;
|
||||
%Docstring
|
||||
Should be called, when the features should be committed but the editing session is not ended.
|
||||
@ -74,10 +72,9 @@ Should be called, when the features should be committed but the editing session
|
||||
:param layer: The layer to commit
|
||||
|
||||
:return: True if successful
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
%End
|
||||
|
||||
|
||||
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request /In,Out/, double dx = 0, double dy = 0, QString *errorMsg /Out/ = 0 ) const;
|
||||
%Docstring
|
||||
Copy and move features with defined translation.
|
||||
@ -89,8 +86,6 @@ Copy and move features with defined translation.
|
||||
|
||||
:return: - True if all features could be copied.
|
||||
- errorMsg: If given, it will contain the error message
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
%End
|
||||
|
||||
};
|
||||
|
@ -215,7 +215,11 @@ to dynamically adjust it.
|
||||
:param request: The request to use to fill this table model.
|
||||
%End
|
||||
|
||||
|
||||
const QgsFeatureRequest &request() const;
|
||||
%Docstring
|
||||
Gets the the feature request
|
||||
%End
|
||||
|
||||
void setEditorContext( const QgsAttributeEditorContext &context );
|
||||
%Docstring
|
||||
|
@ -44,11 +44,32 @@ class QgsAttributeForm : QWidget
|
||||
|
||||
const QgsFeature &feature();
|
||||
|
||||
|
||||
void hideButtonBox();
|
||||
%Docstring
|
||||
Hides the button box (OK/Cancel) and enables auto-commit
|
||||
|
||||
.. note::
|
||||
|
||||
set Embed in QgsAttributeEditorContext in constructor instead
|
||||
%End
|
||||
|
||||
|
||||
void showButtonBox();
|
||||
%Docstring
|
||||
Shows the button box (OK/Cancel) and disables auto-commit
|
||||
|
||||
.. note::
|
||||
|
||||
set Embed in QgsAttributeEditorContext in constructor instead
|
||||
%End
|
||||
|
||||
|
||||
void disconnectButtonBox();
|
||||
%Docstring
|
||||
Disconnects the button box (OK/Cancel) from the accept/resetValues slots
|
||||
If this method is called, you have to create these connections from outside
|
||||
%End
|
||||
|
||||
void addInterface( QgsAttributeFormInterface *iface /Transfer/ );
|
||||
%Docstring
|
||||
|
@ -96,11 +96,45 @@ convenient method to clean members
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
int nextPoint( const QgsPoint &mapPoint, QgsPoint &layerPoint );
|
||||
%Docstring
|
||||
Converts a map point to layer coordinates
|
||||
|
||||
:param mapPoint: the point in map coordinates
|
||||
\param[in,out] layerPoint the point in layer coordinates
|
||||
|
||||
:return:
|
||||
0 in case of success
|
||||
1 if the current layer is null or not a vector layer
|
||||
2 if the transformation failed
|
||||
%End
|
||||
|
||||
|
||||
int nextPoint( QPoint p, QgsPoint &layerPoint, QgsPoint &mapPoint );
|
||||
%Docstring
|
||||
Converts a point to map coordinates and layer coordinates
|
||||
|
||||
:param p: the input point
|
||||
\param[in,out] layerPoint the point in layer coordinates
|
||||
\param[in,out] mapPoint the point in map coordinates
|
||||
|
||||
:return:
|
||||
0 in case of success
|
||||
1 if the current layer is null or not a vector layer
|
||||
2 if the transformation failed
|
||||
%End
|
||||
|
||||
|
||||
int fetchLayerPoint( const QgsPointLocator::Match &match, QgsPoint &layerPoint );
|
||||
%Docstring
|
||||
Fetches the original point from the source layer if it has the same
|
||||
CRS as the current layer.
|
||||
|
||||
:return: 0 in case of success, 1 if not applicable (CRS mismatch), 2 in case of failure
|
||||
|
||||
.. versionadded:: 2.14
|
||||
%End
|
||||
|
||||
QgsPoint mapPoint( const QgsMapMouseEvent &e ) const;
|
||||
%Docstring
|
||||
@ -129,7 +163,13 @@ WkbType of the current layer).
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
|
||||
int addVertex( const QgsPointXY &point );
|
||||
%Docstring
|
||||
Adds a point to the rubber band (in map coordinates) and to the capture list (in layer coordinates)
|
||||
|
||||
:return: 0 in case of success, 1 if current layer is not a vector layer, 2 if coordinate transformation failed
|
||||
%End
|
||||
|
||||
int addVertex( const QgsPointXY &mapPoint, const QgsPointLocator::Match &match );
|
||||
%Docstring
|
||||
|
@ -576,6 +576,8 @@ class CORE_EXPORT QgsGeometry
|
||||
*/
|
||||
double hausdorffDistanceDensify( const QgsGeometry &geom, double densifyFraction ) const;
|
||||
|
||||
//TODO QGIS 4.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
|
||||
|
||||
/**
|
||||
* Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
|
||||
* and the indices of the vertices before and after the closest vertex.
|
||||
@ -588,7 +590,6 @@ class CORE_EXPORT QgsGeometry
|
||||
* \param sqrDist will be set to the square distance between the closest vertex and the specified point
|
||||
* \returns closest point in geometry. If not found (empty geometry), returns null point nad sqrDist is negative.
|
||||
*/
|
||||
//TODO QGIS 3.0 - rename beforeVertex to previousVertex, afterVertex to nextVertex
|
||||
QgsPointXY closestVertex( const QgsPointXY &point, int &atVertex SIP_OUT, int &beforeVertex SIP_OUT, int &afterVertex SIP_OUT, double &sqrDist SIP_OUT ) const;
|
||||
|
||||
/**
|
||||
|
@ -210,6 +210,8 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
|
||||
~QgsCoordinateReferenceSystem();
|
||||
|
||||
// TODO QGIS 4: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
||||
|
||||
/**
|
||||
* Constructs a CRS object from a string definition using createFromString()
|
||||
*
|
||||
@ -223,16 +225,18 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
* If no prefix is specified, WKT definition is assumed.
|
||||
* \param definition A String containing a coordinate reference system definition.
|
||||
* \see createFromString()
|
||||
*/ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
||||
*/
|
||||
explicit QgsCoordinateReferenceSystem( const QString &definition );
|
||||
|
||||
// TODO QGIS 4: remove type and always use EPSG code
|
||||
|
||||
/**
|
||||
* Constructor a CRS object using a PostGIS SRID, an EPSG code or an internal QGIS CRS ID.
|
||||
* \note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
|
||||
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
||||
* \param id The ID valid for the chosen CRS ID type
|
||||
* \param type One of the types described in CrsType
|
||||
*/ // TODO QGIS 3: remove type and always use EPSG code
|
||||
*/
|
||||
explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );
|
||||
|
||||
//! Copy constructor
|
||||
@ -305,14 +309,18 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
|
||||
// Misc helper functions -----------------------
|
||||
|
||||
// TODO QGIS 4: remove type and always use EPSG code, rename to createFromEpsg
|
||||
|
||||
/**
|
||||
* Sets this CRS by lookup of the given ID in the CRS database.
|
||||
* \returns True on success else false
|
||||
* \note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code
|
||||
* wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile.
|
||||
*/ // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg
|
||||
*/
|
||||
bool createFromId( long id, CrsType type = PostgisCrsId );
|
||||
|
||||
// TODO QGIS 4: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
||||
|
||||
/**
|
||||
* Sets this CRS to the given OGC WMS-format Coordinate Reference Systems.
|
||||
*
|
||||
@ -322,14 +330,16 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
* \returns True on success else false
|
||||
* \note this method uses an internal cache. Call invalidateCache() to clear the cache.
|
||||
* \see fromOgcWmsCrs()
|
||||
*/ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
||||
*/
|
||||
bool createFromOgcWmsCrs( const QString &crs );
|
||||
|
||||
// TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
|
||||
|
||||
/**
|
||||
* Sets this CRS by lookup of the given PostGIS SRID in the CRS database.
|
||||
* \param srid The PostGIS SRID for the desired spatial reference system.
|
||||
* \returns True on success else false
|
||||
*/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
||||
*/
|
||||
bool createFromSrid( long srid );
|
||||
|
||||
/**
|
||||
@ -444,13 +454,15 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
*/
|
||||
void validate();
|
||||
|
||||
// TODO QGIS 4: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
||||
|
||||
/**
|
||||
* Walks the CRS databases (both system and user database) trying to match
|
||||
* stored PROJ string to a database entry in order to fill in further
|
||||
* pieces of information about CRS.
|
||||
* \note The ellipsoid and projection acronyms must be set as well as the proj4string!
|
||||
* \returns long the SrsId of the matched CRS, zero if no match was found
|
||||
*/ // TODO QGIS 3: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
||||
*/
|
||||
long findMatchingProj();
|
||||
|
||||
/**
|
||||
@ -504,10 +516,12 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
*/
|
||||
long srsid() const;
|
||||
|
||||
// TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
|
||||
|
||||
/**
|
||||
* Returns PostGIS SRID for the CRS.
|
||||
* \returns the PostGIS spatial_ref_sys identifier for this CRS (defaults to 0)
|
||||
*/ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead
|
||||
*/
|
||||
long postgisSrid() const;
|
||||
|
||||
/**
|
||||
|
@ -129,10 +129,11 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
//! copy operator - only copies the permanent members
|
||||
QgsPalLayerSettings &operator=( const QgsPalLayerSettings &s );
|
||||
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine
|
||||
|
||||
/**
|
||||
* Placement modes which determine how label candidates are generated for a feature.
|
||||
*/
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine
|
||||
enum Placement
|
||||
{
|
||||
AroundPoint, //!< Arranges candidates in a circle around a point (or centroid of a polygon). Applies to point or polygon layers only.
|
||||
@ -145,8 +146,8 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
PerimeterCurved, //! Arranges candidates following the curvature of a polygon's boundary. Applies to polygon layers only.
|
||||
};
|
||||
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine
|
||||
//! Positions for labels when using the QgsPalLabeling::OrderedPositionsAroundPoint placement mode
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine
|
||||
enum PredefinedPointPosition
|
||||
{
|
||||
TopLeft, //!< Label on top-left of point
|
||||
@ -163,22 +164,24 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
BottomRight, //!< Label on bottom right of point
|
||||
};
|
||||
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine
|
||||
|
||||
/**
|
||||
* Behavior modifier for label offset and distance, only applies in some
|
||||
* label placement modes.
|
||||
*/
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine
|
||||
enum OffsetType
|
||||
{
|
||||
FromPoint, //!< Offset distance applies from point geometry
|
||||
FromSymbolBounds, //!< Offset distance applies from rendered symbol bounds
|
||||
};
|
||||
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine, rename to LinePlacementFlag, use Q_DECLARE_FLAGS to make
|
||||
//LinePlacementFlags type, and replace use of pal::LineArrangementFlag
|
||||
|
||||
/**
|
||||
* Line placement flags, which control how candidates are generated for a linear feature.
|
||||
*/
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine, rename to LinePlacementFlag, use Q_DECLARE_FLAGS to make
|
||||
//LinePlacementFlags type, and replace use of pal::LineArrangementFlag
|
||||
enum LinePlacementFlags
|
||||
{
|
||||
OnLine = 1, //!< Labels can be placed directly over a line feature.
|
||||
@ -229,11 +232,12 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
will be drawn with right alignment*/
|
||||
};
|
||||
|
||||
//TODO QGIS 4.0 - Move to QgsLabelingEngine
|
||||
|
||||
/**
|
||||
* Valid obstacle types, which affect how features within the layer will act as obstacles
|
||||
* for labels.
|
||||
*/
|
||||
//TODO QGIS 3.0 - Move to QgsLabelingEngine
|
||||
enum ObstacleType
|
||||
{
|
||||
PolygonInterior, /*!< avoid placing labels over interior of polygon (prefer placing labels totally
|
||||
|
@ -846,6 +846,8 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
*/
|
||||
void removeMapLayers( const QStringList &layerIds );
|
||||
|
||||
//TODO QGIS 4.0 - add PyName alias to avoid list type conversion error
|
||||
|
||||
/**
|
||||
* \brief
|
||||
* Remove a set of layers from the registry.
|
||||
@ -859,7 +861,6 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
* \see removeMapLayer()
|
||||
* \see removeAllMapLayers()
|
||||
*/
|
||||
//TODO QGIS 3.0 - add PyName alias to avoid list type conversion error
|
||||
void removeMapLayers( const QList<QgsMapLayer *> &layers );
|
||||
|
||||
/**
|
||||
@ -1279,13 +1280,14 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
*/
|
||||
void layerRemoved( const QString &layerId );
|
||||
|
||||
//TODO QGIS 4.0 - rename to past tense
|
||||
|
||||
/**
|
||||
* Emitted when all layers are removed, before layersWillBeRemoved() and
|
||||
* layerWillBeRemoved() signals are emitted. The layersWillBeRemoved() and
|
||||
* layerWillBeRemoved() signals will still be emitted following this signal.
|
||||
* You can use this signal to do easy (and fast) cleanup.
|
||||
*/
|
||||
//TODO QGIS 3.0 - rename to past tense
|
||||
void removeAll();
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,8 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
public:
|
||||
QgsVectorLayerTools();
|
||||
|
||||
// TODO QGIS 4: remove const qualifier
|
||||
|
||||
/**
|
||||
* This method should/will be called, whenever a new feature will be added to the layer
|
||||
*
|
||||
@ -52,10 +54,11 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
* \param feature Updated feature after adding will be written back to this
|
||||
* \returns True in case of success, False if the operation failed/was aborted
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
*/
|
||||
virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature SIP_OUT = nullptr ) const = 0;
|
||||
|
||||
// TODO QGIS 4: remove const qualifier
|
||||
|
||||
/**
|
||||
* This will be called, whenever a vector layer should be switched to edit mode. Check the providers
|
||||
* capability to edit in here.
|
||||
@ -65,10 +68,11 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
*
|
||||
* \returns True, if the editing session was started
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
*/
|
||||
virtual bool startEditing( QgsVectorLayer *layer ) const = 0;
|
||||
|
||||
// TODO QGIS 4: remove const qualifier
|
||||
|
||||
/**
|
||||
* Will be called, when an editing session is ended and the features should be committed.
|
||||
* Appropriate dialogs should be shown like
|
||||
@ -77,20 +81,22 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
* \param allowCancel True if a cancel button should be offered
|
||||
* \returns True if successful
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
*/
|
||||
virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;
|
||||
|
||||
// TODO QGIS 4: remove const qualifier
|
||||
|
||||
/**
|
||||
* Should be called, when the features should be committed but the editing session is not ended.
|
||||
*
|
||||
* \param layer The layer to commit
|
||||
* \returns True if successful
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
*/
|
||||
virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;
|
||||
|
||||
// TODO QGIS 4: remove const qualifier
|
||||
|
||||
/**
|
||||
* Copy and move features with defined translation.
|
||||
*
|
||||
@ -101,7 +107,6 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
* \param errorMsg If given, it will contain the error message
|
||||
* \returns True if all features could be copied.
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
*/
|
||||
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request SIP_INOUT, double dx = 0, double dy = 0, QString *errorMsg SIP_OUT = nullptr ) const;
|
||||
|
||||
|
@ -221,10 +221,11 @@ class GUI_EXPORT QgsAttributeTableModel: public QAbstractTableModel
|
||||
*/
|
||||
void setRequest( const QgsFeatureRequest &request );
|
||||
|
||||
// TODO QGIS 4: return copy instead of reference
|
||||
|
||||
/**
|
||||
* Gets the the feature request
|
||||
*/
|
||||
// TODO QGIS 3: return copy instead of reference
|
||||
const QgsFeatureRequest &request() const;
|
||||
|
||||
/**
|
||||
|
@ -179,7 +179,7 @@ class GUI_EXPORT QgsSearchWidgetWrapper : public QgsWidgetWrapper
|
||||
* \returns filter expression
|
||||
* \since QGIS 2.16
|
||||
*/
|
||||
// TODO QGIS 3.0 - make pure virtual
|
||||
// TODO QGIS 4.0 - make pure virtual
|
||||
virtual QString createExpression( FilterFlags flags ) const { Q_UNUSED( flags ); return QStringLiteral( "TRUE" ); }
|
||||
|
||||
/**
|
||||
|
@ -74,25 +74,28 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
|
||||
|
||||
const QgsFeature &feature() { return mFeature; }
|
||||
|
||||
// TODO QGIS 4.0 - make private
|
||||
|
||||
/**
|
||||
* Hides the button box (OK/Cancel) and enables auto-commit
|
||||
* \note set Embed in QgsAttributeEditorContext in constructor instead
|
||||
*/
|
||||
// TODO QGIS 3.0 - make private
|
||||
void hideButtonBox();
|
||||
|
||||
// TODO QGIS 4.0 - make private
|
||||
|
||||
/**
|
||||
* Shows the button box (OK/Cancel) and disables auto-commit
|
||||
* \note set Embed in QgsAttributeEditorContext in constructor instead
|
||||
*/
|
||||
// TODO QGIS 3.0 - make private
|
||||
void showButtonBox();
|
||||
|
||||
// TODO QGIS 4.0 - make private
|
||||
|
||||
/**
|
||||
* Disconnects the button box (OK/Cancel) from the accept/resetValues slots
|
||||
* If this method is called, you have to create these connections from outside
|
||||
*/
|
||||
// TODO QGIS 3.0 - make private
|
||||
void disconnectButtonBox();
|
||||
|
||||
/**
|
||||
|
@ -76,7 +76,7 @@ email : sherman at mrcc.com
|
||||
* Deprecated to be deleted, stuff from here should be moved elsewhere.
|
||||
* \note not available in Python bindings
|
||||
*/
|
||||
//TODO QGIS 3.0 - remove
|
||||
//TODO QGIS 4.0 - remove
|
||||
class QgsMapCanvas::CanvasProperties
|
||||
{
|
||||
public:
|
||||
|
@ -112,6 +112,8 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
|
||||
|
||||
protected:
|
||||
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
|
||||
/**
|
||||
* Converts a map point to layer coordinates
|
||||
* \param mapPoint the point in map coordinates
|
||||
@ -121,9 +123,10 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
|
||||
* 1 if the current layer is null or not a vector layer
|
||||
* 2 if the transformation failed
|
||||
*/
|
||||
// TODO QGIS 3.0 returns an enum instead of a magic constant
|
||||
int nextPoint( const QgsPoint &mapPoint, QgsPoint &layerPoint );
|
||||
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
|
||||
/**
|
||||
* Converts a point to map coordinates and layer coordinates
|
||||
* \param p the input point
|
||||
@ -134,16 +137,16 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
|
||||
* 1 if the current layer is null or not a vector layer
|
||||
* 2 if the transformation failed
|
||||
*/
|
||||
// TODO QGIS 3.0 returns an enum instead of a magic constant
|
||||
int nextPoint( QPoint p, QgsPoint &layerPoint, QgsPoint &mapPoint );
|
||||
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
|
||||
/**
|
||||
* Fetches the original point from the source layer if it has the same
|
||||
* CRS as the current layer.
|
||||
* \returns 0 in case of success, 1 if not applicable (CRS mismatch), 2 in case of failure
|
||||
* \since QGIS 2.14
|
||||
*/
|
||||
// TODO QGIS 3.0 returns an enum instead of a magic constant
|
||||
int fetchLayerPoint( const QgsPointLocator::Match &match, QgsPoint &layerPoint );
|
||||
|
||||
/**
|
||||
@ -171,11 +174,12 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
|
||||
*/
|
||||
QgsPoint mapPoint( const QgsPointXY &point ) const;
|
||||
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
|
||||
/**
|
||||
* Adds a point to the rubber band (in map coordinates) and to the capture list (in layer coordinates)
|
||||
* \returns 0 in case of success, 1 if current layer is not a vector layer, 2 if coordinate transformation failed
|
||||
*/
|
||||
// TODO QGIS 3.0 returns an enum instead of a magic constant
|
||||
int addVertex( const QgsPointXY &point );
|
||||
|
||||
/**
|
||||
|
@ -39,7 +39,7 @@ class GUI_EXPORT QgsRasterRendererWidget: public QWidget
|
||||
|
||||
public:
|
||||
|
||||
//TODO QGIS 3.0 - remove extent parameter, replace with map canvas parameter
|
||||
//TODO QGIS 4.0 - remove extent parameter, replace with map canvas parameter
|
||||
QgsRasterRendererWidget( QgsRasterLayer *layer, const QgsRectangle &extent )
|
||||
: mRasterLayer( layer )
|
||||
, mExtent( extent )
|
||||
|
Loading…
x
Reference in New Issue
Block a user