mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
QgsRubberBand: remove constructor and method with bool isPolygon
use methods with Qgis::GeometryType instead
This commit is contained in:
parent
9db9304627
commit
b7f4fe36e7
@ -441,6 +441,7 @@ be returned instead of a null pointer if no transformation is required.</li>
|
||||
|
||||
<ul>
|
||||
<li>setToGeometry() and addGeometry() now take geometry references, not pointers.</li>
|
||||
<li>QgsRubberBand( QgsMapCanvas* mapCanvas, bool isPolygon ) constructor and reset( bool isPolygon) have been removed, use constructor and function with Qgis::GeometryType as argument instead.</li>
|
||||
</ul>
|
||||
|
||||
\subsection qgis_api_break_3_0_QgsPalLayerSettings QgsPalLayerSettings
|
||||
|
@ -41,13 +41,7 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
* @param geometryType Defines how the data should be drawn onto the screen. (Use Qgis::Line, Qgis::Polygon or Qgis::Point)
|
||||
*/
|
||||
QgsRubberBand( QgsMapCanvas* mapCanvas /TransferThis/, Qgis::GeometryType geometryType = Qgis::Line );
|
||||
/**
|
||||
* Creates a new RubberBand.
|
||||
* @deprecated Use the constructor which takes Qgis::GeometryType as second argument instead
|
||||
* @param mapCanvas The map canvas to draw onto. It's CRS will be used map points onto screen coordinates.
|
||||
* @param isPolygon true: draw as (multi-)polygon, false draw as (multi-)linestring
|
||||
*/
|
||||
QgsRubberBand( QgsMapCanvas* mapCanvas /TransferThis/, bool isPolygon ) /Deprecated/;
|
||||
|
||||
~QgsRubberBand();
|
||||
|
||||
/**
|
||||
@ -104,14 +98,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
*/
|
||||
void reset( Qgis::GeometryType geometryType = Qgis::Line );
|
||||
|
||||
/**
|
||||
* @deprecated Use the reset method which takes Qgis::GeometryType as second argument instead
|
||||
* Clears all the geometries in this rubberband.
|
||||
* Sets the representation type according to isPolygon.
|
||||
* @param isPolygon true: draw as (multi-)polygon, false draw as (multi-)linestring
|
||||
*/
|
||||
void reset( bool isPolygon ) /Deprecated/;
|
||||
|
||||
/**
|
||||
* Add a vertex to the rubberband and update canvas.
|
||||
* The rendering of the vertex depends on the current GeometryType and icon.
|
||||
|
@ -43,22 +43,6 @@ QgsRubberBand::QgsRubberBand( QgsMapCanvas* mapCanvas, Qgis::GeometryType geomet
|
||||
setBrushStyle( Qt::SolidPattern );
|
||||
}
|
||||
|
||||
QgsRubberBand::QgsRubberBand( QgsMapCanvas* mapCanvas, bool isPolygon )
|
||||
: QgsMapCanvasItem( mapCanvas )
|
||||
, mIconSize( 5 )
|
||||
, mIconType( ICON_CIRCLE )
|
||||
, mTranslationOffsetX( 0.0 )
|
||||
, mTranslationOffsetY( 0.0 )
|
||||
{
|
||||
reset( isPolygon ? Qgis::Polygon : Qgis::Line );
|
||||
QColor color( Qt::lightGray );
|
||||
color.setAlpha( 63 );
|
||||
setColor( color );
|
||||
setWidth( 1 );
|
||||
setLineStyle( Qt::SolidLine );
|
||||
setBrushStyle( Qt::SolidPattern );
|
||||
}
|
||||
|
||||
QgsRubberBand::QgsRubberBand()
|
||||
: QgsMapCanvasItem( nullptr )
|
||||
, mIconSize( 5 )
|
||||
@ -140,14 +124,6 @@ void QgsRubberBand::reset( Qgis::GeometryType geometryType )
|
||||
update();
|
||||
}
|
||||
|
||||
void QgsRubberBand::reset( bool isPolygon )
|
||||
{
|
||||
mPoints.clear();
|
||||
mGeometryType = isPolygon ? Qgis::Polygon : Qgis::Line;
|
||||
updateRect();
|
||||
update();
|
||||
}
|
||||
|
||||
/*!
|
||||
Add a point to the shape being created.
|
||||
*/
|
||||
|
@ -68,13 +68,7 @@ class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem
|
||||
* @param geometryType Defines how the data should be drawn onto the screen. (Use Qgis::Line, Qgis::Polygon or Qgis::Point)
|
||||
*/
|
||||
QgsRubberBand( QgsMapCanvas* mapCanvas, Qgis::GeometryType geometryType = Qgis::Line );
|
||||
/**
|
||||
* Creates a new RubberBand.
|
||||
* @deprecated Use the constructor which takes Qgis::GeometryType as second argument instead
|
||||
* @param mapCanvas The map canvas to draw onto. It's CRS will be used map points onto screen coordinates.
|
||||
* @param isPolygon true: draw as (multi-)polygon, false draw as (multi-)linestring
|
||||
*/
|
||||
Q_DECL_DEPRECATED QgsRubberBand( QgsMapCanvas* mapCanvas, bool isPolygon );
|
||||
|
||||
~QgsRubberBand();
|
||||
|
||||
/**
|
||||
@ -131,14 +125,6 @@ class GUI_EXPORT QgsRubberBand: public QgsMapCanvasItem
|
||||
*/
|
||||
void reset( Qgis::GeometryType geometryType = Qgis::Line );
|
||||
|
||||
/**
|
||||
* @deprecated Use the reset method which takes Qgis::GeometryType as second argument instead
|
||||
* Clears all the geometries in this rubberband.
|
||||
* Sets the representation type according to isPolygon.
|
||||
* @param isPolygon true: draw as (multi-)polygon, false draw as (multi-)linestring
|
||||
*/
|
||||
Q_DECL_DEPRECATED void reset( bool isPolygon );
|
||||
|
||||
/**
|
||||
* Add a vertex to the rubberband and update canvas.
|
||||
* The rendering of the vertex depends on the current GeometryType and icon.
|
||||
|
Loading…
x
Reference in New Issue
Block a user