Skip to content
Permalink
Browse files

Merge pull request #3485 from nyalldawson/composer_dep

Remove deprecated methods from composer
  • Loading branch information
nyalldawson committed Sep 14, 2016
2 parents da8fc02 + 6cfe562 commit aac7e9aa39d0ccfa7f2cc29f90fac847e489d747
Showing with 175 additions and 7,893 deletions.
  1. +99 −0 doc/api_break.dox
  2. +5 −0 doc/qgis3_user_changes.dox
  3. +0 −43 python/core/composer/qgsatlascomposition.sip
  4. +0 −20 python/core/composer/qgscomposerarrow.sip
  5. +0 −237 python/core/composer/qgscomposerattributetable.sip
  6. +0 −167 python/core/composer/qgscomposerattributetablemodel.sip
  7. +0 −10 python/core/composer/qgscomposerattributetablev2.sip
  8. +0 −148 python/core/composer/qgscomposeritem.sip
  9. +0 −6 python/core/composer/qgscomposerlabel.sip
  10. +0 −419 python/core/composer/qgscomposermap.sip
  11. +0 −2 python/core/composer/qgscomposermapgrid.sip
  12. +1 −8 python/core/composer/qgscomposermultiframe.sip
  13. +0 −95 python/core/composer/qgscomposerpicture.sip
  14. +0 −274 python/core/composer/qgscomposertable.sip
  15. +0 −52 python/core/composer/qgscomposertablev2.sip
  16. +0 −51 python/core/composer/qgscomposertexttable.sip
  17. +0 −71 python/core/composer/qgscomposition.sip
  18. +0 −3 python/core/core.sip
  19. +0 −2 src/app/CMakeLists.txt
  20. +35 −209 src/app/composer/qgsattributeselectiondialog.cpp
  21. +0 −11 src/app/composer/qgsattributeselectiondialog.h
  22. +0 −13 src/app/composer/qgscomposer.cpp
  23. +0 −3 src/app/composer/qgscomposer.h
  24. +0 −4 src/app/composer/qgscomposermapwidget.cpp
  25. +0 −526 src/app/composer/qgscomposertablewidget.cpp
  26. +0 −71 src/app/composer/qgscomposertablewidget.h
  27. +0 −7 src/core/CMakeLists.txt
  28. +0 −106 src/core/composer/qgsatlascomposition.cpp
  29. +0 −43 src/core/composer/qgsatlascomposition.h
  30. +0 −44 src/core/composer/qgscomposerarrow.cpp
  31. +0 −20 src/core/composer/qgscomposerarrow.h
  32. +0 −672 src/core/composer/qgscomposerattributetable.cpp
  33. +0 −293 src/core/composer/qgscomposerattributetable.h
  34. +0 −622 src/core/composer/qgscomposerattributetablemodel.cpp
  35. +0 −209 src/core/composer/qgscomposerattributetablemodel.h
  36. +0 −52 src/core/composer/qgscomposerattributetablev2.cpp
  37. +0 −10 src/core/composer/qgscomposerattributetablev2.h
  38. +0 −250 src/core/composer/qgscomposeritem.cpp
  39. +0 −134 src/core/composer/qgscomposeritem.h
  40. +0 −6 src/core/composer/qgscomposerlabel.h
  41. +0 −463 src/core/composer/qgscomposermap.cpp
  42. +0 −421 src/core/composer/qgscomposermap.h
  43. +0 −21 src/core/composer/qgscomposermapgrid.cpp
  44. +1 −3 src/core/composer/qgscomposermapgrid.h
  45. +0 −16 src/core/composer/qgscomposermultiframe.cpp
  46. +1 −8 src/core/composer/qgscomposermultiframe.h
  47. +2 −67 src/core/composer/qgscomposerpicture.cpp
  48. +0 −95 src/core/composer/qgscomposerpicture.h
  49. +0 −446 src/core/composer/qgscomposertable.cpp
  50. +0 −322 src/core/composer/qgscomposertable.h
  51. +0 −62 src/core/composer/qgscomposertablev2.cpp
  52. +0 −51 src/core/composer/qgscomposertablev2.h
  53. +0 −68 src/core/composer/qgscomposertexttable.cpp
  54. +0 −56 src/core/composer/qgscomposertexttable.h
  55. +2 −84 src/core/composer/qgscomposition.cpp
  56. +0 −72 src/core/composer/qgscomposition.h
  57. +0 −29 src/gui/qgscomposerview.cpp
  58. +0 −1 src/server/qgswmsprojectparser.cpp
  59. +0 −3 tests/src/core/CMakeLists.txt
  60. +0 −47 tests/src/core/testqgsatlascomposition.cpp
  61. +0 −1 tests/src/core/testqgscomposerdd.cpp
  62. +2 −2 tests/src/core/testqgscomposermapgrid.cpp
  63. +10 −23 tests/src/core/testqgscomposerpicture.cpp
  64. +0 −37 tests/src/core/testqgscomposerrotation.cpp
  65. +0 −525 tests/src/core/testqgscomposertable.cpp
  66. +2 −26 tests/src/python/test_qgsatlascomposition.py
  67. +0 −16 tests/src/python/test_qgscomposerhtml.py
  68. +8 −8 tests/src/python/test_qgscomposermap.py
  69. +7 −7 tests/src/python/test_qgscomposermapgrid.py
  70. BIN ...data/control_images/atlas/expected_atlas_autoscale_old_api1/expected_atlas_autoscale_old_api1.png
  71. BIN ...control_images/atlas/expected_atlas_autoscale_old_api1/expected_atlas_autoscale_old_api1_mask.png
  72. BIN ...data/control_images/atlas/expected_atlas_autoscale_old_api2/expected_atlas_autoscale_old_api2.png
  73. BIN ...control_images/atlas/expected_atlas_autoscale_old_api2/expected_atlas_autoscale_old_api2_mask.png
  74. BIN ...ta/control_images/atlas/expected_atlas_fixedscale_old_api1/expected_atlas_fixedscale_old_api1.png
  75. BIN ...ntrol_images/atlas/expected_atlas_fixedscale_old_api1/expected_atlas_fixedscale_old_api1_mask.png
  76. BIN ...ta/control_images/atlas/expected_atlas_fixedscale_old_api2/expected_atlas_fixedscale_old_api2.png
  77. BIN ...ntrol_images/atlas/expected_atlas_fixedscale_old_api2/expected_atlas_fixedscale_old_api2_mask.png
