Skip to content
Permalink
Browse files

Rename QGis class to Qgis, for capitalisation consistency

  • Loading branch information
nyalldawson committed Jul 21, 2016
1 parent b642c02 commit 1a2231f10c65c2bef992e02046baebf3bc4975f6
Showing 513 changed files with 3,465 additions and 3,459 deletions.
@@ -41,6 +41,12 @@ This page tries to maintain a list with incompatible changes that happened in pr

</ul>

\subsection qgis_api_break_3_0_Qgis Qgis

<ul>
<li>The QGis class was renamed to Qgis for capitalisation consistency with other class names</li>
</ul>

\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit

<ul>
@@ -1,5 +1,5 @@
/** \ingroup analysis
* The QGis class provides vector geometry analysis functions
* The Qgis class provides vector geometry analysis functions
*/

class QgsGeometryAnalyzer
@@ -1,6 +1,6 @@

/** \ingroup analysis
* The QGis class provides vector overlay analysis functions
* The Qgis class provides vector overlay analysis functions
*/

class QgsOverlayAnalyzer
@@ -1,5 +1,5 @@
/** \ingroup analysis
* The QGis class that calculates raster statistics (count, sum, mean) for
* The Qgis class that calculates raster statistics (count, sum, mean) for
* a polygon or multipolygon layer and appends the results as attributes
*/

@@ -63,14 +63,14 @@ class QgsDxfExport
* Set map units
* @param u unit
*/
void setMapUnits( QGis::UnitType u );
void setMapUnits( Qgis::UnitType u );

/**
* Retrieve map units
* @returns unit
* @see setMapUnits
*/
QGis::UnitType mapUnits() const;
Qgis::UnitType mapUnits() const;

/**
* Set symbology export mode
@@ -327,7 +327,7 @@ class QgsDxfExport
//! @note added in 2.15
void writeMText( const QString &layer, const QString &text, const QgsPointV2 &pt, double width, double angle, const QColor& color );

static double mapUnitScaleFactor( double scaleDenominator, QgsSymbolV2::OutputUnit symbolUnits, QGis::UnitType mapUnits );
static double mapUnitScaleFactor( double scaleDenominator, QgsSymbolV2::OutputUnit symbolUnits, Qgis::UnitType mapUnits );

//! Return cleaned layer name for use in DXF
static QString dxfLayerName( const QString &name );
@@ -126,12 +126,12 @@ class QgsGeometry
/** Returns type of the geometry as a WKB type (point / linestring / polygon etc.)
* @see type
*/
QGis::WkbType wkbType() const;
Qgis::WkbType wkbType() const;

/** Returns type of the geometry as a QGis::GeometryType
/** Returns type of the geometry as a Qgis::GeometryType
* @see wkbType
*/
QGis::GeometryType type() const;
Qgis::GeometryType type() const;

/** Returns true if WKB of the geometry is of WKBMulti* type */
bool isMultipart() const;
@@ -312,7 +312,7 @@ class QgsGeometry
* not disjoint with existing polygons of the feature
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
int addPart( const QList<QgsPoint> &points, QGis::GeometryType geomType = QGis::UnknownGeometry );
int addPart( const QList<QgsPoint> &points, Qgis::GeometryType geomType = Qgis::UnknownGeometry );

/** Adds a new part to a the geometry.
* @param points points describing part to add
@@ -321,7 +321,7 @@ class QgsGeometry
* not disjoint with existing polygons of the feature
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
int addPart( const QList<QgsPointV2> &points, QGis::GeometryType geomType = QGis::UnknownGeometry );
int addPart( const QList<QgsPointV2> &points, Qgis::GeometryType geomType = Qgis::UnknownGeometry );

/** Adds a new part to this geometry.
* @param part part to add (ownership is transferred)
@@ -330,7 +330,7 @@ class QgsGeometry
* not disjoint with existing polygons of the feature
*/
// TODO QGIS 3.0 returns an enum instead of a magic constant
int addPart( QgsAbstractGeometryV2* part /Transfer/, QGis::GeometryType geomType = QGis::UnknownGeometry );
int addPart( QgsAbstractGeometryV2* part /Transfer/, Qgis::GeometryType geomType = Qgis::UnknownGeometry );

