Skip to content

Commit 1a2231f

Browse files
committed
Rename QGis class to Qgis, for capitalisation consistency
1 parent b642c02 commit 1a2231f

File tree

513 files changed

+3465
-3459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

513 files changed

+3465
-3459
lines changed

doc/api_break.dox

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ This page tries to maintain a list with incompatible changes that happened in pr
4141

4242
</ul>
4343

44+
\subsection qgis_api_break_3_0_Qgis Qgis
45+
46+
<ul>
47+
<li>The QGis class was renamed to Qgis for capitalisation consistency with other class names</li>
48+
</ul>
49+
4450
\subsection qgis_api_break_3_0_QgsAuthConfigUriEdit QgsAuthConfigUriEdit
4551

4652
<ul>

python/analysis/vector/qgsgeometryanalyzer.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** \ingroup analysis
2-
* The QGis class provides vector geometry analysis functions
2+
* The Qgis class provides vector geometry analysis functions
33
*/
44

55
class QgsGeometryAnalyzer

python/analysis/vector/qgsoverlayanalyzer.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/** \ingroup analysis
3-
* The QGis class provides vector overlay analysis functions
3+
* The Qgis class provides vector overlay analysis functions
44
*/
55

66
class QgsOverlayAnalyzer

python/analysis/vector/qgszonalstatistics.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** \ingroup analysis
2-
* The QGis class that calculates raster statistics (count, sum, mean) for
2+
* The Qgis class that calculates raster statistics (count, sum, mean) for
33
* a polygon or multipolygon layer and appends the results as attributes
44
*/
55

python/core/dxf/qgsdxfexport.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ class QgsDxfExport
6363
* Set map units
6464
* @param u unit
6565
*/
66-
void setMapUnits( QGis::UnitType u );
66+
void setMapUnits( Qgis::UnitType u );
6767

6868
/**
6969
* Retrieve map units
7070
* @returns unit
7171
* @see setMapUnits
7272
*/
73-
QGis::UnitType mapUnits() const;
73+
Qgis::UnitType mapUnits() const;
7474

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

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

332332
//! Return cleaned layer name for use in DXF
333333
static QString dxfLayerName( const QString &name );

python/core/geometry/qgsgeometry.sip

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ class QgsGeometry
126126
/** Returns type of the geometry as a WKB type (point / linestring / polygon etc.)
127127
* @see type
128128
*/
129-
QGis::WkbType wkbType() const;
129+
Qgis::WkbType wkbType() const;
130130

131-
/** Returns type of the geometry as a QGis::GeometryType
131+
/** Returns type of the geometry as a Qgis::GeometryType
132132
* @see wkbType
133133
*/
134-
QGis::GeometryType type() const;
134+
Qgis::GeometryType type() const;
135135

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

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

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

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

519519
/* Accessor functions for getting geometry data */
520520

python/core/qgis.sip

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020

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

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

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