@@ -181,6 +181,11 @@ This page tries to maintain a list with incompatible changes that happened in pr
<li>QgsColorbutton was removed. QgsColorButtonV2 has now been renamed to QgsColorButton. Hence, QgsColorButtonV2 does not exist anymore.</li>
<li>QgsColorDialog was removed, and QgsColorDialogV2 was renamed to QgsColorDialog. Hence, QgsColorButtonV2 does not exist anymore.
All the functionality from the old QgsColorDialog has been moved to the new class.</li>
<li>QgsComposerAttributeTable and associated classes (eg QgsComposerAttributeTableCompare,
QgsComposerAttributeTableColumnModel, QgsComposerTableSortColumnsProxyModel) were removed.
Use QgsComposerAttributeTableV2 instead.</li>
<li>QgsComposerTable was removed. Use QgsComposerAttributeTableV2 instead.</li>
<li>ComposerTextTable was removed. Use ComposerTextTableV2 instead.</li>
<li>QgsCRSCache was removed. QgsCoordinateReferenceSystem now internally uses a cache for CRS creation,
so there is no longer a need for the separate cache class. Code which previously called QgsCRSCache::updateCRSCache()
should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinateTransformCache::instance()->invalidateCrs( authid ).</li>
@@ -290,6 +295,15 @@ variant instead.</li>

<ul>
<li>readXMLMapSettings() has been renamed to readXmlMapSettings()</li>
<li>composerMap() and setComposerMap() were removed. Use QgsComposerMap::atlasDriven() and setAtlasDriven()
instead</li>
<li>fixedScale() and setFixedScale() were removed. Use QgsComposerMap::atlasScalingMode() and setAtlasScalingMode()
instead</li>
<li>margin() and setMargin() were removed. Use QgsComposerMap::atlasMargin() and setAtlasMargin()
instead</li>
<li>setSortKeyAttributeIndex() and sortKeyAttributeIndex() were removed. Use sortKeyAttributeName()
and setSortKeyAttributeName() instead.</li>
<li>currentFeature() was removed. Use feature() instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit
@@ -323,13 +337,44 @@ and the new ramp can be retrieved after executing the dialog by calling ramp().<
<li>Some internal methods which were previously public or protected were made private.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerArrow QgsComposerArrow

