Skip to content
Permalink
Browse files

Merge pull request #3319 from nyalldawson/consistency

Make API naming more consistent
  • Loading branch information
nyalldawson committed Jul 21, 2016
2 parents 44c8680 + 2685a90 commit 3c544cd4896bd13156a28d9d20735950101929b3
Showing 414 changed files with 2,110 additions and 1,912 deletions.
@@ -24,6 +24,76 @@ This page tries to maintain a list with incompatible changes that happened in pr
<li>QgsLabel and QgsLabelAttributes. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
</ul>

\subsection qgis_api_break_3_0_global General changes

<ul>
<li>All setDestinationCRS() methods have been renamed to setDestinationCrs()</li>
<li>All destinationCRS() methods have been renamed to destinationCrs()</li>
<li>All readXML() and _readXML() methods have been renamed to readXml() and _readXml()</li>
<li>All writeXML() and _writeXML() methods have been renamed to writeXml() and _writeXml()</li>
<li>All setLayerID() methods have been renamed to setLayerId()</li>
<li>All layerID() methods have been renamed to layerId()</li>
<li>All setCRS() methods have been renamed to setCrs()</li>
<li>All srcCrs() methods have been renamed to sourceCrs()</li>
<li>All destCrs() methods have been renamed to destinationCrs()</li>
<li>All exportXML() methods have been renamed to exportXml()</li>
<li>All importXML() methods have been renamed to importXml()</li>

</ul>

\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit

<ul>
<li>hasConfigID() has been renamed to hasConfigId()</li>
</ul>

\subsection qgis_api_break_3_0_QgsAtlasComposition QgsAtlasComposition

<ul>
<li>readXMLMapSettings() has been renamed to readXmlMapSettings()</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerLegendItem QgsComposerLegendItem

<ul>
<li>writeXMLChildren() has been renamed to writeXmlChildren()</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerMap QgsComposerMap

<ul>
<li>containsWMSLayer() has been renamed to containsWmsLayer()</li>
</ul>

\subsection qgis_api_break_3_0_QgsComposerNodesItem QgsComposerNodesItem

<ul>
<li>_readXMLStyle() has been renamed to _readXmlStyle()</li>
<li>_writeXMLStyle() has been renamed to _writeXMLStyle()</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_QgsComposition QgsComposition

<ul>
<li>addItemsFromXML() has been renamed to addItemsFromXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsCoordinateReferenceSystem QgsCoordinateReferenceSystem

<ul>
<li>setCustomSrsValidation() has been renamed to setCustomCrsValidation()</li>
<li>saveAsUserCRS() has been renamed to saveAsUserCrs()</li>
<li>geographicCRSAuthId() has been renamed to geographicCrsAuthId()</li>
</ul>

\subsection qgis_api_break_3_0_QgsCoordinateTransform QgsCoordinateTransform

<ul>
@@ -50,13 +120,32 @@ plugins calling these methods will need to be updated.</li>
be returned in place of a null pointer.</li>
</ul>

\subsection qgis_api_break_3_0_QgsCptCitySelectionItem QgsCptCitySelectionItem

<ul>
<li>parseXML() has been renamed to parseXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsCRSCache QgsCRSCache

<ul>
<li>QgsCRSCache has been renamed to QgsCrsCache</li>
<li>updateCRSCache() has been renamed to updateCrsCache</li>
</ul>

\subsection qgis_api_break_3_0_QgsDataDefinedSymbolDialog QgsDataDefinedSymbolDialog

<ul>
<li>QgsDataDefinedSymbolDialog was removed. Code using this dialog should be reworked to use QgsDataDefinedButton
instead.</li>
</ul>

\subsection qgis_api_break_3_0_QgsDataItem QgsDataItem

<ul>
<li>supportedCRS() has been renamed to supportedCrs()</li>
</ul>

\subsection qgis_api_break_3_0_QgsDiagramLayerSettings QgsDiagramLayerSettings

<ul>
@@ -89,6 +178,12 @@ attributeIndexes(), pkAttributeIndexes(), isSaveAndLoadStyleToDBSupported()</li>
</li>
</ul>

\subsection qgis_api_break_3_0_QgsGroupWMSDataDialog QgsGroupWMSDataDialog

<ul>
<li>QgsGroupWMSDataDialo has been renamed to QgsGroupWmsDataDialog</li>
</ul>

\subsection qgis_api_break_3_0_DataProviders Data Providers

<ul>
@@ -97,6 +192,19 @@ objects are implicitly shared, returning a copy helps simplify and make code mor
only affects third party c++ providers, and does not affect PyQGIS scripts.</li>
</ul>

\subsection qgis_api_break_3_0_QgsLayerTreeGroup QgsLayerTreeGroup

<ul>
<li>readChildrenFromXML() has been renamed to readChildrenFromXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsLayerTreeNode QgsLayerTreeNode