/** Adds a new island polygon to a multipolygon feature
* @param newPart part to add. Ownership is NOT transferred.
@@ -514,7 +514,7 @@ class QgsGeometry
* @return the converted geometry or nullptr if the conversion fails.
* @note added in 2.2
*/
QgsGeometry* convertToType( QGis::GeometryType destType, bool destMultipart = false ) const /Factory/;
QgsGeometry* convertToType( Qgis::GeometryType destType, bool destMultipart = false ) const /Factory/;

/* Accessor functions for getting geometry data */

@@ -19,9 +19,9 @@


/** \ingroup core
* The QGis class provides global constants for use throughout the application.
* The Qgis class provides global constants for use throughout the application.
*/
class QGis
class Qgis
{
%TypeHeaderCode
#include <qgis.h>
@@ -93,10 +93,10 @@ class QGis
static int wkbDimensions( WkbType type );

//! Converts from old (pre 2.10) WKB type (OGR) to new WKB type
static QgsWKBTypes::Type fromOldWkbType( QGis::WkbType type );
static QgsWKBTypes::Type fromOldWkbType( Qgis::WkbType type );

//! Converts from new (post 2.10) WKB type (OGC) to old WKB type
static QGis::WkbType fromNewWkbType( QgsWKBTypes::Type type );
static Qgis::WkbType fromNewWkbType( QgsWKBTypes::Type type );

enum GeometryType
{
@@ -162,23 +162,23 @@ class QGis

//! Provides the canonical name of the type value
//! @deprecated use QgsUnitTypes::encodeUnit() instead
static QString toLiteral( QGis::UnitType unit ) /Deprecated/;
static QString toLiteral( Qgis::UnitType unit ) /Deprecated/;

//! Converts from the canonical name to the type value
//! @deprecated use QgsUnitTypes::decodeDistanceUnit() instead
static UnitType fromLiteral( const QString& literal, QGis::UnitType defaultType = UnknownUnit ) /Deprecated/;
static UnitType fromLiteral( const QString& literal, Qgis::UnitType defaultType = UnknownUnit ) /Deprecated/;

//! Provides translated version of the type value
//! @deprecated use QgsUnitTypes::toString() instead
static QString tr( QGis::UnitType unit ) /Deprecated/;
static QString tr( Qgis::UnitType unit ) /Deprecated/;

//! Provides type value from translated version
//! @deprecated use QgsUnitTypes::stringToDistanceUnit() instead
static UnitType fromTr( const QString& literal, QGis::UnitType defaultType = UnknownUnit ) /Deprecated/;
static UnitType fromTr( const QString& literal, Qgis::UnitType defaultType = UnknownUnit ) /Deprecated/;

//! Returns the conversion factor between the specified units
//! @deprecated use QgsUnitTyoes::fromUnitToUnitFactor() instead
static double fromUnitToUnitFactor( QGis::UnitType fromUnit, QGis::UnitType toUnit ) /Deprecated/;
static double fromUnitToUnitFactor( Qgis::UnitType fromUnit, Qgis::UnitType toUnit ) /Deprecated/;

/** Converts a string to a double in a permissive way, eg allowing for incorrect
* numbers of digits between thousand separators
@@ -446,7 +446,7 @@ class QgsCoordinateReferenceSystem

/** Returns the units for the projection used by the CRS.
*/
QGis::UnitType mapUnits() const;
Qgis::UnitType mapUnits() const;


// Mutators -----------------------------------
@@ -165,14 +165,14 @@ class QgsDataSourceURI

/** The (old) wkb type.
@deprecated Will return QgsWKBTypes::Type in 3.0. Prefer newWkbType() in the meantime */
QGis::WkbType wkbType() const /Deprecated/;
Qgis::WkbType wkbType() const /Deprecated/;

/** The wkb type.
@note Will be removed in 3.0 */
QgsWKBTypes::Type newWkbType() const;

//! @deprecated See setWkbType( QgsWKBTypes::Type )
void setWkbType( QGis::WkbType type ) /Deprecated/;
void setWkbType( Qgis::WkbType type ) /Deprecated/;

//! Sets the wkb type
void setWkbType( QgsWKBTypes::Type type );
@@ -155,7 +155,7 @@ class QgsDistanceArea
* @note added in QGIS 2.14
* @see areaUnits()
*/
QGis::UnitType lengthUnits() const;
Qgis::UnitType lengthUnits() const;

/** Returns the units of area for areal calculations made by this object.
* @note added in QGIS 2.14
@@ -179,7 +179,7 @@ class QgsDistanceArea
* @return formatted measurement string
* @deprecated use formatDistance() or formatArea() instead
*/
static QString textUnit( double value, int decimals, QGis::UnitType u, bool isArea, bool keepBaseUnit = false ) /Deprecated/;
static QString textUnit( double value, int decimals, Qgis::UnitType u, bool isArea, bool keepBaseUnit = false ) /Deprecated/;

/** Returns an distance formatted as a friendly string.
* @param distance distance to format
@@ -191,7 +191,7 @@ class QgsDistanceArea
* @note added in QGIS 2.16
* @see formatArea()
*/
static QString formatDistance( double distance, int decimals, QGis::UnitType unit, bool keepBaseUnit = false );
static QString formatDistance( double distance, int decimals, Qgis::UnitType unit, bool keepBaseUnit = false );

/** Returns an area formatted as a friendly string.
* @param area area to format
@@ -208,7 +208,7 @@ class QgsDistanceArea

//! Helper for conversion between physical units
// TODO QGIS 3.0 - remove this method, as its behaviour is non-intuitive.
void convertMeasurement( double &measure /In,Out/, QGis::UnitType &measureUnits /In,Out/, QGis::UnitType displayUnits, bool isArea ) const;
void convertMeasurement( double &measure /In,Out/, Qgis::UnitType &measureUnits /In,Out/, Qgis::UnitType displayUnits, bool isArea ) const;

/** Takes a length measurement calculated by this QgsDistanceArea object and converts it to a
* different distance unit.
@@ -219,7 +219,7 @@ class QgsDistanceArea
* @see convertAreaMeasurement()
* @note added in QGIS 2.14
*/
double convertLengthMeasurement( double length, QGis::UnitType toUnits ) const;
double convertLengthMeasurement( double length, Qgis::UnitType toUnits ) const;

/** Takes an area measurement calculated by this QgsDistanceArea object and converts it to a
* different areal unit.
@@ -167,14 +167,14 @@ class QgsExpression
* @note added in QGIS 2.14
* @see setDistanceUnits()
*/
QGis::UnitType distanceUnits() const;
Qgis::UnitType distanceUnits() const;

/** Sets the desired distance units for calculations involving geomCalculator(), eg "$length" and "$perimeter".
* @note distances are only converted when a geomCalculator() has been set
* @note added in QGIS 2.14
* @see distanceUnits()
*/
void setDistanceUnits( QGis::UnitType unit );
void setDistanceUnits( Qgis::UnitType unit );

/** Returns the desired areal units for calculations involving geomCalculator(), eg "$area".
* @note areas are only converted when a geomCalculator() has been set
@@ -24,7 +24,7 @@ class QgsGml: QObject
* @note available in python as getFeaturesUri
*/
int getFeatures( const QString& uri,
QGis::WkbType* wkbType,
Qgis::WkbType* wkbType,
QgsRectangle* extent = 0,
const QString& userName = QString(),
const QString& password = QString(),
@@ -33,7 +33,7 @@ class QgsGml: QObject
/** Read from GML data. Constructor uri param is ignored
* Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
*/
int getFeatures( const QByteArray &data, QGis::WkbType* wkbType, QgsRectangle* extent = 0 );
int getFeatures( const QByteArray &data, Qgis::WkbType* wkbType, QgsRectangle* extent = 0 );

/** Get parsed features for given type name */
QMap<qint64, QgsFeature* > featuresMap() const;
@@ -178,8 +178,8 @@ class QgsMapRenderer : QObject
//! Recalculate the map scale
void updateScale();

QGis::UnitType mapUnits() const;
void setMapUnits( QGis::UnitType u );
Qgis::UnitType mapUnits() const;
void setMapUnits( Qgis::UnitType u );

//! sets whether map image will be for overview
void enableOverviewMode( bool isOverview = true );
@@ -91,9 +91,9 @@ class QgsMapSettings
QgsCoordinateReferenceSystem destinationCrs() const;

//! Get units of map's geographical coordinates - used for scale calculation
QGis::UnitType mapUnits() const;
Qgis::UnitType mapUnits() const;
//! Set units of map's geographical coordinates - used for scale calculation
void setMapUnits( QGis::UnitType u );
void setMapUnits( Qgis::UnitType u );

//! Set the background color of the map
void setBackgroundColor( const QColor& color );
@@ -246,7 +246,7 @@ class QgsProject : QObject
* @note added in QGIS 2.14
* @see areaUnits()
*/
QGis::UnitType distanceUnits() const;
Qgis::UnitType distanceUnits() const;

/** Convenience function to query default area measurement units for project.
* @note added in QGIS 2.14
@@ -14,10 +14,10 @@ class QgsScaleCalculator
* Constructor
* @param dpi Monitor resolution in dots per inch
* @param mapUnits Units of the data on the map. Must match a value from the
* QGis::UnitType enum (Meters, Feet, Degrees)
* Qgis::UnitType enum (Meters, Feet, Degrees)
*/
QgsScaleCalculator( double dpi = 0,
QGis::UnitType mapUnits = QGis::Meters );
Qgis::UnitType mapUnits = Qgis::Meters );

/**
* Set the dpi to be used in scale calculations
@@ -35,10 +35,10 @@ class QgsScaleCalculator
* Set the map units
* @param mapUnits Units of the data on the map. Must match a value from the
*/
void setMapUnits( QGis::UnitType mapUnits );
void setMapUnits( Qgis::UnitType mapUnits );

/** Returns current map units */
QGis::UnitType mapUnits() const;
Qgis::UnitType mapUnits() const;

/**
* Calculate the scale denominator
@@ -50,42 +50,42 @@ class QgsUnitTypes

/** Returns the type for a distance unit.
*/
static DistanceUnitType unitType( QGis::UnitType unit );
static DistanceUnitType unitType( Qgis::UnitType unit );

/** Encodes a distance unit to a string.
* @param unit unit to encode
* @returns encoded string
* @see decodeDistanceUnit()
*/
static QString encodeUnit( QGis::UnitType unit );
static QString encodeUnit( Qgis::UnitType unit );

/** Decodes a distance unit from a string.
* @param string string to decode
* @param ok optional boolean, will be set to true if string was converted successfully
* @returns decoded units
* @see encodeUnit()
*/
static QGis::UnitType decodeDistanceUnit( const QString& string, bool *ok = 0 );
static Qgis::UnitType decodeDistanceUnit( const QString& string, bool *ok = 0 );

/** Returns a translated string representing a distance unit.
* @param unit unit to convert to string
* @see stringToDistanceUnit()
*/
static QString toString( QGis::UnitType unit );
static QString toString( Qgis::UnitType unit );

/** Converts a translated string to a distance unit.
* @param string string representing a distance unit
* @param ok optional boolean, will be set to true if string was converted successfully
* @see toString()
*/
static QGis::UnitType stringToDistanceUnit( const QString& string, bool *ok = 0 );
static Qgis::UnitType stringToDistanceUnit( const QString& string, bool *ok = 0 );

/** Returns the conversion factor between the specified distance units.
* @param fromUnit distance unit to convert from
* @param toUnit distance unit to convert to
* @returns multiplication factor to convert between units
*/
static double fromUnitToUnitFactor( QGis::UnitType fromUnit, QGis::UnitType toUnit );
static double fromUnitToUnitFactor( Qgis::UnitType fromUnit, Qgis::UnitType toUnit );

/** Returns the type for an areal unit.
*/
@@ -130,7 +130,7 @@ class QgsUnitTypes
* @param distanceUnit distance unit to convert
* @return matching areal unit
*/
static AreaUnit distanceToAreaUnit( QGis::UnitType distanceUnit );
static AreaUnit distanceToAreaUnit( Qgis::UnitType distanceUnit );

// ANGULAR UNITS

@@ -107,7 +107,7 @@ class QgsVectorDataProvider : QgsDataProvider
* Get feature type.
* @return int representing the feature type
*/
virtual QGis::WkbType geometryType() const = 0;
virtual Qgis::WkbType geometryType() const = 0;

/**
* Number of features in the layer

0 comments on commit 1a2231f

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