<ul>
<li>setOutlineWidth(), outlineWidth(), arrowColor() and setArrowColor() were removed.
Use setArrowHeadOutlineWidth(), arrowHeadOutlineWidth(), arrowHeadOutlineColor(),
setArrowHeadOutlineColor(), arrowHeadFillColor(), setArrowHeadFillColor(),
setLineSymbol() or lineSymbol() instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerAttributeTableV2 QgsComposerAttributeTableV2

<ul>
<li>setDisplayAttributes() was removed. Use setDisplayedFields() instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerItem QgsComposerItem

<ul>
<li>zoomContent( int delta, double x, double y ) was removed. Use zoomContent( double, QPointF, ZoomMode )
instead.</li>
<li>drawText(), textWidthMillimeters(), fontHeightCharacterMM(), fontAscentMillimeters(),
fontDescentMillimeters(), fontHeightMillimeters(), pixelFontSize(), scaledFontPixelSize(),
drawArrowHead(), angle(), largestRotatedRectWithinBounds(), and rotate() were removed.
Use the corresponding methods in QgsComposerUtils instead.</li>
<li>rotation() and setRotation() were removed. Use itemRotation() and setItemRotation()
instead.</li>
<li>lockSymbolSize(), imageSizeConsideringRotation(), cornerPointOnRotatedAndScaledRect(),
sizeChangedByRotation() were removed. No replacement is offered for these methods.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerLabel QgsComposerLabel

<ul>
<li>setExpressionContext() has been removed. Setup the composition using an atlas and with
expression variables in the composer label item instead.</li>
<li>setSubstitutions has been removed. Use expression context variables in the composer
label item instead.</li>
<li>margin() was removed. Use marginX() and marginY() instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerLegend QgsComposerLegend
@@ -350,6 +395,34 @@ label item instead.</li>
<ul>
<li>containsWMSLayer() has been renamed to containsWmsLayer()</li>
<li>mapRenderer() has been removed. Use mapSettings() instead.</li>
<li>All grid style and format enums were moved to QgsComposerMapGrid.</li>
<li>All grid property getters and setters were moved to QgsComposerMapGrid,
and should be accessed using QgsComposerMap::grid() or QgsComposerMap::grids().</li>
<li>All overview property getters and setters were moved to QgsComposerMapOverview,
and should be accessed using QgsComposerMap::overview() or QgsComposerMap::overviews().</li>
<li>overviewExtentChanged() was moved to QgsComposerMapOverview.</li>
<li>toggleAtlasPreview(), connectMapOverviewSignals() were no longer required and are removed.</li>
<li>setRotation() and rotation() were removed. Use setMapRotation() and mapRotation()
instead.</li>
<li>atlasFixedScale() and setAtlasFixedScale() were removed. Use atlasScalingMode()
and setAtlasScalingMode() instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerMapGrid QgsComposerMapGrid

<ul>
<li>The annotation position Disabled was removed. QgsComposerMapGrid::HideAll
should be used instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerMultiFrame QgsComposerMultiFrame

<ul>
<li>render( QPainter* p, const QRectF& renderExtent ) was removed. Use
render( QPainter* painter, const QRectF& renderExtent, const int frameIndex )
instead.</li>
<li>render( QPainter* painter, const QRectF& renderExtent, const int frameIndex )
was made pure virtual.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerNodesItem QgsComposerNodesItem
@@ -359,20 +432,46 @@ label item instead.</li>
<li>_writeXMLStyle() has been renamed to _writeXMLStyle()</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerPicture QgsComposerPicture

<ul>
<li>setPictureFile() and pictureFile() were removed. Use setPicturePath()
and picturePath() instead.</li>
<li>rotation() and setRotation() were removed. Use pictureRotation()
and setPictureRotation() instead.</li>
<li>usePictureExpression() and pictureExpression() were removed. Use
QgsComposerObject::dataDefinedProperty instead.</li>
<li>setUsePictureExpression() was removed. Use
QgsComposerObject::setDataDefinedProperty() instead.</li>
<li>updatePictureExpression() was removed.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerTable QgsComposerTable

<ul>
<li>tableWriteXML() has been renamed to tableWriteXml()</li>
<li>tableReadXML() has been renamed to tableReadXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerTableV2 QgsComposerTableV2

<ul>
<li>rowsVisible(), rowRange(), drawHorizontalGridLines() and
drawVerticalGridLines() were removed.</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposition QgsComposition