101101
enum GeometryType
102102
{
@@ -162,23 +162,23 @@ class QGis
162162

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

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

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

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

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

183183
/** Converts a string to a double in a permissive way, eg allowing for incorrect
184184
* numbers of digits between thousand separators

python/core/qgscoordinatereferencesystem.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ class QgsCoordinateReferenceSystem
446446

447447
/** Returns the units for the projection used by the CRS.
448448
*/
449-
QGis::UnitType mapUnits() const;
449+
Qgis::UnitType mapUnits() const;
450450

451451

452452
// Mutators -----------------------------------

python/core/qgsdatasourceuri.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,14 @@ class QgsDataSourceURI
165165

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

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

174174
//! @deprecated See setWkbType( QgsWKBTypes::Type )
175-
void setWkbType( QGis::WkbType type ) /Deprecated/;
175+
void setWkbType( Qgis::WkbType type ) /Deprecated/;
176176

177177
//! Sets the wkb type
178178
void setWkbType( QgsWKBTypes::Type type );

python/core/qgsdistancearea.sip

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class QgsDistanceArea
155155
* @note added in QGIS 2.14
156156
* @see areaUnits()
157157
*/
158-
QGis::UnitType lengthUnits() const;
158+
Qgis::UnitType lengthUnits() const;
159159

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

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

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

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

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

224224
/** Takes an area measurement calculated by this QgsDistanceArea object and converts it to a
225225
* different areal unit.

python/core/qgsexpression.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,14 @@ class QgsExpression
167167
* @note added in QGIS 2.14
168168
* @see setDistanceUnits()
169169
*/
170-
QGis::UnitType distanceUnits() const;
170+
Qgis::UnitType distanceUnits() const;
171171

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

179179
/** Returns the desired areal units for calculations involving geomCalculator(), eg "$area".
180180
* @note areas are only converted when a geomCalculator() has been set

python/core/qgsgml.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class QgsGml: QObject
2424
* @note available in python as getFeaturesUri
2525
*/
2626
int getFeatures( const QString& uri,
27-
QGis::WkbType* wkbType,
27+
Qgis::WkbType* wkbType,
2828
QgsRectangle* extent = 0,
2929
const QString& userName = QString(),
3030
const QString& password = QString(),
@@ -33,7 +33,7 @@ class QgsGml: QObject
3333
/** Read from GML data. Constructor uri param is ignored
3434
* Supports only UTF-8, UTF-16, ISO-8859-1, ISO-8859-1 XML encodings.
3535
*/
36-
int getFeatures( const QByteArray &data, QGis::WkbType* wkbType, QgsRectangle* extent = 0 );
36+
int getFeatures( const QByteArray &data, Qgis::WkbType* wkbType, QgsRectangle* extent = 0 );
3737

3838
/** Get parsed features for given type name */
3939
QMap<qint64, QgsFeature* > featuresMap() const;

python/core/qgsmaprenderer.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ class QgsMapRenderer : QObject
178178
//! Recalculate the map scale
179179
void updateScale();
180180

181-
QGis::UnitType mapUnits() const;
182-
void setMapUnits( QGis::UnitType u );
181+
Qgis::UnitType mapUnits() const;
182+
void setMapUnits( Qgis::UnitType u );
183183

184184
//! sets whether map image will be for overview
185185
void enableOverviewMode( bool isOverview = true );

python/core/qgsmapsettings.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ class QgsMapSettings
9191
QgsCoordinateReferenceSystem destinationCrs() const;
9292

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

9898
//! Set the background color of the map
9999
void setBackgroundColor( const QColor& color );

python/core/qgsproject.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class QgsProject : QObject
246246
* @note added in QGIS 2.14
247247
* @see areaUnits()
248248
*/
249-
QGis::UnitType distanceUnits() const;
249+
Qgis::UnitType distanceUnits() const;
250250

251251
/** Convenience function to query default area measurement units for project.
252252
* @note added in QGIS 2.14

python/core/qgsscalecalculator.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ class QgsScaleCalculator
1414
* Constructor
1515
* @param dpi Monitor resolution in dots per inch
1616
* @param mapUnits Units of the data on the map. Must match a value from the
17-
* QGis::UnitType enum (Meters, Feet, Degrees)
17+
* Qgis::UnitType enum (Meters, Feet, Degrees)
1818
*/
1919
QgsScaleCalculator( double dpi = 0,
20-
QGis::UnitType mapUnits = QGis::Meters );
20+
Qgis::UnitType mapUnits = Qgis::Meters );
2121

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

4040
/** Returns current map units */
41-
QGis::UnitType mapUnits() const;
41+
Qgis::UnitType mapUnits() const;
4242

4343
/**
4444
* Calculate the scale denominator

python/core/qgsunittypes.sip

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,42 +50,42 @@ class QgsUnitTypes
5050

5151
/** Returns the type for a distance unit.
5252
*/
53-
static DistanceUnitType unitType( QGis::UnitType unit );
53+
static DistanceUnitType unitType( Qgis::UnitType unit );
5454

5555
/** Encodes a distance unit to a string.
5656
* @param unit unit to encode
5757
* @returns encoded string
5858
* @see decodeDistanceUnit()
5959
*/
60-
static QString encodeUnit( QGis::UnitType unit );
60+
static QString encodeUnit( Qgis::UnitType unit );
6161

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

7070
/** Returns a translated string representing a distance unit.
7171
* @param unit unit to convert to string
7272
* @see stringToDistanceUnit()
7373
*/
74-
static QString toString( QGis::UnitType unit );
74+
static QString toString( Qgis::UnitType unit );
7575

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

8383
/** Returns the conversion factor between the specified distance units.
8484
* @param fromUnit distance unit to convert from
8585
* @param toUnit distance unit to convert to
8686
* @returns multiplication factor to convert between units
8787
*/
88-
static double fromUnitToUnitFactor( QGis::UnitType fromUnit, QGis::UnitType toUnit );
88+
static double fromUnitToUnitFactor( Qgis::UnitType fromUnit, Qgis::UnitType toUnit );
8989

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

135135
// ANGULAR UNITS
136136

python/core/qgsvectordataprovider.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class QgsVectorDataProvider : QgsDataProvider
107107
* Get feature type.
108108
* @return int representing the feature type
109109
*/
110-
virtual QGis::WkbType geometryType() const = 0;
110+
virtual Qgis::WkbType geometryType() const = 0;
111111

112112
/**
113113
* Number of features in the layer

0 commit comments

Comments
 (0)