<ul>
<li>readCommonXML() has been renamed to readCommonXml()</li>
<li>writeCommonXML() has been renamed to writeCommonXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapCanvas QgsMapCanvas

<ul>
@@ -121,13 +229,22 @@ screenUpdateRequested() were removed. These members have had no effect for a num
<li>The layerCrsChanged() signal was renamed to crsChanged()</li>
<li>theError parameter in appendError() and setError() were renamed to 'error'.</li>
<li>drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngineV2.</li>
<li>readLayerXML() was renamed to readLayerXml()</li>
<li>writeLayerXML() was renamed to writeLayerXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapOverviewCanvas QgsMapOverviewCanvas

<ul>
<li>destinationSrsChanged() was renamed to destinationCrsChanged()</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapRenderer QgsMapRenderer

<ul>
<li>transformation() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will
be returned instead of a null pointer if no transformation is required.</li>
<li>destinationSrsChanged() was renamed to destinationCrsChanged()</li>
</ul>

\subsection qgis_api_break_3_0_QgsMapRendererJob QgsMapRendererJob
@@ -146,6 +263,52 @@ be used instead of a null pointer if no transformation is required.</li>
be returned instead of a null pointer if no transformation is required.</li>
</ul>

\subsection qgis_api_break_3_0_QgsOSMElement QgsOSMElement

<ul>
<li>elemID() has been renamed to elemId()</li>
</ul>

\subsection qgis_api_break_3_0_QgsOWSSourceSelect QgsOWSSourceSelect

<ul>
<li>selectedLayersCRSs() has been renamed selectedLayersCrses()</li>
<li>populateCRS() has been renamed to populateCrs()</li>
<li>clearCRS() has been renamed to clearCrs()</li>
<li>addWMSListRow() has been renamed to addWmsListRow()</li>
<li>addWMSListItem() has been renamed to addWmsListItem()</li>
<li>selectedCRS() has been renamed to selectedCrs()</li>
</ul>

\subsection qgis_api_break_3_0_QgsOWSConnection QgsOWSConnection

<ul>
<li>QgsOWSConnection has been renamed QgsOwsConnection</li>
</ul>

\subsection qgis_api_break_3_0_QgsRasterDataProvider QgsRasterDataProvider

<ul>
<li>srcDataType() has been renamed to sourceDataType()</li>
<li>srcHasNoDataValue() has been renamed to sourceHasNoDataValue()</li>
<li>useSrcNoDataValue() has been renamed to useSourceNoDataValue()</li>
<li>setUseSrcNoDataValue() has been renamed to setUseSourceNoDataValue()</li>
<li>srcNoDataValue() has been renamed to sourceNoDataValue()</li>
</ul>

\subsection qgis_api_break_3_0_QgsRasterInterface QgsRasterInterface

<ul>
<li>srcDataType() has been renamed to sourceDataType()</li>
<li>srcInput() has been renamed to sourceInput()</li>
</ul>

\subsection qgis_api_break_3_0_QgsRelation QgsRelation

<ul>
<li>createFromXML() has been renamed to createFromXml()</li>
</ul>

\subsection qgis_api_break_3_0_QgsRenderContext QgsRenderContext

<ul>
@@ -169,6 +332,15 @@ be used instead of a null pointer if no transformation is required.</li>
plugins calling this method will need to be updated.</li>
</ul>

\subsection qgis_api_break_3_0_QgsVectorLayer QgsVectorLayer

<ul>
<li>excludeAttributesWMS() and setExcludeAttributesWMS() have been renamed to excludeAttributesWms() and
setExcludeAttributesWms()</li>
<li>excludeAttributesWFS() and setExcludeAttributesWFS() have been renamed to excludeAttributesWfs() and
setExcludeAttributesWfs()</li>
</ul>

\subsection qgis_api_break_3_0_QgsVectorLayerImport QgsVectorLayerImport

<ul>
@@ -183,7 +355,9 @@ in code which previously passed a null pointer to QgsVectorLayerImport.</li>
<ul>
<li>The constructor now takes a reference rather than a pointer to a CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.</li>
<li>destCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
<li>The destCRS parameter in the constructor has been renamed to destinationCrs.</li>
<li>destCRS() has been renamed to destinationCrs()</li>
<li>destinationCrs() now returns a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++
plugins calling this method will need to be updated.</li>
</ul>

@@ -248,6 +422,11 @@ and deletedFeatureIds() functions now return values, not references. This has no
plugins calling these methods will need to be updated.</li>
</ul>

\subsection qgis_api_break_3_0_QgsWMSLegendNode QgsWMSLegendNode

<ul>
<li>QgsWMSLegendNode has been renamed to QgsWmsLegendNode</li>
</ul>