<ul>
<li>addItemsFromXML() has been renamed to addItemsFromXml()</li>
<li>Constructor with QgsMapRenderer parameter has been removed. Use the variant with QgsMapSettings parameter.</li>
<li>mapRenderer() has been removed. Use mapSettings() instead.</li>
<li>setSnapGridTolerance(), setAlignmentSnapTolerance(), alignmentSnapTolerance() and snapGridTolerance()
were removed. Use setSnapTolerance() and snapTolerance() instead.</li>
<li>getComposerHtmlByItem() was removed. Use QgsComposerFrame::multiFrame() instead.</li>
<li>pixelFontSize(), pointFontSize(), relativeResizeRect(), relativePosition() were removed. Use the corresponding methods in QgsComposerUtils instead.</li>
<li>sortZList() was removed. Use refreshZList() instead.</li>
<li>addComposerTable(), composerTableAdded() were removed.</li>
</ul>

\subsection qgis_api_break_3_0_QgsCoordinateReferenceSystem QgsCoordinateReferenceSystem
@@ -21,4 +21,9 @@ be updated so that any expressions in use have the following changes:
<li>$numfeatures has been replaced by \@atlas_totalfeatures</li>
</ul>

\section qgis3_user_changes_composer Composer

Very old projects containing composer attribute tables will not restore the attribute
tables when loaded into QGIS 3.0. These tables must be manually readded to the compositions.

*/
@@ -223,49 +223,6 @@ public:
/** Recalculates the bounds of an atlas driven map */
void prepareMap( QgsComposerMap* map );


//deprecated methods

/** Returns the map used by the atlas
* @deprecated Use QgsComposerMap::atlasDriven() instead
*/
QgsComposerMap* composerMap() const /Deprecated/;

/** Sets the map used by the atlas
* @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead
*/
void setComposerMap( QgsComposerMap* map ) /Deprecated/;

/** Returns whether the atlas map uses a fixed scale
* @deprecated since 2.4 Use QgsComposerMap::atlasScalingMode() instead
*/
bool fixedScale() const /Deprecated/;

/** Sets whether the atlas map should use a fixed scale
* @deprecated since 2.4 Use QgsComposerMap::setAtlasScalingMode() instead
*/
void setFixedScale( bool fixed ) /Deprecated/;

/** Returns the margin for the atlas map
* @deprecated Use QgsComposerMap::atlasMargin() instead
*/
float margin() const /Deprecated/;

/** Sets the margin for the atlas map
* @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead
*/
void setMargin( float margin ) /Deprecated/;

//! @deprecated use sortKeyAttributeName instead
int sortKeyAttributeIndex() const /Deprecated/;
//! @deprecated use setSortKeyAttributeName instead
void setSortKeyAttributeIndex( int idx ) /Deprecated/;

/** Returns the current atlas feature. Must be called after prepareForFeature( i ).
* @deprecated use feature() instead
*/
QgsFeature* currentFeature() /Deprecated/;

/** Returns the current atlas geometry in the given projection system (default to the coverage layer's CRS) */
QgsGeometry currentGeometry( const QgsCoordinateReferenceSystem& projectedTo = QgsCoordinateReferenceSystem() ) const;

@@ -48,16 +48,6 @@ class QgsComposerArrow: QgsComposerItem
*/
double arrowHeadWidth() const;

/** Sets the pen width for drawing the line and arrow head
* @deprecated use setArrowHeadOutlineWidth or setLineSymbol instead
*/
void setOutlineWidth( double width ) /Deprecated/;

/** Returns the pen width for drawing the line and arrow head
* @deprecated use arrowHeadOutlineWidth or lineSymbol instead
*/
double outlineWidth() const /Deprecated/;

/** Sets the marker to draw at the start of the line
* @param svgPath file path for svg marker graphic to draw
* @see startMarker
@@ -86,16 +76,6 @@ class QgsComposerArrow: QgsComposerItem
*/
QString endMarker() const;

/** Returns the color for the line and arrow head
* @deprecated use arrowHeadOutlineColor, arrowHeadFillColor or lineStyle instead
*/
QColor arrowColor() const /Deprecated/;

/** Sets the color for the line and arrow head
* @deprecated use setArrowHeadOutlineColor, setArrowHeadFillColor or setLineStyle instead
*/
void setArrowColor( const QColor& c ) /Deprecated/;

/** Returns the color used to draw outline around the the arrow head.
* @returns arrow head outline color
* @see arrowHeadFillColor

0 comments on commit aac7e9a

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