mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Move QGIS 3 todos to QGIS 4
This commit is contained in:
parent
6c1036c5c0
commit
90f7989f4d
@ -191,7 +191,7 @@ 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
|
||||
/ // TODO QGIS 4: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
||||
%End
|
||||
|
||||
explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );
|
||||
@ -205,7 +205,7 @@ 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
|
||||
/ // TODO QGIS 4: remove type and always use EPSG code
|
||||
%End
|
||||
|
||||
QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs );
|
||||
@ -304,7 +304,7 @@ 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
|
||||
/ // TODO QGIS 4: remove type and always use EPSG code, rename to createFromEpsg
|
||||
%End
|
||||
|
||||
bool createFromOgcWmsCrs( const QString &crs );
|
||||
@ -322,7 +322,7 @@ 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())
|
||||
/ // TODO QGIS 4: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
||||
%End
|
||||
|
||||
bool createFromSrid( long srid );
|
||||
@ -332,7 +332,7 @@ 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
|
||||
/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
|
||||
%End
|
||||
|
||||
bool createFromWkt( const QString &wkt );
|
||||
@ -500,7 +500,7 @@ 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)
|
||||
/ // TODO QGIS 4: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
||||
%End
|
||||
|
||||
bool operator==( const QgsCoordinateReferenceSystem &srs ) const;
|
||||
@ -543,7 +543,7 @@ Returns the internal CRS ID, if available.
|
||||
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
|
||||
/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
|
||||
%End
|
||||
|
||||
QString authid() const;
|
||||
|
@ -38,7 +38,7 @@ 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
|
||||
TODO QGIS 4: remove const qualifier
|
||||
%End
|
||||
|
||||
virtual bool startEditing( QgsVectorLayer *layer ) const = 0;
|
||||
@ -51,7 +51,7 @@ If successful layer->startEditing() will be called and true returned.
|
||||
|
||||
:return: True, if the editing session was started
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
TODO QGIS 4: remove const qualifier
|
||||
%End
|
||||
|
||||
virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;
|
||||
@ -64,7 +64,7 @@ Appropriate dialogs should be shown like
|
||||
|
||||
:return: True if successful
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
TODO QGIS 4: remove const qualifier
|
||||
%End
|
||||
|
||||
virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;
|
||||
@ -75,7 +75,7 @@ Should be called, when the features should be committed but the editing session
|
||||
|
||||
:return: True if successful
|
||||
|
||||
TODO QGIS 3: remove const qualifier
|
||||
TODO QGIS 4: remove const qualifier
|
||||
%End
|
||||
|
||||
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request /In,Out/, double dx = 0, double dy = 0, QString *errorMsg /Out/ = 0 ) const;
|
||||
@ -90,7 +90,7 @@ 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
|
||||
TODO QGIS 4: remove const qualifier
|
||||
%End
|
||||
|
||||
};
|
||||
|
@ -585,7 +585,7 @@ 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
|
||||
//TODO QGIS 4.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;
|
||||
|
||||
/**
|
||||
|
@ -223,7 +223,7 @@ 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
|
||||
*/ // TODO QGIS 4: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix
|
||||
explicit QgsCoordinateReferenceSystem( const QString &definition );
|
||||
|
||||
/**
|
||||
@ -232,7 +232,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
* 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
|
||||
*/ // TODO QGIS 4: remove type and always use EPSG code
|
||||
explicit QgsCoordinateReferenceSystem( long id, CrsType type = PostgisCrsId );
|
||||
|
||||
//! Copy constructor
|
||||
@ -310,7 +310,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
* \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
|
||||
*/ // TODO QGIS 4: remove type and always use EPSG code, rename to createFromEpsg
|
||||
bool createFromId( long id, CrsType type = PostgisCrsId );
|
||||
|
||||
/**
|
||||
@ -322,14 +322,14 @@ 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())
|
||||
*/ // TODO QGIS 4: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid())
|
||||
bool createFromOgcWmsCrs( const QString &crs );
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
|
||||
bool createFromSrid( long srid );
|
||||
|
||||
/**
|
||||
@ -450,7 +450,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
* 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)
|
||||
*/ // TODO QGIS 4: seems completely obsolete now (only compares proj4 - already done in createFromProj4)
|
||||
long findMatchingProj();
|
||||
|
||||
/**
|
||||
@ -507,7 +507,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
|
||||
/**
|
||||
* 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
|
||||
*/ // TODO QGIS 4: remove unless really necessary - let's use EPSG codes instead
|
||||
long postgisSrid() const;
|
||||
|
||||
/**
|
||||
|
@ -132,7 +132,7 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
/**
|
||||
* Placement modes which determine how label candidates are generated for a feature.
|
||||
*/
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine
|
||||
//TODO QGIS 4.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.
|
||||
@ -146,7 +146,7 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
};
|
||||
|
||||
//! Positions for labels when using the QgsPalLabeling::OrderedPositionsAroundPoint placement mode
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine
|
||||
enum PredefinedPointPosition
|
||||
{
|
||||
TopLeft, //!< Label on top-left of point
|
||||
@ -167,7 +167,7 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
* Behavior modifier for label offset and distance, only applies in some
|
||||
* label placement modes.
|
||||
*/
|
||||
//TODO QGIS 3.0 - move to QgsLabelingEngine
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine
|
||||
enum OffsetType
|
||||
{
|
||||
FromPoint, //!< Offset distance applies from point geometry
|
||||
@ -177,7 +177,7 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
/**
|
||||
* 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
|
||||
//TODO QGIS 4.0 - move to QgsLabelingEngine, rename to LinePlacementFlag, use Q_DECLARE_FLAGS to make
|
||||
//LinePlacementFlags type, and replace use of pal::LineArrangementFlag
|
||||
enum LinePlacementFlags
|
||||
{
|
||||
@ -233,7 +233,7 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
* Valid obstacle types, which affect how features within the layer will act as obstacles
|
||||
* for labels.
|
||||
*/
|
||||
//TODO QGIS 3.0 - Move to QgsLabelingEngine
|
||||
//TODO QGIS 4.0 - Move to QgsLabelingEngine
|
||||
enum ObstacleType
|
||||
{
|
||||
PolygonInterior, /*!< avoid placing labels over interior of polygon (prefer placing labels totally
|
||||
|
@ -859,7 +859,7 @@ 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
|
||||
//TODO QGIS 4.0 - add PyName alias to avoid list type conversion error
|
||||
void removeMapLayers( const QList<QgsMapLayer *> &layers );
|
||||
|
||||
/**
|
||||
@ -1285,7 +1285,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
* 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
|
||||
//TODO QGIS 4.0 - rename to past tense
|
||||
void removeAll();
|
||||
|
||||
/**
|
||||
|
@ -52,7 +52,7 @@ 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
|
||||
* TODO QGIS 4: remove const qualifier
|
||||
*/
|
||||
virtual bool addFeature( QgsVectorLayer *layer, const QgsAttributeMap &defaultValues = QgsAttributeMap(), const QgsGeometry &defaultGeometry = QgsGeometry(), QgsFeature *feature SIP_OUT = nullptr ) const = 0;
|
||||
|
||||
@ -65,7 +65,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
*
|
||||
* \returns True, if the editing session was started
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
* TODO QGIS 4: remove const qualifier
|
||||
*/
|
||||
virtual bool startEditing( QgsVectorLayer *layer ) const = 0;
|
||||
|
||||
@ -77,7 +77,7 @@ 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
|
||||
* TODO QGIS 4: remove const qualifier
|
||||
*/
|
||||
virtual bool stopEditing( QgsVectorLayer *layer, bool allowCancel = true ) const = 0;
|
||||
|
||||
@ -87,7 +87,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject
|
||||
* \param layer The layer to commit
|
||||
* \returns True if successful
|
||||
*
|
||||
* TODO QGIS 3: remove const qualifier
|
||||
* TODO QGIS 4: remove const qualifier
|
||||
*/
|
||||
virtual bool saveEdits( QgsVectorLayer *layer ) const = 0;
|
||||
|
||||
@ -101,7 +101,7 @@ 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
|
||||
* TODO QGIS 4: remove const qualifier
|
||||
*/
|
||||
virtual bool copyMoveFeatures( QgsVectorLayer *layer, QgsFeatureRequest &request SIP_INOUT, double dx = 0, double dy = 0, QString *errorMsg SIP_OUT = nullptr ) const;
|
||||
|
||||
|
@ -224,7 +224,7 @@ class GUI_EXPORT QgsAttributeTableModel: public QAbstractTableModel
|
||||
/**
|
||||
* Gets the the feature request
|
||||
*/
|
||||
// TODO QGIS 3: return copy instead of reference
|
||||
// TODO QGIS 4: 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" ); }
|
||||
|
||||
/**
|
||||
|
@ -78,21 +78,21 @@ class GUI_EXPORT QgsAttributeForm : public QWidget
|
||||
* Hides the button box (OK/Cancel) and enables auto-commit
|
||||
* \note set Embed in QgsAttributeEditorContext in constructor instead
|
||||
*/
|
||||
// TODO QGIS 3.0 - make private
|
||||
// TODO QGIS 4.0 - make private
|
||||
void hideButtonBox();
|
||||
|
||||
/**
|
||||
* Shows the button box (OK/Cancel) and disables auto-commit
|
||||
* \note set Embed in QgsAttributeEditorContext in constructor instead
|
||||
*/
|
||||
// TODO QGIS 3.0 - make private
|
||||
// TODO QGIS 4.0 - make private
|
||||
void showButtonBox();
|
||||
|
||||
/**
|
||||
* 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
|
||||
// TODO QGIS 4.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:
|
||||
|
@ -121,7 +121,7 @@ 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
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
int nextPoint( const QgsPoint &mapPoint, QgsPoint &layerPoint );
|
||||
|
||||
/**
|
||||
@ -134,7 +134,7 @@ 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
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
int nextPoint( QPoint p, QgsPoint &layerPoint, QgsPoint &mapPoint );
|
||||
|
||||
/**
|
||||
@ -143,7 +143,7 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
|
||||
* \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
|
||||
// TODO QGIS 4.0 returns an enum instead of a magic constant
|
||||
int fetchLayerPoint( const QgsPointLocator::Match &match, QgsPoint &layerPoint );
|
||||
|
||||
/**
|
||||
@ -175,7 +175,7 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing
|
||||
* 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
|
||||
// TODO QGIS 4.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