\section qgis_api_break_2_4 QGIS 2.4
@@ -32,7 +32,7 @@ class QgsOSMElement
bool isValid() const;

// fetched automatically from DB
QgsOSMElementID elemID() const;
QgsOSMElementID elemId() const;
qint64 id() const;
//QString username() const;
//QDateTime timestamp() const;
@@ -118,9 +118,9 @@ class QgsAlignRaster
QSizeF cellSize() const;

//! Set the output CRS in WKT format
void setDestinationCRS( const QString& crsWkt );
void setDestinationCrs( const QString& crsWkt );
//! Get the output CRS in WKT format
QString destinationCRS() const;
QString destinationCrs() const;

//! Configure clipping extent (region of interest).
//! No extra clipping is done if the rectangle is null
@@ -179,15 +179,15 @@ public:
/** Returns the current filename. Must be called after prepareForFeature() */
QString currentFilename() const;

void writeXML( QDomElement& elem, QDomDocument& doc ) const;
void writeXml( QDomElement& elem, QDomDocument& doc ) const;

/** Reads general atlas settings from xml
* @param elem a QDomElement holding the atlas properties.
* @param doc QDomDocument for the source xml.
* @see readXMLMapSettings
* @note This method should be called before restoring composer item properties
*/
void readXML( const QDomElement& elem, const QDomDocument& doc );
void readXml( const QDomElement& elem, const QDomDocument& doc );

/** Reads old (pre 2.2) map related atlas settings from xml
* @param elem a QDomElement holding the atlas map properties.
@@ -196,7 +196,7 @@ public:
* @note This method should be called after restoring composer item properties
* @note added in version 2.5
*/
void readXMLMapSettings( const QDomElement& elem, const QDomDocument& doc );
void readXmlMapSettings( const QDomElement& elem, const QDomDocument& doc );

QgsComposition* composition();

@@ -174,11 +174,11 @@ class QgsComposerArrow: QgsComposerItem
* @param elem is DOM element corresponding to 'Composer' tag
* @param doc document
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;

/** Sets state from DOM document
* @param itemElem is DOM node corresponding to item tag
* @param doc is the document to read
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );
};
@@ -48,14 +48,14 @@ class QgsComposerAttributeTable : QgsComposerTable
* @param doc QDomDocument for the destination xml.
* @see readXML
*/
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;

/** Reads the properties specific to an attribute table from xml.
* @param itemElem a QDomElement holding the attribute table's desired properties.
* @param doc QDomDocument for the source xml.
* @see writeXML
*/
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );

/** Sets the vector layer from which to display feature attributes
* @param layer Vector layer for attribute table
@@ -52,15 +52,15 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
* @param ignoreFrames ignore frames
* @see readXML
*/
virtual bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
virtual bool writeXml( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;

/** Reads the properties specific to an attribute table from xml.
* @param itemElem a QDomElement holding the attribute table's desired properties.
* @param doc QDomDocument for the source xml.
* @param ignoreFrames ignore frames
* @see writeXML
*/
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
virtual bool readXml( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );

virtual void addFrame( QgsComposerFrame* frame /Transfer/, bool recalcFrameSizes = true );

@@ -31,8 +31,8 @@ class QgsComposerFrame: QgsComposerItem
void paint( QPainter* painter, const QStyleOptionGraphicsItem* itemStyle, QWidget* pWidget );
void beginItemCommand( const QString& text );
void endItemCommand();
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
bool writeXml( QDomElement& elem, QDomDocument & doc ) const;
bool readXml( const QDomElement& itemElem, const QDomDocument& doc );
int type() const;

/** Returns the visible portion of the multi frame's content which
@@ -174,8 +174,8 @@ class QgsComposerHtml: QgsComposerMultiFrame
virtual QString displayName() const;
QSizeF totalSize() const;
void render( QPainter* p, const QRectF& renderExtent, const int frameIndex );
bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
bool writeXml( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
bool readXml( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
void addFrame( QgsComposerFrame* frame /Transfer/, bool recalcFrameSizes = true );
//overridden to break frames without dividing lines of text
double findNearbyPageBreak( double yPos );
@@ -282,10 +282,10 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
virtual void setSceneRect( const QRectF& rectangle );

/** Writes parameter that are not subclass specific in document. Usually called from writeXML methods of subclasses*/
bool _writeXML( QDomElement& itemElem, QDomDocument& doc ) const;
bool _writeXml( QDomElement& itemElem, QDomDocument& doc ) const;

/** Reads parameter that are not subclass specific in document. Usually called from readXML methods of subclasses*/
bool _readXML( const QDomElement& itemElem, const QDomDocument& doc );
bool _readXml( const QDomElement& itemElem, const QDomDocument& doc );

/** Whether this item has a frame or not.
* @returns true if there is a frame around this item, otherwise false.

0 comments on commit 3c544cd

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