diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 130867cacc1..43412958fda 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -326,15 +326,15 @@ class QgsComposition : QGraphicsScene, QgsExpressionContextGenerator /** Returns a composer item given its text identifier. * Ids are not necessarely unique, but this function returns only one element. - * @param theId - A QString representing the identifier of the item to retrieve. + * @param id - A QString representing the identifier of the item to retrieve. * @return QgsComposerItem pointer or 0 pointer if no such item exists. */ - const QgsComposerItem* getComposerItemById( const QString& theId ) const; + const QgsComposerItem* getComposerItemById( const QString& id ) const; /** Returns a composer item given its unique identifier. - * @param theUuid A QString representing the UUID of the item to + * @param uuid A QString representing the UUID of the item to */ - const QgsComposerItem* getComposerItemByUuid( const QString& theUuid ) const; + const QgsComposerItem* getComposerItemByUuid( const QString& uuid ) const; int printResolution() const; void setPrintResolution( const int dpi ); diff --git a/python/core/qgsapplication.sip b/python/core/qgsapplication.sip index 30b418900f4..06bfc4cc583 100644 --- a/python/core/qgsapplication.sip +++ b/python/core/qgsapplication.sip @@ -104,7 +104,7 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv) * based on the supplied theme name exists. If it does not the theme name will * be reverted to 'default'. */ - static void setThemeName( const QString &theThemeName ); + static void setThemeName( const QString &themeName ); /** Set the active theme to the specified theme. * The theme name should be a single word e.g. 'default','classic'. @@ -218,11 +218,11 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv) //! Helper to get a theme icon. It will fall back to the //! default theme if the active theme does not have the required icon. - static QIcon getThemeIcon( const QString &theName ); + static QIcon getThemeIcon( const QString &name ); //! Helper to get a theme icon as a pixmap. It will fall back to the //! default theme if the active theme does not have the required icon. - static QPixmap getThemePixmap( const QString &theName ); + static QPixmap getThemePixmap( const QString &name ); //! Returns the path to user's style. static QString userStylePath(); @@ -275,19 +275,19 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv) static QString libexecPath(); //! Alters prefix path - used by 3rd party apps - static void setPrefixPath( const QString &thePrefixPath, bool useDefaultPaths = false ); + static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false ); //! Alters plugin path - used by 3rd party apps - static void setPluginPath( const QString &thePluginPath ); + static void setPluginPath( const QString &pluginPath ); //! Alters pkg data path - used by 3rd party apps - static void setPkgDataPath( const QString &thePkgDataPath ); + static void setPkgDataPath( const QString &pkgDataPath ); //! Alters default svg paths - used by 3rd party apps. static void setDefaultSvgPaths( const QStringList& pathList ); //! Alters authentication data base directory path - used by 3rd party apps - static void setAuthDatabaseDirPath( const QString& theAuthDbDirPath ); + static void setAuthDatabaseDirPath( const QString& authDbDirPath ); //! loads providers static void initQgis(); @@ -352,13 +352,13 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv) * and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The * driver name should be the short format of the Gdal driver name e.g. GTIFF. */ - static void skipGdalDriver( const QString& theDriver ); + static void skipGdalDriver( const QString& driver ); /** Sets the GDAL_SKIP environment variable to exclude the specified driver * and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The * driver name should be the short format of the Gdal driver name e.g. GTIFF. */ - static void restoreGdalDriver( const QString& theDriver ); + static void restoreGdalDriver( const QString& driver ); /** Returns the list of gdal drivers that should be skipped (based on * GDAL_SKIP environment variable) diff --git a/python/core/qgscoordinatereferencesystem.sip b/python/core/qgscoordinatereferencesystem.sip index 59935111e3b..852852eca7f 100644 --- a/python/core/qgscoordinatereferencesystem.sip +++ b/python/core/qgscoordinatereferencesystem.sip @@ -168,20 +168,20 @@ class QgsCoordinateReferenceSystem * - "WKT:" - handled with createFromWkt() * * If no prefix is specified, WKT definition is assumed. - * @param theDefinition A String containing a coordinate reference system definition. + * @param definition A String containing a coordinate reference system definition. * @see createFromString() */ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix - explicit QgsCoordinateReferenceSystem( const QString& theDefinition ); + explicit QgsCoordinateReferenceSystem( const QString& definition ); /** Constructor a CRS object using a postgis SRID, an EPSG code or an internal QGIS CRS ID. * @note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code * wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile. - * @param theId The ID valid for the chosen CRS ID type - * @param theType One of the types described in CrsType + * @param id The ID valid for the chosen CRS ID type + * @param type One of the types described in CrsType */ - // TODO QGIS 3: remove theType and always use EPSG code - QgsCoordinateReferenceSystem( const long theId, CrsType theType = PostgisCrsId ); + // TODO QGIS 3: remove type and always use EPSG code + QgsCoordinateReferenceSystem( const long id, CrsType type = PostgisCrsId ); static QList< long > validSrsIds(); @@ -234,8 +234,8 @@ class QgsCoordinateReferenceSystem * wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile. * @return True on success else false */ - // TODO QGIS 3: remove theType and always use EPSG code, rename to createFromEpsg - bool createFromId( const long theId, CrsType theType = PostgisCrsId ); + // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg + bool createFromId( const long id, CrsType type = PostgisCrsId ); /** * Sets this CRS to the given OGC WMS-format Coordinate Reference Systems. @@ -247,14 +247,14 @@ class QgsCoordinateReferenceSystem * @return True on success else false */ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid()) - bool createFromOgcWmsCrs( const QString& theCrs ); + bool createFromOgcWmsCrs( const QString& crs ); /** Sets this CRS by lookup of the given PostGIS SRID in the CRS database. - * @param theSrid The postgis SRID for the desired spatial reference system. + * @param srid The postgis SRID for the desired spatial reference system. * @return True on success else false */ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead - bool createFromSrid( const long theSrid ); + bool createFromSrid( const long srid ); /** Sets this CRS using a WKT definition. * @@ -264,20 +264,20 @@ class QgsCoordinateReferenceSystem * set up the object. * @note Some members may be left blank if no match can be found in CRS database. * @note this method uses an internal cache. Call invalidateCache() to clear the cache. - * @param theWkt The WKT for the desired spatial reference system. + * @param wkt The WKT for the desired spatial reference system. * @return True on success else false */ - bool createFromWkt( const QString &theWkt ); + bool createFromWkt( const QString &wkt ); /** Sets this CRS by lookup of internal QGIS CRS ID in the CRS database. * * If the srsid is < USER_CRS_START_ID, system CRS database is used, otherwise * user's local CRS database from home directory is used. * @note this method uses an internal cache. Call invalidateCache() to clear the cache. - * @param theSrsId The internal QGIS CRS ID for the desired spatial reference system. + * @param srsId The internal QGIS CRS ID for the desired spatial reference system. * @return True on success else false */ - bool createFromSrsId( const long theSrsId ); + bool createFromSrsId( const long srsId ); /** Sets this CRS by passing it a PROJ.4 style formatted string. * @@ -297,10 +297,10 @@ class QgsCoordinateReferenceSystem * * @note Some members may be left blank if no match can be found in CRS database. * @note this method uses an internal cache. Call invalidateCache() to clear the cache. - * @param theProjString A proj4 format string + * @param projString A proj4 format string * @return True on success else false */ - bool createFromProj4( const QString &theProjString ); + bool createFromProj4( const QString &projString ); /** Set up this CRS from a string definition. * @@ -312,10 +312,10 @@ class QgsCoordinateReferenceSystem * - "WKT:" - handled with createFromWkt() * * If no prefix is specified, WKT definition is assumed. - * @param theDefinition A String containing a coordinate reference system definition. + * @param definition A String containing a coordinate reference system definition. * @return True on success else false */ - bool createFromString( const QString &theDefinition ); + bool createFromString( const QString &definition ); /** Set up this CRS from various text formats. * @@ -328,11 +328,11 @@ class QgsCoordinateReferenceSystem * ( http://www.gdal.org/ogr/classOGRSpatialReference.html#aec3c6a49533fe457ddc763d699ff8796 ) * @note this function generates a WKT string using OSRSetFromUserInput() and * passes it to createFromWkt() function. - * @param theDefinition A String containing a coordinate reference system definition. + * @param definition A String containing a coordinate reference system definition. * @return True on success else false */ // TODO QGIS3: rename to createFromStringOGR so it is clear it's similar to createFromString, just different backend - bool createFromUserInput( const QString &theDefinition ); + bool createFromUserInput( const QString &definition ); /** Make sure that ESRI WKT import is done properly. * This is required for proper shapefile CRS import when using gdal>= 1.9. @@ -372,24 +372,24 @@ class QgsCoordinateReferenceSystem * * Internally it will use authid() for comparison. */ - bool operator==( const QgsCoordinateReferenceSystem &theSrs ) const; + bool operator==( const QgsCoordinateReferenceSystem &srs ) const; /** Overloaded != operator used to compare to CRS's. * * Returns opposite bool value to operator == */ - bool operator!=( const QgsCoordinateReferenceSystem &theSrs ) const; + bool operator!=( const QgsCoordinateReferenceSystem &srs ) const; /** Restores state from the given DOM node. - * @param theNode The node from which state will be restored + * @param node The node from which state will be restored * @return bool True on success, False on failure */ - bool readXml( const QDomNode & theNode ); + bool readXml( const QDomNode & node ); /** Stores state to the given Dom node in the given document. - * @param theNode The node in which state will be restored - * @param theDoc The document in which state will be stored + * @param node The node in which state will be restored + * @param doc The document in which state will be stored * @return bool True on success, False on failure */ - bool writeXml( QDomNode & theNode, QDomDocument & theDoc ) const; + bool writeXml( QDomNode & node, QDomDocument & doc ) const; /** Sets custom function to force valid CRS diff --git a/python/core/qgscredentials.sip b/python/core/qgscredentials.sip index edd676964b9..0ac6b089ce7 100644 --- a/python/core/qgscredentials.sip +++ b/python/core/qgscredentials.sip @@ -46,7 +46,7 @@ class QgsCredentials virtual bool requestMasterPassword( QString &password /In,Out/, bool stored = false ) = 0; //! register instance - void setInstance( QgsCredentials *theInstance ); + void setInstance( QgsCredentials *instance ); private: QgsCredentials( const QgsCredentials& ); diff --git a/python/core/qgsdataprovider.sip b/python/core/qgsdataprovider.sip index 9a30fb14f23..0808d120862 100644 --- a/python/core/qgsdataprovider.sip +++ b/python/core/qgsdataprovider.sip @@ -329,8 +329,8 @@ class QgsDataProvider : QObject protected: /** Add error message */ - void appendError( const QgsErrorMessage & theMessage ); + void appendError( const QgsErrorMessage & message ); /** Set error message */ - void setError( const QgsError & theError ); + void setError( const QgsError & error ); }; diff --git a/python/core/qgsdatasourceuri.sip b/python/core/qgsdatasourceuri.sip index 04eb1ca5408..27db1364c09 100644 --- a/python/core/qgsdatasourceuri.sip +++ b/python/core/qgsdatasourceuri.sip @@ -118,13 +118,13 @@ class QgsDataSourceUri QString geometryColumn() const; //! set use Estimated Metadata - void setUseEstimatedMetadata( bool theFlag ); + void setUseEstimatedMetadata( bool flag ); //! Returns true if estimated metadata are used bool useEstimatedMetadata() const; //! Set to true to disable selection by id - void disableSelectAtId( bool theFlag ); + void disableSelectAtId( bool flag ); //! Returns whether the selection by id is disabled bool selectAtIdDisabled() const; diff --git a/python/core/qgsdatumtransformstore.sip b/python/core/qgsdatumtransformstore.sip index f3b3676b4ac..1f63e39da6b 100644 --- a/python/core/qgsdatumtransformstore.sip +++ b/python/core/qgsdatumtransformstore.sip @@ -30,7 +30,7 @@ class QgsDatumTransformStore void readXml( const QDomNode& parentNode ); - void writeXml( QDomNode& parentNode, QDomDocument& theDoc ) const; + void writeXml( QDomNode& parentNode, QDomDocument& doc ) const; struct Entry { diff --git a/python/core/qgserror.sip b/python/core/qgserror.sip index 8b4e99ccb9c..badc113f523 100644 --- a/python/core/qgserror.sip +++ b/python/core/qgserror.sip @@ -14,13 +14,13 @@ class QgsErrorMessage QgsErrorMessage(); /** Constructor. - * @param theMessage error message string - * @param theTag error label, for example GDAL, GDAL Provider, Raster layer - * @param theFile the file where error was created - * @param theFunction the function where error was created - * @param theLine the line where error was created + * @param message error message string + * @param tag error label, for example GDAL, GDAL Provider, Raster layer + * @param file the file where error was created + * @param function the function where error was created + * @param line the line where error was created */ - QgsErrorMessage( const QString & theMessage, const QString & theTag = QString::null, const QString & theFile = QString::null, const QString & theFunction = QString::null, int theLine = 0 ); + QgsErrorMessage( const QString & message, const QString & tag = QString::null, const QString & file = QString::null, const QString & function = QString::null, int line = 0 ); QString message() const; QString tag() const; @@ -44,21 +44,21 @@ class QgsError QgsError(); /** Constructor with single message. - * @param theMessage error message - * @param theTag short description, e.g. GDAL, Provider, Layer + * @param message error message + * @param tag short description, e.g. GDAL, Provider, Layer */ - QgsError( const QString & theMessage, const QString & theTag ); + QgsError( const QString & message, const QString & tag ); /** Append new error message. - * @param theMessage error message string - * @param theTag error label, for example GDAL, GDAL Provider, Raster layer + * @param message error message string + * @param tag error label, for example GDAL, GDAL Provider, Raster layer */ - void append( const QString & theMessage, const QString & theTag ); + void append( const QString & message, const QString & tag ); /** Append new error message. - * @param theMessage error message + * @param message error message */ - void append( const QgsErrorMessage & theMessage ); + void append( const QgsErrorMessage & message ); /** Test if any error is set. * @return true if contains error @@ -66,10 +66,10 @@ class QgsError bool isEmpty() const; /** Full error messages description - * @param theFormat output format + * @param format output format * @return error report */ - QString message( QgsErrorMessage::Format theFormat = QgsErrorMessage::Html ) const; + QString message( QgsErrorMessage::Format format = QgsErrorMessage::Html ) const; /** Short error description, usually the first error in chain, the real error. * @return error description diff --git a/python/core/qgsfeaturestore.sip b/python/core/qgsfeaturestore.sip index a6f528af5c0..6b55152cf58 100644 --- a/python/core/qgsfeaturestore.sip +++ b/python/core/qgsfeaturestore.sip @@ -32,7 +32,7 @@ class QgsFeatureStore QgsFeatureList& features(); /** Set map of optional parameters */ - void setParams( const QMap &theParams ); + void setParams( const QMap ¶ms ); /** Get map of optional parameters */ QMap params() const; diff --git a/python/core/qgslogger.sip b/python/core/qgslogger.sip index 6a632867f7e..6c182456cfc 100644 --- a/python/core/qgslogger.sip +++ b/python/core/qgslogger.sip @@ -48,7 +48,7 @@ class QgsLogger static int debugLevel(); /** Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. **/ - static void logMessageToFile( const QString& theMessage ); + static void logMessageToFile( const QString& message ); /** Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set, * otherwise returns a file name for writing log messages to.*/ diff --git a/python/core/qgsmapsettings.sip b/python/core/qgsmapsettings.sip index 69bdacbc1a8..35f611d08fd 100644 --- a/python/core/qgsmapsettings.sip +++ b/python/core/qgsmapsettings.sip @@ -173,51 +173,51 @@ class QgsMapSettings const QgsMapToPixel& mapToPixel() const; /** Computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits - * @param theLayer The layer + * @param layer The layer * @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used * @note added in QGIS 2.12 */ - double layerToMapUnits( QgsMapLayer* theLayer, const QgsRectangle& referenceExtent = QgsRectangle() ) const; + double layerToMapUnits( QgsMapLayer* layer, const QgsRectangle& referenceExtent = QgsRectangle() ) const; /** * @brief transform bounding box from layer's CRS to output CRS - * @see layerToMapCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) if you want to transform a rectangle + * @see layerToMapCoordinates( QgsMapLayer* layer, QgsRectangle rect ) if you want to transform a rectangle * @return a bounding box (aligned rectangle) containing the transformed extent */ - QgsRectangle layerExtentToOutputExtent( QgsMapLayer* theLayer, QgsRectangle extent ) const; + QgsRectangle layerExtentToOutputExtent( QgsMapLayer* layer, QgsRectangle extent ) const; /** * @brief transform bounding box from output CRS to layer's CRS - * @see mapToLayerCoordinates( QgsMapLayer* theLayer,QgsRectangle rect ) if you want to transform a rectangle + * @see mapToLayerCoordinates( QgsMapLayer* layer,QgsRectangle rect ) if you want to transform a rectangle * @return a bounding box (aligned rectangle) containing the transformed extent */ - QgsRectangle outputExtentToLayerExtent( QgsMapLayer* theLayer, QgsRectangle extent ) const; + QgsRectangle outputExtentToLayerExtent( QgsMapLayer* layer, QgsRectangle extent ) const; /** * @brief transform point coordinates from layer's CRS to output CRS * @return the transformed point */ - QgsPoint layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint point ) const; + QgsPoint layerToMapCoordinates( QgsMapLayer* layer, QgsPoint point ) const; /** * @brief transform rectangle from layer's CRS to output CRS * @see layerExtentToOutputExtent() if you want to transform a bounding box * @return the transformed rectangle */ - QgsRectangle layerToMapCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) const; + QgsRectangle layerToMapCoordinates( QgsMapLayer* layer, QgsRectangle rect ) const; /** * @brief transform point coordinates from output CRS to layer's CRS * @return the transformed point */ - QgsPoint mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint point ) const; + QgsPoint mapToLayerCoordinates( QgsMapLayer* layer, QgsPoint point ) const; /** * @brief transform rectangle from output CRS to layer's CRS * @see outputExtentToLayerExtent() if you want to transform a bounding box * @return the transformed rectangle */ - QgsRectangle mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) const; + QgsRectangle mapToLayerCoordinates( QgsMapLayer* layer, QgsRectangle rect ) const; /** * @brief Return coordinate transform from layer's CRS to destination CRS @@ -231,9 +231,9 @@ class QgsMapSettings /* serialization */ - void readXml( QDomNode& theNode ); + void readXml( QDomNode& node ); - void writeXml( QDomNode& theNode, QDomDocument& theDoc ); + void writeXml( QDomNode& node, QDomDocument& doc ); /** Sets the segmentation tolerance applied when rendering curved geometries @param tolerance the segmentation tolerance*/ diff --git a/python/core/qgsmultirenderchecker.sip b/python/core/qgsmultirenderchecker.sip index a1ed1f2eae1..2ad681b753f 100644 --- a/python/core/qgsmultirenderchecker.sip +++ b/python/core/qgsmultirenderchecker.sip @@ -27,7 +27,7 @@ class QgsMultiRenderChecker * suffixed) the path to the image will be constructed like this: * controlImagePath + '/' + mControlName + '/' + mControlName + '.png' */ - void setControlName( const QString& theName ); + void setControlName( const QString& name ); void setControlPathPrefix( const QString& prefix ); @@ -50,25 +50,25 @@ class QgsMultiRenderChecker * Set tolerance for color components used by runTest() * Default value is 0. * - * @param theColorTolerance The maximum difference for each color component + * @param colorTolerance The maximum difference for each color component * including alpha to be considered correct. */ - void setColorTolerance( unsigned int theColorTolerance ); + void setColorTolerance( unsigned int colorTolerance ); /** * Test using renderer to generate the image to be compared. * - * @param theTestName - to be used as the basis for writing a file to + * @param testName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png * - * @param theMismatchCount - defaults to 0 - the number of pixels that + * @param mismatchCount - defaults to 0 - the number of pixels that * are allowed to be different from the control image. In some cases * rendering may be non-deterministic. This parameter allows you to account * for that by providing a tolerance. * * @note make sure to call setExpectedImage and setMapSettings first */ - bool runTest( const QString& theTestName, unsigned int theMismatchCount = 0 ); + bool runTest( const QString& testName, unsigned int mismatchCount = 0 ); /** * Returns a report for this test diff --git a/python/core/qgsnetworkaccessmanager.sip b/python/core/qgsnetworkaccessmanager.sip index 736cf0444b4..dc0eeab1b8b 100644 --- a/python/core/qgsnetworkaccessmanager.sip +++ b/python/core/qgsnetworkaccessmanager.sip @@ -48,10 +48,10 @@ class QgsNetworkAccessManager : QNetworkAccessManager void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes ); //! Get name for QNetworkRequest::CacheLoadControl - static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl theControl ); + static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl control ); //! Get QNetworkRequest::CacheLoadControl from name - static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &theName ); + static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &name ); //! Setup the NAM according to the user's settings #spellok void setupDefaultProxyAndCache(); diff --git a/python/core/qgsowsconnection.sip b/python/core/qgsowsconnection.sip index 4e56cdd7d16..6fb8d44b192 100644 --- a/python/core/qgsowsconnection.sip +++ b/python/core/qgsowsconnection.sip @@ -7,24 +7,24 @@ class QgsOwsConnection : QObject public: /** * Constructor - * @param theService service name: WMS,WFS,WCS - * @param theConnName connection name + * @param service service name: WMS,WFS,WCS + * @param connName connection name */ - QgsOwsConnection( const QString & theService, const QString & theConnName ); + QgsOwsConnection( const QString & service, const QString & connName ); //! Destructor ~QgsOwsConnection(); /** Returns the list of connections for the specified service */ - static QStringList connectionList( const QString & theService ); + static QStringList connectionList( const QString & service ); /** Deletes the connection for the specified service with the specified name */ - static void deleteConnection( const QString & theService, const QString & name ); + static void deleteConnection( const QString & service, const QString & name ); /** Retrieves the selected connection for the specified service */ - static QString selectedConnection( const QString & theService ); + static QString selectedConnection( const QString & service ); /** Marks the specified connection for the specified service as selected */ - static void setSelectedConnection( const QString & theService, const QString & name ); + static void setSelectedConnection( const QString & service, const QString & name ); QString mConnName; /** Returns the connection uri */ diff --git a/python/core/qgspoint.sip b/python/core/qgspoint.sip index 810dce35863..63438b602d0 100644 --- a/python/core/qgspoint.sip +++ b/python/core/qgspoint.sip @@ -179,29 +179,29 @@ class QgsPoint QString toString() const; //! As above but with precision for string representation of a point - QString toString( int thePrecision ) const; + QString toString( int precision ) const; /** Return a string representation as degrees minutes seconds. * Its up to the calling function to ensure that this point can * be meaningfully represented in this form. - * @param thePrecision number of decimal points to use for seconds + * @param precision number of decimal points to use for seconds * @param useSuffix set to true to include a direction suffix (e.g., 'N'), * set to false to use a "-" prefix for west and south coordinates * @param padded set to true to force minutes and seconds to use two decimals, * e.g., '05' instead of '5'. */ - QString toDegreesMinutesSeconds( int thePrecision, const bool useSuffix = true, const bool padded = false ) const; + QString toDegreesMinutesSeconds( int precision, const bool useSuffix = true, const bool padded = false ) const; /** Return a string representation as degrees minutes. * Its up to the calling function to ensure that this point can * be meaningfully represented in this form. - * @param thePrecision number of decimal points to use for minutes + * @param precision number of decimal points to use for minutes * @param useSuffix set to true to include a direction suffix (e.g., 'N'), * set to false to use a "-" prefix for west and south coordinates * @param padded set to true to force minutes to use two decimals, * e.g., '05' instead of '5'. */ - QString toDegreesMinutes( int thePrecision, const bool useSuffix = true, const bool padded = false ) const; + QString toDegreesMinutes( int precision, const bool useSuffix = true, const bool padded = false ) const; /** Return the well known text representation for the point. diff --git a/python/core/qgsrectangle.sip b/python/core/qgsrectangle.sip index 3a1b726787a..d21e8f61790 100644 --- a/python/core/qgsrectangle.sip +++ b/python/core/qgsrectangle.sip @@ -93,7 +93,7 @@ class QgsRectangle //! returns string representation of form xmin,ymin xmax,ymax QString toString( bool automaticPrecision = false ) const; //! overloaded toString that allows precision of numbers to be set - QString toString( int thePrecision ) const; + QString toString( int precision ) const; //! returns rectangle as a polygon QString asPolygon() const; /** Comparison operator diff --git a/python/core/qgsrenderchecker.sip b/python/core/qgsrenderchecker.sip index 225cd17c934..9ee6ad07ae3 100644 --- a/python/core/qgsrenderchecker.sip +++ b/python/core/qgsrenderchecker.sip @@ -21,25 +21,25 @@ class QgsRenderChecker unsigned int matchTarget(); //only records time for actual render part int elapsedTime(); - void setElapsedTimeTarget( int theTarget ); + void setElapsedTimeTarget( int target ); /** Base directory name for the control image (with control image path * suffixed) the path to the image will be constructed like this: * controlImagePath + '/' + mControlName + '/' + mControlName + '.png' */ - void setControlName( const QString &theName ); + void setControlName( const QString &name ); /** Prefix where the control images are kept. * This will be appended to controlImagePath */ - void setControlPathPrefix( const QString &theName ); + void setControlPathPrefix( const QString &name ); - void setControlPathSuffix( const QString& theName ); + void setControlPathSuffix( const QString& name ); /** Get an md5 hash that uniquely identifies an image */ - QString imageToHash( const QString& theImageFile ); + QString imageToHash( const QString& imageFile ); - void setRenderedImage( const QString& theImageFileName ); + void setRenderedImage( const QString& imageFileName ); /** * The path of the rendered image can be retrieved through that method. @@ -54,11 +54,11 @@ class QgsRenderChecker /** Set tolerance for color components used by runTest() and compareImages(). * Default value is 0. - * @param theColorTolerance is maximum difference for each color component + * @param colorTolerance is maximum difference for each color component * including alpha to be considered correct. * @note added in 2.1 */ - void setColorTolerance( unsigned int theColorTolerance ); + void setColorTolerance( unsigned int colorTolerance ); /** Sets the largest allowable difference in size between the rendered and the expected image. * @param xTolerance x tolerance in pixels @@ -69,28 +69,28 @@ class QgsRenderChecker /** * Test using renderer to generate the image to be compared. - * @param theTestName - to be used as the basis for writing a file to + * @param testName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png - * @param theMismatchCount - defaults to 0 - the number of pixels that + * @param mismatchCount - defaults to 0 - the number of pixels that * are allowed to be different from the control image. In some cases * rendering may be non-deterministic. This parameter allows you to account * for that by providing a tolerance. * @note make sure to call setExpectedImage and setMapRenderer first */ - bool runTest( const QString& theTestName, unsigned int theMismatchCount = 0 ); + bool runTest( const QString& testName, unsigned int mismatchCount = 0 ); /** * Test using two arbitrary images (map renderer will not be used) - * @param theTestName - to be used as the basis for writing a file to + * @param testName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png - * @param theMismatchCount - defaults to 0 - the number of pixels that + * @param mismatchCount - defaults to 0 - the number of pixels that * are allowed to be different from the control image. In some cases * rendering may be non-deterministic. This parameter allows you to account * for that by providing a tolerance. - * @param theRenderedImageFile to optionally override the output filename + * @param renderedImageFile to optionally override the output filename * @note: make sure to call setExpectedImage and setRenderedImage first. */ - bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, const QString& theRenderedImageFile = "" ); + bool compareImages( const QString& testName, unsigned int mismatchCount = 0, const QString& renderedImageFile = "" ); /** Get a list of all the anomalies. An anomaly is a rendered difference * file where there is some red pixel content (indicating a render check * mismatch), but where the output was still acceptable. If the render @@ -98,7 +98,7 @@ class QgsRenderChecker * acceptable. * @return a bool indicating if the diff matched one of the anomaly files */ - bool isKnownAnomaly( const QString& theDiffImageFile ); + bool isKnownAnomaly( const QString& diffImageFile ); /** Draws a checkboard pattern for image backgrounds, so that transparency is visible * without requiring a transparent background for the image diff --git a/python/core/qgsvectorfilewriter.sip b/python/core/qgsvectorfilewriter.sip index cdb5bffdafd..9a0687db6f3 100644 --- a/python/core/qgsvectorfilewriter.sip +++ b/python/core/qgsvectorfilewriter.sip @@ -389,10 +389,10 @@ class QgsVectorFileWriter ~QgsVectorFileWriter(); /** Delete a shapefile (and its accompanying shx / dbf / prf) - * @param theFileName /path/to/file.shp + * @param fileName /path/to/file.shp * @return bool true if the file was deleted successfully */ - static bool deleteShapeFile( const QString& theFileName ); + static bool deleteShapeFile( const QString& fileName ); SymbologyExport symbologyExport() const; void setSymbologyExport( SymbologyExport symExport ); diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 854f0fae010..a61341786d5 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -661,16 +661,16 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator /** * Load a named style from file/local db/datasource db * @param theURI the URI of the style or the URI of the layer - * @param theResultFlag will be set to true if a named style is correctly loaded + * @param resultFlag will be set to true if a named style is correctly loaded * @param loadFromLocalDb if true forces to load from local db instead of datasource one */ - virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag /Out/, bool loadFromLocalDb ); + virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/, bool loadFromLocalDb ); /** - * Calls loadNamedStyle( theURI, theResultFlag, false ); + * Calls loadNamedStyle( theURI, resultFlag, false ); * Retained for backward compatibility */ - virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag /Out/ ); + virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/ ); /** Read the symbology for the current layer from the Dom node supplied. * @param node node that will contain the symbology definition for this layer. diff --git a/python/core/raster/qgscolorrampshader.sip b/python/core/raster/qgscolorrampshader.sip index cdd93b81635..e011a57cce9 100644 --- a/python/core/raster/qgscolorrampshader.sip +++ b/python/core/raster/qgscolorrampshader.sip @@ -22,14 +22,14 @@ class QgsColorRampShader : QgsRasterShaderFunction }; /** Creates a new color ramp shader. - * @param theMinimumValue minimum value for the raster shader - * @param theMaximumValue maximum value for the raster shader - * @param theType interpolation type used - * @param theClassificationMode method used to classify the color ramp shader - * @param theColorRamp vector color ramp used to classify the color ramp shader + * @param minimumValue minimum value for the raster shader + * @param maximumValue maximum value for the raster shader + * @param type interpolation type used + * @param classificationMode method used to classify the color ramp shader + * @param colorRamp vector color ramp used to classify the color ramp shader * @returns new QgsColorRampShader */ - QgsColorRampShader( double theMinimumValue = 0.0, double theMaximumValue = 255.0, QgsColorRamp* theColorRamp = nullptr, Type theType = Interpolated, ClassificationMode theClassificationMode = Continuous ); + QgsColorRampShader( double minimumValue = 0.0, double maximumValue = 255.0, QgsColorRamp* colorRamp = nullptr, Type type = Interpolated, ClassificationMode classificationMode = Continuous ); ~QgsColorRampShader(); @@ -74,13 +74,13 @@ class QgsColorRampShader : QgsRasterShaderFunction QString colorRampTypeAsQString(); /** \brief Set custom colormap */ - void setColorRampItemList( const QList& theList ); //TODO: sort on set + void setColorRampItemList( const QList& list ); //TODO: sort on set /** \brief Set the color ramp type*/ - void setColorRampType( QgsColorRampShader::Type theColorRampType ); + void setColorRampType( QgsColorRampShader::Type colorRampType ); /** \brief Set the color ramp type*/ - void setColorRampType( const QString& theType ); + void setColorRampType( const QString& type ); /** Classify color ramp shader * @param classes number of classes diff --git a/python/core/raster/qgscontrastenhancement.sip b/python/core/raster/qgscontrastenhancement.sip index 8e491947b79..92a2f0e3166 100644 --- a/python/core/raster/qgscontrastenhancement.sip +++ b/python/core/raster/qgscontrastenhancement.sip @@ -17,7 +17,7 @@ class QgsContrastEnhancement UserDefinedEnhancement }; - QgsContrastEnhancement( Qgis::DataType theDatatype = Qgis::Byte ); + QgsContrastEnhancement( Qgis::DataType datatype = Qgis::Byte ); ~QgsContrastEnhancement(); /* diff --git a/python/core/raster/qgsrasterblock.sip b/python/core/raster/qgsrasterblock.sip index 6e0520a6a3d..488abc84752 100644 --- a/python/core/raster/qgsrasterblock.sip +++ b/python/core/raster/qgsrasterblock.sip @@ -9,21 +9,21 @@ class QgsRasterBlock QgsRasterBlock(); /** \brief Constructor which allocates data block in memory - * @param theDataType raster data type - * @param theWidth width of data matrix - * @param theHeight height of data matrix + * @param dataType raster data type + * @param width width of data matrix + * @param height height of data matrix */ - QgsRasterBlock( Qgis::DataType theDataType, int theWidth, int theHeight ); + QgsRasterBlock( Qgis::DataType dataType, int width, int height ); virtual ~QgsRasterBlock(); /** \brief Reset block - * @param theDataType raster data type - * @param theWidth width of data matrix - * @param theHeight height of data matrix + * @param dataType raster data type + * @param width width of data matrix + * @param height height of data matrix * @return true on success */ - bool reset( Qgis::DataType theDataType, int theWidth, int theHeight ); + bool reset( Qgis::DataType dataType, int width, int height ); // TODO: consider if use isValid() at all, isEmpty() should be sufficient // and works also if block is valid but empty - difference between valid and empty? @@ -93,10 +93,10 @@ class QgsRasterBlock double noDataValue() const; /** Get byte array representing a value. - * @param theDataType data type - * @param theValue value + * @param dataType data type + * @param value value * @return byte array representing the value */ - static QByteArray valueBytes( Qgis::DataType theDataType, double theValue ); + static QByteArray valueBytes( Qgis::DataType dataType, double value ); /** \brief Read a single value if type of block is numeric. If type is color, * returned value is undefined. @@ -176,7 +176,7 @@ class QgsRasterBlock /** \brief Set the whole block to no data except specified rectangle * @return true on success */ - bool setIsNoDataExcept( QRect theExceptRect ); + bool setIsNoDataExcept( QRect exceptRect ); /** \brief Remove no data flag on pixel. If the raster block does not have an explicit * no data value set then an internal map of no data pixels is maintained for the block. @@ -270,20 +270,20 @@ class QgsRasterBlock QgsError error() const; /** \brief Set error */ - void setError( const QgsError & theError ); + void setError( const QgsError & error ); QString toString() const; - /** \brief For theExtent and theWidth, theHeight find rectangle covered by subextent. + /** \brief For extent and width, height find rectangle covered by subextent. * The output rect has x oriented from left to right and y from top to bottom * (upper-left to lower-right orientation). - * @param theExtent extent, usually the larger - * @param theWidth numbers of columns in theExtent - * @param theHeight numbers of rows in theExtent - * @param theSubExtent extent, usually smaller than theExtent + * @param extent extent, usually the larger + * @param width numbers of columns in theExtent + * @param height numbers of rows in theExtent + * @param subExtent extent, usually smaller than theExtent * @return the rectangle covered by sub extent */ - static QRect subRect( const QgsRectangle &theExtent, int theWidth, int theHeight, const QgsRectangle &theSubExtent ); + static QRect subRect( const QgsRectangle &extent, int width, int height, const QgsRectangle &subExtent ); /** Returns the width (number of columns) of the raster block. * @see height diff --git a/python/core/raster/qgsrasterchecker.sip b/python/core/raster/qgsrasterchecker.sip index fd87a395d17..f2da505c8c2 100644 --- a/python/core/raster/qgsrasterchecker.sip +++ b/python/core/raster/qgsrasterchecker.sip @@ -21,12 +21,12 @@ class QgsRasterChecker QString report(); /** * Test using renderer to generate the image to be compared. - * @param theVerifiedKey verified provider key - * @param theVerifiedUri URI of the raster to be verified - * @param theExpectedKey expected provider key - * @param theExpectedUri URI of the expected (control) raster + * @param verifiedKey verified provider key + * @param verifiedUri URI of the raster to be verified + * @param expectedKey expected provider key + * @param expectedUri URI of the expected (control) raster */ - bool runTest( const QString& theVerifiedKey, QString theVerifiedUri, - const QString& theExpectedKey, QString theExpectedUri ); + bool runTest( const QString& verifiedKey, QString verifiedUri, + const QString& expectedKey, QString expectedUri ); }; diff --git a/python/core/raster/qgsrasterdataprovider.sip b/python/core/raster/qgsrasterdataprovider.sip index 932df5e33ba..9cb63ea11ec 100644 --- a/python/core/raster/qgsrasterdataprovider.sip +++ b/python/core/raster/qgsrasterdataprovider.sip @@ -66,14 +66,14 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface virtual Qgis::DataType sourceDataType( int bandNo ) const = 0; /** Returns data type for the band specified by number */ - virtual int colorInterpretation( int theBandNo ) const; + virtual int colorInterpretation( int bandNo ) const; QString colorName( int colorInterpretation ) const; /** Reload data (data could change) */ virtual bool reload(); - virtual QString colorInterpretationName( int theBandNo ) const; + virtual QString colorInterpretationName( int bandNo ) const; /** Read band scale for raster value * @note added in 2.3 @@ -92,8 +92,8 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface virtual int xSize() const; virtual int ySize() const; - /** Read block of data using given extent and size. */ - virtual QgsRasterBlock *block( int theBandNo, const QgsRectangle &theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback = nullptr ) / Factory /; + //! Read block of data using given extent and size. + virtual QgsRasterBlock *block(int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback* feedback = 0 ); /** Return true if source band has no data value */ virtual bool sourceHasNoDataValue( int bandNo ) const; @@ -147,10 +147,10 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface virtual QgsImageFetcher* getLegendGraphicFetcher( const QgsMapSettings* mapSettings ) /Factory/; /** \brief Create pyramid overviews */ - virtual QString buildPyramids( const QList & thePyramidList, - const QString & theResamplingMethod = "NEAREST", - QgsRaster::RasterPyramidsFormat theFormat = QgsRaster::PyramidsGTiff, - const QStringList & theConfigOptions = QStringList() ); + virtual QString buildPyramids( const QList & pyramidList, + const QString & resamplingMethod = "NEAREST", + QgsRaster::RasterPyramidsFormat format = QgsRaster::PyramidsGTiff, + const QStringList & configOptions = QStringList() ); /** \brief Accessor for the raster layers pyramid list. * @param overviewList used to construct the pyramid list (optional), when empty the list is defined by the provider. @@ -171,7 +171,7 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface virtual QString metadata() = 0; /** \brief Identify raster value(s) found on the point position. The context - * parameters theExtent, theWidth and theHeight are important to identify + * parameters extent, width and height are important to identify * on the same zoom level as a displayed map and to do effective * caching (WCS). If context params are not specified the highest * resolution is used. capabilities() may be used to test if format @@ -180,12 +180,12 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface * * \note The arbitraryness of the returned document is enforced by WMS standards * up to at least v1.3.0 - * @param thePoint coordinates in data source CRS - * @param theFormat result format - * @param theExtent context extent - * @param theWidth context width - * @param theHeight context height - * @param theDpi context dpi + * @param point coordinates in data source CRS + * @param format result format + * @param extent context extent + * @param width context width + * @param height context height + * @param dpi context dpi * @return QgsRaster::IdentifyFormatValue: map of values for each band, keys are band numbers * (from 1). * QgsRaster::IdentifyFormatFeature: map of QgsRasterFeatureList for each sublayer @@ -193,8 +193,8 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface * QgsRaster::IdentifyFormatHtml: map of HTML strings for each sublayer (WMS). * Empty if failed or there are no results (TODO: better error reporting). */ - //virtual QMap identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0 ); - virtual QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ); + //virtual QMap identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &extent = QgsRectangle(), int width = 0, int height = 0 ); + virtual QgsRasterIdentifyResult identify(const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ); /** * \brief Returns the caption error text for the last error in this provider @@ -305,7 +305,7 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface * @note used by GDAL provider only */ virtual QString validatePyramidsConfigOptions( QgsRaster::RasterPyramidsFormat pyramidsFormat, - const QStringList & theConfigOptions, const QString & fileFormat ); + const QStringList & configOptions, const QString & fileFormat ); static QString identifyFormatName( QgsRaster::IdentifyFormat format ); static QgsRaster::IdentifyFormat identifyFormatFromName( const QString& formatName ); @@ -318,9 +318,9 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface signals: /** Emit a signal to notify of the progress event. - * Emitted theProgress is in percents (0.0-100.0) */ - void progress( int theType, double theProgress, const QString& theMessage ); - void progressUpdate( int theProgress ); + * Emitted progress is in percents (0.0-100.0) */ + void progress( int type, double progress, const QString& message ); + void progressUpdate( int progress ); /** Emit a message to be displayed on status bar, usually used by network providers (WMS,WCS) * @note added in 2.14 @@ -352,6 +352,6 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface /** Source no data value is available and is set to be used or internal no data * is available. Used internally only */ - //bool hasNoDataValue ( int theBandNo ); + //bool hasNoDataValue ( int bandNo ); }; diff --git a/python/core/raster/qgsrasterdrawer.sip b/python/core/raster/qgsrasterdrawer.sip index c92a0b6c0fe..c3cd2ee79d5 100644 --- a/python/core/raster/qgsrasterdrawer.sip +++ b/python/core/raster/qgsrasterdrawer.sip @@ -12,10 +12,10 @@ class QgsRasterDrawer /** Draws raster data. * @param p destination QPainter * @param viewPort viewport to render - * @param theQgsMapToPixel map to pixel converter + * @param qgsMapToPixel map to pixel converter * @param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0. */ - void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel, QgsRasterBlockFeedback* feedback = nullptr ); + void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* qgsMapToPixel, QgsRasterBlockFeedback* feedback = nullptr ); protected: /** Draws raster part diff --git a/python/core/raster/qgsrasteridentifyresult.sip b/python/core/raster/qgsrasteridentifyresult.sip index b78d0d99695..b5520710e11 100644 --- a/python/core/raster/qgsrasteridentifyresult.sip +++ b/python/core/raster/qgsrasteridentifyresult.sip @@ -7,15 +7,15 @@ class QgsRasterIdentifyResult QgsRasterIdentifyResult(); /** \brief Constructor. Creates valid result. - * @param theFormat the result format - * @param theResults the results + * @param format the result format + * @param results the results */ - QgsRasterIdentifyResult( QgsRaster::IdentifyFormat theFormat, const QMap& theResults ); + QgsRasterIdentifyResult( QgsRaster::IdentifyFormat format, const QMap& results ); /** \brief Constructor. Creates invalid result with error. - * @param theError the error + * @param error the error */ - QgsRasterIdentifyResult( const QgsError& theError ); + QgsRasterIdentifyResult( const QgsError& error ); virtual ~QgsRasterIdentifyResult(); @@ -33,7 +33,7 @@ class QgsRasterIdentifyResult QMap results() const; /** Set map of optional parameters */ - void setParams( const QMap & theParams ); + void setParams( const QMap & params ); /** Get map of optional parameters */ QMap params() const; @@ -42,6 +42,6 @@ class QgsRasterIdentifyResult QgsError error() const; /** \brief Set error */ - void setError( const QgsError & theError ); + void setError( const QgsError & error ); }; diff --git a/python/core/raster/qgsrasterinterface.sip b/python/core/raster/qgsrasterinterface.sip index 0428bc00cba..4d33053c7a6 100644 --- a/python/core/raster/qgsrasterinterface.sip +++ b/python/core/raster/qgsrasterinterface.sip @@ -157,7 +157,7 @@ class QgsRasterInterface virtual int ySize() const; /** \brief helper function to create zero padded band names */ - virtual QString generateBandName( int theBandNumber ) const; + virtual QString generateBandName( int bandNumber ) const; /** Read block of data using given extent and size. * Returns pointer to data. @@ -190,71 +190,71 @@ class QgsRasterInterface virtual QgsRasterInterface *sourceInput(); /** \brief Get band statistics. - * @param theBandNo The band (number). - * @param theStats Requested statistics - * @param theExtent Extent used to calc statistics, if empty, whole raster extent is used. - * @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. + * @param bandNo The band (number). + * @param stats Requested statistics + * @param extent Extent used to calc statistics, if empty, whole raster extent is used. + * @param sampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. * @return Band statistics. */ - virtual QgsRasterBandStats bandStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ); + virtual QgsRasterBandStats bandStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0 ); /** \brief Returns true if histogram is available (cached, already calculated). * The parameters are the same as in bandStatistics() * @return true if statistics are available (ready to use) */ - virtual bool hasStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ); + virtual bool hasStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0 ); /** \brief Get histogram. Histograms are cached in providers. - * @param theBandNo The band (number). - * @param theBinCount Number of bins (intervals,buckets). If 0, the number of bins is decided automatically according to data type, raster size etc. - * @param theMinimum Minimum value, if NaN, raster minimum value will be used. - * @param theMaximum Maximum value, if NaN, raster minimum value will be used. - * @param theExtent Extent used to calc histogram, if empty, whole raster extent is used. - * @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. - * @param theIncludeOutOfRange include out of range values + * @param bandNo The band (number). + * @param binCount Number of bins (intervals,buckets). If 0, the number of bins is decided automatically according to data type, raster size etc. + * @param minimum Minimum value, if NaN, raster minimum value will be used. + * @param maximum Maximum value, if NaN, raster minimum value will be used. + * @param extent Extent used to calc histogram, if empty, whole raster extent is used. + * @param sampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. + * @param includeOutOfRange include out of range values * @return Vector of non NULL cell counts for each bin. - * @note theBinCount, theMinimum and theMaximum not optional in python bindings + * @note binCount, minimum and maximum not optional in python bindings */ - virtual QgsRasterHistogram histogram( int theBandNo, - int theBinCount, - double theMinimum, - double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ); + virtual QgsRasterHistogram histogram( int bandNo, + int binCount, + double minimum, + double maximum, + const QgsRectangle & extent, + int sampleSize, + bool includeOutOfRange ); /** \brief Returns true if histogram is available (cached, already calculated), the parameters are the same as in histogram() - * @note theBinCount, theMinimum and theMaximum not optional in python bindings + * @note binCount, minimum and maximum not optional in python bindings */ - virtual bool hasHistogram( int theBandNo, - int theBinCount, - double theMinimum, - double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ); + virtual bool hasHistogram( int bandNo, + int binCount, + double minimum, + double maximum, + const QgsRectangle & extent, + int sampleSize, + bool includeOutOfRange ); /** \brief Find values for cumulative pixel count cut. - * @param theBandNo The band (number). - * @param theLowerCount The lower count as fraction of 1, e.g. 0.02 = 2% - * @param theUpperCount The upper count as fraction of 1, e.g. 0.98 = 98% - * @param theLowerValue Location into which the lower value will be set. - * @param theUpperValue Location into which the upper value will be set. - * @param theExtent Extent used to calc histogram, if empty, whole raster extent is used. - * @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. + * @param bandNo The band (number). + * @param lowerCount The lower count as fraction of 1, e.g. 0.02 = 2% + * @param upperCount The upper count as fraction of 1, e.g. 0.98 = 98% + * @param lowerValue Location into which the lower value will be set. + * @param upperValue Location into which the upper value will be set. + * @param extent Extent used to calc histogram, if empty, whole raster extent is used. + * @param sampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. */ - virtual void cumulativeCut( int theBandNo, - double theLowerCount, - double theUpperCount, - double &theLowerValue, - double &theUpperValue, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ); + virtual void cumulativeCut( int bandNo, + double lowerCount, + double upperCount, + double &lowerValue, + double &upperValue, + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0 ); /** Write base class members to xml. */ virtual void writeXml( QDomDocument& doc, QDomElement& parentElem ) const; @@ -264,21 +264,21 @@ class QgsRasterInterface protected: /** Fill in histogram defaults if not specified - * @note theBinCount, theMinimum and theMaximum not optional in python bindings + * @note binCount, minimum and maximum not optional in python bindings */ - void initHistogram( QgsRasterHistogram &theHistogram, int theBandNo, - int theBinCount /* = 0 */, - double theMinimum /*= std::numeric_limits::quiet_NaN()*/, - double theMaximum /*= std::numeric_limits::quiet_NaN()*/, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0, - bool theIncludeOutOfRange = false ); + void initHistogram( QgsRasterHistogram &histogram, int bandNo, + int binCount /* = 0 */, + double minimum /*= std::numeric_limits::quiet_NaN()*/, + double maximum /*= std::numeric_limits::quiet_NaN()*/, + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0, + bool includeOutOfRange = false ); - /** Fill in statistics defaults if not specified */ - void initStatistics( QgsRasterBandStats &theStatistics, int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theBinCount = 0 ); + //! Fill in statistics defaults if not specified + void initStatistics(QgsRasterBandStats &statistics, int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & boundingBox = QgsRectangle(), + int binCount = 0 ); private: QgsRasterInterface(const QgsRasterInterface &); diff --git a/python/core/raster/qgsrasterlayer.sip b/python/core/raster/qgsrasterlayer.sip index 892b929f00f..97bc793677b 100644 --- a/python/core/raster/qgsrasterlayer.sip +++ b/python/core/raster/qgsrasterlayer.sip @@ -65,8 +65,8 @@ class QgsRasterLayer : QgsMapLayer * but some sort of error occurs in processing the file, the error is * returned in retError. */ - static bool isValidRasterFileName( const QString & theFileNameQString, QString &retError ); - static bool isValidRasterFileName( const QString & theFileNameQString ); + static bool isValidRasterFileName( const QString & fileNameQString, QString &retError ); + static bool isValidRasterFileName( const QString & fileNameQString ); /** Return time stamp for given file name */ static QDateTime lastModified( const QString & name ); @@ -78,7 +78,7 @@ class QgsRasterLayer : QgsMapLayer LayerType rasterType(); /** Set raster renderer. Takes ownership of the renderer object*/ - void setRenderer( QgsRasterRenderer* theRenderer /Transfer/ ); + void setRenderer( QgsRasterRenderer* renderer /Transfer/ ); QgsRasterRenderer* renderer() const; /** Set raster resample filter. Takes ownership of the resample filter object*/ @@ -100,7 +100,7 @@ class QgsRasterLayer : QgsMapLayer int bandCount() const; /** \brief Get the name of a band given its number */ - QString bandName( int theBandNoInt ) const; + QString bandName( int bandNoInt ) const; /** Returns the data provider */ QgsRasterDataProvider* dataProvider(); @@ -121,7 +121,7 @@ class QgsRasterLayer : QgsMapLayer /** \brief This is an overloaded version of the draw() function that is called by both draw() and thumbnailAsPixmap */ void draw( QPainter * theQPainter, QgsRasterViewPort * myRasterViewPort, - const QgsMapToPixel* theQgsMapToPixel = 0 ); + const QgsMapToPixel* qgsMapToPixel = 0 ); /** Returns a list with classification items (Text and color) */ QList< QPair< QString, QColor > > legendSymbologyItems() const; @@ -132,7 +132,7 @@ class QgsRasterLayer : QgsMapLayer QString metadata() const; /** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */ - QPixmap paletteAsPixmap( int theBandNumber = 1 ); + QPixmap paletteAsPixmap( int bandNumber = 1 ); /** \brief [ data provider interface ] Which provider is being used for this Raster Layer? */ QString providerType() const; @@ -142,24 +142,24 @@ class QgsRasterLayer : QgsMapLayer double rasterUnitsPerPixelY(); /** \brief Set contrast enhancement algorithm - * @param theAlgorithm Contrast enhancement algorithm - * @param theLimits Limits - * @param theExtent Extent used to calculate limits, if empty, use full layer extent - * @param theSampleSize Size of data sample to calculate limits, if 0, use full resolution - * @param theGenerateLookupTableFlag Generate lookup table. */ + * @param algorithm Contrast enhancement algorithm + * @param limits Limits + * @param extent Extent used to calculate limits, if empty, use full layer extent + * @param sampleSize Size of data sample to calculate limits, if 0, use full resolution + * @param generateLookupTableFlag Generate lookup table. */ - void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, - QgsRasterMinMaxOrigin::Limits theLimits = QgsRasterMinMaxOrigin::MinMax, - const QgsRectangle& theExtent = QgsRectangle(), - int theSampleSize = QgsRasterLayer::SAMPLE_SIZE, - bool theGenerateLookupTableFlag = true ); + void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, + QgsRasterMinMaxOrigin::Limits limits = QgsRasterMinMaxOrigin::MinMax, + const QgsRectangle& extent = QgsRectangle(), + int sampleSize = QgsRasterLayer::SAMPLE_SIZE, + bool generateLookupTableFlag = true ); /** \brief Set default contrast enhancement */ void setDefaultContrastEnhancement(); /** \brief [ data provider interface ] A wrapper function to emit a progress update signal */ - void showProgress( int theValue ); + void showProgress( int value ); /** \brief Returns the sublayers of this layer - Useful for providers that manage their own layers, such as WMS */ virtual QStringList subLayers() const; @@ -186,14 +186,14 @@ class QgsRasterLayer : QgsMapLayer virtual QDateTime timestamp() const; public slots: - void showStatusMessage( const QString & theMessage ); + void showStatusMessage( const QString & message ); /** \brief receive progress signal from provider */ void onProgress( int, double, const QString& ); signals: /** \brief Signal for notifying listeners of long running processes */ - void progressUpdate( int theValue ); + void progressUpdate( int value ); /** * This is emitted whenever data or metadata (e.g. color table, extent) has changed diff --git a/python/core/raster/qgsrasterminmaxorigin.sip b/python/core/raster/qgsrasterminmaxorigin.sip index 9d3fe0b1214..a94ad5d1e99 100644 --- a/python/core/raster/qgsrasterminmaxorigin.sip +++ b/python/core/raster/qgsrasterminmaxorigin.sip @@ -80,13 +80,13 @@ class QgsRasterMinMaxOrigin //////// Setter methods ///////////////////// //! \brief Set limits. - void setLimits(QgsRasterMinMaxOrigin::Limits theLimits); + void setLimits(QgsRasterMinMaxOrigin::Limits limits); //! \brief Set extent. - void setExtent(QgsRasterMinMaxOrigin::Extent theExtent); + void setExtent(QgsRasterMinMaxOrigin::Extent extent); //! \brief Set statistics accuracy. - void setStatAccuracy(QgsRasterMinMaxOrigin::StatAccuracy theAccuracy); + void setStatAccuracy(QgsRasterMinMaxOrigin::StatAccuracy accuracy); //! \brief Set lower bound of cumulative cut method (between 0 and 1). void setCumulativeCutLower(double val); @@ -108,20 +108,20 @@ class QgsRasterMinMaxOrigin //////// Static methods ///////////////////// //! \brief Return a string to serialize Limits - static QString limitsString( QgsRasterMinMaxOrigin::Limits theLimits ); + static QString limitsString( QgsRasterMinMaxOrigin::Limits limits ); //! \brief Deserialize Limits - static QgsRasterMinMaxOrigin::Limits limitsFromString( const QString& theLimits ); + static QgsRasterMinMaxOrigin::Limits limitsFromString( const QString& limits ); //! \brief Return a string to serialize Extent - static QString extentString( QgsRasterMinMaxOrigin::Extent theExtent ); + static QString extentString( QgsRasterMinMaxOrigin::Extent extent ); //! \brief Deserialize Extent - static QgsRasterMinMaxOrigin::Extent extentFromString( const QString& theExtent ); + static QgsRasterMinMaxOrigin::Extent extentFromString( const QString& extent ); //! \brief Return a string to serialize StatAccuracy - static QString statAccuracyString( QgsRasterMinMaxOrigin::StatAccuracy theAccuracy ); + static QString statAccuracyString( QgsRasterMinMaxOrigin::StatAccuracy accuracy ); //! \brief Deserialize StatAccuracy - static QgsRasterMinMaxOrigin::StatAccuracy statAccuracyFromString( const QString& theAccuracy ); + static QgsRasterMinMaxOrigin::StatAccuracy statAccuracyFromString( const QString& accuracy ); }; diff --git a/python/core/raster/qgsrasterpipe.sip b/python/core/raster/qgsrasterpipe.sip index f6451f6bb09..f3d7e52b3cc 100644 --- a/python/core/raster/qgsrasterpipe.sip +++ b/python/core/raster/qgsrasterpipe.sip @@ -25,13 +25,13 @@ class QgsRasterPipe QgsRasterPipe(); //made private for python bindings - //QgsRasterPipe( const QgsRasterPipe& thePipe ); + //QgsRasterPipe( const QgsRasterPipe& pipe ); ~QgsRasterPipe(); /** Try to insert interface at specified index and connect * if connection would fail, the interface is not inserted and false is returned */ - bool insert( int idx, QgsRasterInterface* theInterface /Transfer/ ); + bool insert( int idx, QgsRasterInterface* interface /Transfer/ ); %MethodCode sipRes = sipCpp->insert( a0, a1 ); if( !sipRes ) @@ -45,7 +45,7 @@ class QgsRasterPipe /** Try to replace interface at specified index and connect * if connection would fail, the interface is not inserted and false is returned */ - bool replace( int idx, QgsRasterInterface* theInterface /Transfer/ ); + bool replace( int idx, QgsRasterInterface* interface /Transfer/ ); /** Insert a new known interface in default place or replace interface of the same * role if it already exists. Known interfaces are: QgsRasterDataProvider, @@ -53,13 +53,13 @@ class QgsRasterPipe * subclasses. For unknown interfaces it mus be explicitly specified position * where it should be inserted using insert() method. */ - bool set( QgsRasterInterface * theInterface /Transfer/ ); + bool set( QgsRasterInterface * interface /Transfer/ ); /** Remove and delete interface at given index if possible */ bool remove( int idx ); /** Remove and delete interface from pipe if possible */ - bool remove( QgsRasterInterface * theInterface ); + bool remove( QgsRasterInterface * interface ); int size() const; QgsRasterInterface * at( int idx ) const; @@ -83,6 +83,6 @@ class QgsRasterPipe private: - QgsRasterPipe( const QgsRasterPipe& thePipe ); + QgsRasterPipe( const QgsRasterPipe& pipe ); }; diff --git a/python/core/raster/qgsrasterprojector.sip b/python/core/raster/qgsrasterprojector.sip index c4b1dbe72a0..3b820615fbb 100644 --- a/python/core/raster/qgsrasterprojector.sip +++ b/python/core/raster/qgsrasterprojector.sip @@ -34,7 +34,7 @@ class QgsRasterProjector : QgsRasterInterface Qgis::DataType dataType( int bandNo ) const; //! \brief set source and destination CRS - void setCrs( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS, + void setCrs( const QgsCoordinateReferenceSystem & srcCRS, const QgsCoordinateReferenceSystem & destCRS, int srcDatumTransform = -1, int destDatumTransform = -1 ); //! \brief Get source CRS @@ -51,12 +51,12 @@ class QgsRasterProjector : QgsRasterInterface QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) / Factory /; //! Calculate destination extent and size from source extent and size - bool destExtentSize( const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize, - QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize ); + bool destExtentSize( const QgsRectangle& srcExtent, int srcXSize, int srcYSize, + QgsRectangle& destExtent, int& destXSize, int& destYSize ); //! Calculate destination extent and size from source extent and size static bool extentSize( const QgsCoordinateTransform& ct, - const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize, - QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize ); + const QgsRectangle& srcExtent, int srcXSize, int srcYSize, + QgsRectangle& destExtent, int& destXSize, int& destYSize ); }; diff --git a/python/core/raster/qgsrasterrange.sip b/python/core/raster/qgsrasterrange.sip index 41632fde5ee..9b9d63eb8fc 100644 --- a/python/core/raster/qgsrasterrange.sip +++ b/python/core/raster/qgsrasterrange.sip @@ -16,16 +16,16 @@ class QgsRasterRange QgsRasterRange(); /** \brief Constructor - * @param theMin minimum value - * @param theMax max value + * @param min minimum value + * @param max max value */ - QgsRasterRange( double theMin, double theMax ); + QgsRasterRange( double min, double max ); double min() const; double max() const; - double setMin( double theMin ); - double setMax( double theMax ); + double setMin( double min ); + double setMax( double max ); bool operator==( QgsRasterRange o ) const; diff --git a/python/core/raster/qgsrasterrenderer.sip b/python/core/raster/qgsrasterrenderer.sip index 7aff7699214..d019b720d5b 100644 --- a/python/core/raster/qgsrasterrenderer.sip +++ b/python/core/raster/qgsrasterrenderer.sip @@ -53,7 +53,7 @@ class QgsRasterRenderer : QgsRasterInterface const QgsRasterMinMaxOrigin& minMaxOrigin() const; //! Sets origin of min/max values - void setMinMaxOrigin( const QgsRasterMinMaxOrigin& theOrigin ); + void setMinMaxOrigin( const QgsRasterMinMaxOrigin& origin ); protected: diff --git a/python/core/raster/qgsrastershader.sip b/python/core/raster/qgsrastershader.sip index 8714dbd2eea..6fa8a3ce55b 100644 --- a/python/core/raster/qgsrastershader.sip +++ b/python/core/raster/qgsrastershader.sip @@ -7,7 +7,7 @@ class QgsRasterShader %End public: - QgsRasterShader( double theMinimumValue = 0.0, double theMaximumValue = 255.0 ); + QgsRasterShader( double minimumValue = 0.0, double maximumValue = 255.0 ); ~QgsRasterShader(); /* diff --git a/python/core/raster/qgsrastershaderfunction.sip b/python/core/raster/qgsrastershaderfunction.sip index 054e0d9fd0b..07bc4ec396a 100644 --- a/python/core/raster/qgsrastershaderfunction.sip +++ b/python/core/raster/qgsrastershaderfunction.sip @@ -14,7 +14,7 @@ class QgsRasterShaderFunction public: - QgsRasterShaderFunction( double theMinimumValue = 0.0, double theMaximumValue = 255.0 ); + QgsRasterShaderFunction( double minimumValue = 0.0, double maximumValue = 255.0 ); virtual ~QgsRasterShaderFunction(); /** \brief Set the maximum value */ diff --git a/python/core/raster/qgsrastertransparency.sip b/python/core/raster/qgsrastertransparency.sip index 88fe51059ba..8a509f41fa4 100644 --- a/python/core/raster/qgsrastertransparency.sip +++ b/python/core/raster/qgsrastertransparency.sip @@ -48,10 +48,10 @@ class QgsRasterTransparency void setTransparentThreeValuePixelList( const QList& /Transfer/); /** \brief Returns the transparency value for a single value Pixel */ - int alphaValue( double, int theGlobalTransparency = 255 ) const; + int alphaValue( double, int globalTransparency = 255 ) const; /** \brief Return the transparency value for a RGB Pixel */ - int alphaValue( double, double, double, int theGlobalTransparency = 255 ) const; + int alphaValue( double, double, double, int globalTransparency = 255 ) const; /** True if there are no entries in the pixel lists except the nodata value*/ bool isEmpty() const; diff --git a/python/core/raster/qgssinglebandgrayrenderer.sip b/python/core/raster/qgssinglebandgrayrenderer.sip index 5034a3c4465..861c855ffbc 100644 --- a/python/core/raster/qgssinglebandgrayrenderer.sip +++ b/python/core/raster/qgssinglebandgrayrenderer.sip @@ -24,7 +24,7 @@ class QgsSingleBandGrayRenderer: QgsRasterRenderer /** Takes ownership*/ void setContrastEnhancement( QgsContrastEnhancement* ce /Transfer/ ); - void setGradient( Gradient theGradient ); + void setGradient( Gradient gradient ); Gradient gradient() const; void writeXml( QDomDocument& doc, QDomElement& parentElem ) const; diff --git a/python/core/symbology-ng/qgssvgcache.sip b/python/core/symbology-ng/qgssvgcache.sip index f6ad133d591..0fedf2b80e7 100644 --- a/python/core/symbology-ng/qgssvgcache.sip +++ b/python/core/symbology-ng/qgssvgcache.sip @@ -148,7 +148,7 @@ class QgsSvgCache : QObject signals: /** Emit a signal to be caught by qgisapp and display a msg on status bar */ - void statusChanged( const QString& theStatusQString ); + void statusChanged( const QString& statusQString ); protected: diff --git a/python/core/symbology-ng/qgssymbol.sip b/python/core/symbology-ng/qgssymbol.sip index 8fd32a555a8..49247f25e17 100644 --- a/python/core/symbology-ng/qgssymbol.sip +++ b/python/core/symbology-ng/qgssymbol.sip @@ -435,7 +435,7 @@ class QgsMarkerSymbol : QgsSymbol * @param angle new symbol angle * @see angle() */ - void setAngle( double angle ); + void setAngle( double symbolAngle ); /** Returns the marker angle for the whole symbol. Note that for symbols with * multiple symbol layers, this will correspond just to the angle of diff --git a/python/gui/attributetable/qgsfieldconditionalformatwidget.sip b/python/gui/attributetable/qgsfieldconditionalformatwidget.sip index 746981124ed..9f968dc6657 100644 --- a/python/gui/attributetable/qgsfieldconditionalformatwidget.sip +++ b/python/gui/attributetable/qgsfieldconditionalformatwidget.sip @@ -24,9 +24,9 @@ class QgsFieldConditionalFormatWidget : QWidget void viewRules(); /** Sets the vector layer associated with the widget. - * @param theLayer vector layer + * @param layer vector layer */ - void setLayer( QgsVectorLayer* theLayer ); + void setLayer( QgsVectorLayer* layer ); /** Switches the widget to the edit style mode for the specified style. * @param index index of conditional style to edit diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 915ad2dc081..ad36c59e42f 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -80,9 +80,9 @@ class QgisInterface : QObject virtual QgsRasterLayer* addRasterLayer( const QString& url, const QString& layerName, const QString& providerKey ) = 0; //! Add a project - virtual bool addProject( const QString& theProject ) = 0; + virtual bool addProject( const QString& project ) = 0; //! Start a blank project - virtual void newProject( bool thePromptToSaveFlag = false ) = 0; + virtual void newProject( bool promptToSaveFlag = false ) = 0; //! Get pointer to the active layer (layer selected in the legend) virtual QgsMapLayer *activeLayer() = 0; diff --git a/python/gui/qgscodeeditor.sip b/python/gui/qgscodeeditor.sip index 3735bcd5f26..de899ea4328 100644 --- a/python/gui/qgscodeeditor.sip +++ b/python/gui/qgscodeeditor.sip @@ -36,9 +36,9 @@ class QgsCodeEditor: QsciScintilla /** Insert text at cursor position, or replace any selected text if user has * made a selection. - * @param theText The text to be inserted + * @param text The text to be inserted */ - void insertText( const QString& theText ); + void insertText( const QString& text ); protected: diff --git a/python/gui/qgsdetaileditemdata.sip b/python/gui/qgsdetaileditemdata.sip index 4c6daf473c9..a941b3b3d94 100644 --- a/python/gui/qgsdetaileditemdata.sip +++ b/python/gui/qgsdetaileditemdata.sip @@ -6,20 +6,20 @@ class QgsDetailedItemData public: QgsDetailedItemData(); - void setTitle( const QString& theTitle ); - void setDetail( const QString& theDetail ); - void setCategory( const QString& theCategory ); - void setIcon( const QPixmap& theIcon ); - void setCheckable( const bool theFlag ); - void setChecked( const bool theFlag ); - void setEnabled( bool theFlag ); + void setTitle( const QString& title ); + void setDetail( const QString& detail ); + void setCategory( const QString& category ); + void setIcon( const QPixmap& icon ); + void setCheckable( const bool flag ); + void setChecked( const bool flag ); + void setEnabled( bool flag ); /** This is a hint to the delegate to render using * a widget rather than manually painting every * part of the list item. * @note the delegate may completely ignore this * depending on the delegate implementation. */ - void setRenderAsWidget( bool theFlag ); + void setRenderAsWidget( bool flag ); QString title() const; QString detail() const; diff --git a/python/gui/qgsdetaileditemdelegate.sip b/python/gui/qgsdetaileditemdelegate.sip index 80a130a2de4..b15e421318f 100644 --- a/python/gui/qgsdetaileditemdelegate.sip +++ b/python/gui/qgsdetaileditemdelegate.sip @@ -13,18 +13,18 @@ class QgsDetailedItemDelegate : QAbstractItemDelegate QgsDetailedItemDelegate( QObject * parent /TransferThis/ = 0 ); ~QgsDetailedItemDelegate(); /** Reimplement for parent class */ - void paint( QPainter * thePainter, - const QStyleOptionViewItem & theOption, - const QModelIndex & theIndex ) const; + void paint( QPainter * painter, + const QStyleOptionViewItem & option, + const QModelIndex & index ) const; /** Reimplement for parent class */ - QSize sizeHint( const QStyleOptionViewItem & theOption, - const QModelIndex & theIndex ) const; + QSize sizeHint( const QStyleOptionViewItem & option, + const QModelIndex & index ) const; - void setVerticalSpacing( int theValue ); + void setVerticalSpacing( int value ); int verticalSpacing() const; - void setHorizontalSpacing( int theValue ); + void setHorizontalSpacing( int value ); int horizontalSpacing() const; }; diff --git a/python/gui/qgsdetaileditemwidget.sip b/python/gui/qgsdetaileditemwidget.sip index 7c8f71adbe5..b2b0467b8e3 100644 --- a/python/gui/qgsdetaileditemwidget.sip +++ b/python/gui/qgsdetaileditemwidget.sip @@ -6,6 +6,6 @@ class QgsDetailedItemWidget : QWidget public: QgsDetailedItemWidget( QWidget * parent /TransferThis/ = 0 ); ~QgsDetailedItemWidget(); - void setData( const QgsDetailedItemData& theData ); - void setChecked( bool theFlag ); + void setData( const QgsDetailedItemData& data ); + void setChecked( bool flag ); }; diff --git a/python/gui/qgserrordialog.sip b/python/gui/qgserrordialog.sip index 7d729e1eaad..902fc09420d 100644 --- a/python/gui/qgserrordialog.sip +++ b/python/gui/qgserrordialog.sip @@ -4,16 +4,16 @@ class QgsErrorDialog : QDialog #include %End public: - QgsErrorDialog( const QgsError & theError, const QString & theTitle, QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); + QgsErrorDialog( const QgsError & error, const QString & title, QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); ~QgsErrorDialog(); /** Show dialog with error - * @param theError error - * @param theTitle title + * @param error error + * @param title title * @param parent parent object * @param fl widget flags */ - static void show( const QgsError & theError, const QString & theTitle, QWidget *parent = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); + static void show( const QgsError & error, const QString & title, QWidget *parent = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags ); public slots: void on_mDetailPushButton_clicked(); diff --git a/python/gui/qgsgenericprojectionselector.sip b/python/gui/qgsgenericprojectionselector.sip index 7cfd2312b1f..953177ef3e9 100644 --- a/python/gui/qgsgenericprojectionselector.sip +++ b/python/gui/qgsgenericprojectionselector.sip @@ -38,11 +38,11 @@ class QgsGenericProjectionSelector : QDialog //, private Ui::QgsGenericProjectio /** If no parameter is passed, the message will be a generic * 'define the CRS for this layer'. */ - void setMessage( QString theMessage = "" ); + void setMessage( QString message = "" ); long selectedCrsId(); QString selectedAuthId(); - void setSelectedCrsName( const QString& theName ); + void setSelectedCrsName( const QString& name ); void setSelectedCrsId( long theID ); void setSelectedAuthId( const QString& authId ); diff --git a/python/gui/qgsmapcanvas.sip b/python/gui/qgsmapcanvas.sip index b4a212ed095..61408b8be93 100644 --- a/python/gui/qgsmapcanvas.sip +++ b/python/gui/qgsmapcanvas.sip @@ -238,13 +238,13 @@ class QgsMapCanvas : QGraphicsView bool scaleLocked() const; //! used to determine if anti-aliasing is enabled or not - void enableAntiAliasing( bool theFlag ); + void enableAntiAliasing( bool flag ); //! true if antialising is enabled bool antiAliasingEnabled() const; //! sets map tile rendering flag - void enableMapTileRendering( bool theFlag ); + void enableMapTileRendering( bool flag ); // following 2 methods should be moved elsewhere or changed to private // currently used by pan map tool @@ -347,7 +347,7 @@ class QgsMapCanvas : QGraphicsView void selectionChangedSlot(); //! Save the convtents of the map canvas to disk as an image - void saveAsImage( const QString& theFileName, QPixmap * QPixmap = 0, const QString& = "PNG" ); + void saveAsImage( const QString& fileName, QPixmap * QPixmap = 0, const QString& = "PNG" ); //! This slot is connected to the visibility change of one or more layers void layerStateChange(); @@ -356,7 +356,7 @@ class QgsMapCanvas : QGraphicsView void layerCrsChange(); //! Whether to suppress rendering or not - void setRenderFlag( bool theFlag ); + void setRenderFlag( bool flag ); //! State of render suppression flag bool renderFlag(); diff --git a/python/gui/qgsmaptip.sip b/python/gui/qgsmaptip.sip index 2e7ed21c936..bc1f02d05d2 100644 --- a/python/gui/qgsmaptip.sip +++ b/python/gui/qgsmaptip.sip @@ -19,15 +19,15 @@ class QgsMapTip: QWidget /** Show a maptip at a given point on the map canvas * @param thepLayer a qgis vector map layer pointer that will * be used to provide the attribute data for the map tip. - * @param theMapPosition a reference to the position of the cursor + * @param mapPosition a reference to the position of the cursor * in map coordinatess. - * @param thePixelPosition a reference to the position of the cursor + * @param pixelPosition a reference to the position of the cursor * in pixel coordinates. * @param mpMapCanvas a map canvas on which the tip is drawn */ void showMapTip( QgsMapLayer * thepLayer, - QgsPoint & theMapPosition, - QPoint & thePixelPosition, + QgsPoint & mapPosition, + QPoint & pixelPosition, QgsMapCanvas *mpMapCanvas ); /** Clear the current maptip if it exists * @param mpMapCanvas the canvas from which the tip should be cleared. diff --git a/python/gui/qgsowssourceselect.sip b/python/gui/qgsowssourceselect.sip index c5f6db8635b..e229fe67512 100644 --- a/python/gui/qgsowssourceselect.sip +++ b/python/gui/qgsowssourceselect.sip @@ -57,10 +57,10 @@ class QgsOWSSourceSelect : QDialog virtual void on_mLayersTreeWidget_itemSelectionChanged(); //! Set status message to theMessage - void showStatusMessage( const QString &theMessage ); + void showStatusMessage( const QString &message ); //! show whatever error is exposed. - void showError( const QString &theTitle, const QString &theFormat, const QString &theError ); + void showError( const QString &title, const QString &format, const QString &error ); //! Stores the selected datasource whenerver it is changed void on_mConnectionsComboBox_activated( int ); diff --git a/python/gui/qgsprojectionselector.sip b/python/gui/qgsprojectionselector.sip index c5cc7157f88..72adf4bceb2 100644 --- a/python/gui/qgsprojectionselector.sip +++ b/python/gui/qgsprojectionselector.sip @@ -91,10 +91,10 @@ class QgsProjectionSelector : QWidget protected: /** Used to ensure the projection list view is actually populated */ - void showEvent( QShowEvent * theEvent ); + void showEvent( QShowEvent * event ); /** Used to manage column sizes */ - void resizeEvent( QResizeEvent * theEvent ); + void resizeEvent( QResizeEvent * event ); signals: void sridSelected( const QString& theSRID ); diff --git a/python/gui/raster/qgshillshaderendererwidget.sip b/python/gui/raster/qgshillshaderendererwidget.sip index d12c689988f..eb935989292 100644 --- a/python/gui/raster/qgshillshaderendererwidget.sip +++ b/python/gui/raster/qgshillshaderendererwidget.sip @@ -21,7 +21,7 @@ class QgsHillshadeRendererWidget: QgsRasterRendererWidget /** * Factory method to create the renderer for this type. */ - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) /Factory/; + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) /Factory/; /** * @brief The renderer for the widget. diff --git a/python/gui/raster/qgsmultibandcolorrendererwidget.sip b/python/gui/raster/qgsmultibandcolorrendererwidget.sip index 92b2bd2c36b..a111cbe44ba 100644 --- a/python/gui/raster/qgsmultibandcolorrendererwidget.sip +++ b/python/gui/raster/qgsmultibandcolorrendererwidget.sip @@ -6,7 +6,7 @@ class QgsMultiBandColorRendererWidget: QgsRasterRendererWidget public: QgsMultiBandColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ); + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ); ~QgsMultiBandColorRendererWidget(); QgsRasterRenderer* renderer(); @@ -22,5 +22,5 @@ class QgsMultiBandColorRendererWidget: QgsRasterRendererWidget void doComputations(); public slots: - void loadMinMax( int theBandNo, double theMin, double theMax ); + void loadMinMax( int bandNo, double min, double max ); }; diff --git a/python/gui/raster/qgspalettedrendererwidget.sip b/python/gui/raster/qgspalettedrendererwidget.sip index abcb26e4acb..e7f0e6c8bcd 100644 --- a/python/gui/raster/qgspalettedrendererwidget.sip +++ b/python/gui/raster/qgspalettedrendererwidget.sip @@ -5,7 +5,7 @@ class QgsPalettedRendererWidget: QgsRasterRendererWidget %End public: QgsPalettedRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) /Factory/; + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) /Factory/; ~QgsPalettedRendererWidget(); QgsRasterRenderer* renderer(); diff --git a/python/gui/raster/qgsrasterhistogramwidget.sip b/python/gui/raster/qgsrasterhistogramwidget.sip index f1a667cd567..1e840a82cdc 100644 --- a/python/gui/raster/qgsrasterhistogramwidget.sip +++ b/python/gui/raster/qgsrasterhistogramwidget.sip @@ -8,13 +8,13 @@ class QgsRasterHistogramWidget : QgsPanelWidget ~QgsRasterHistogramWidget(); /** Save the histogram as an image to disk */ - bool histoSaveAsImage( const QString& theFilename, int width = 600, int height = 600, int quality = -1 ); + bool histoSaveAsImage( const QString& filename, int width = 600, int height = 600, int quality = -1 ); /** Set the renderer widget (or just its name if there is no widget) */ void setRendererWidget( const QString& name, QgsRasterRendererWidget* rendererWidget = NULL ); /** Activate the histogram widget */ - void setActive( bool theActiveFlag ); + void setActive( bool activeFlag ); /** \brief Compute the histogram on demand. */ bool computeHistogram( bool forceComputeFlag ); diff --git a/python/gui/raster/qgsrasterminmaxwidget.sip b/python/gui/raster/qgsrasterminmaxwidget.sip index 39f59ac3374..8427870302d 100644 --- a/python/gui/raster/qgsrasterminmaxwidget.sip +++ b/python/gui/raster/qgsrasterminmaxwidget.sip @@ -4,15 +4,15 @@ class QgsRasterMinMaxWidget: QWidget #include %End public: - QgsRasterMinMaxWidget( QgsRasterLayer* theLayer, QWidget *parent /TransferThis/ = 0 ); + QgsRasterMinMaxWidget( QgsRasterLayer* layer, QWidget *parent /TransferThis/ = 0 ); ~QgsRasterMinMaxWidget(); /** Sets the extent to use for minimum and maximum value calculation. - * @param theExtent extent in raster layer's CRS + * @param extent extent in raster layer's CRS * @note if a map canvas is set using setMapCanvas(), its extent will take * precedence over any extent set using this method. */ - void setExtent( const QgsRectangle& theExtent ); + void setExtent( const QgsRectangle& extent ); /** Sets the map canvas associated with the widget. This allows the widget to retrieve the current * map extent from the canvas. If a canvas is set it will take precedence over any extent @@ -30,7 +30,7 @@ class QgsRasterMinMaxWidget: QWidget */ QgsMapCanvas* mapCanvas(); - void setBands( const QList & theBands ); + void setBands( const QList & bands ); /** Return the extent selected by the user. Either an empty extent for 'full' or the current visible extent. */ QgsRectangle extent(); @@ -66,5 +66,5 @@ class QgsRasterMinMaxWidget: QWidget void widgetChanged(); //! signal emitted when new min/max values are computed from statistics. - void load( int theBandNo, double theMin, double theMax ); + void load( int bandNo, double min, double max ); }; diff --git a/python/gui/raster/qgssinglebandgrayrendererwidget.sip b/python/gui/raster/qgssinglebandgrayrendererwidget.sip index 3b76377722a..fcb814ce5ee 100644 --- a/python/gui/raster/qgssinglebandgrayrendererwidget.sip +++ b/python/gui/raster/qgssinglebandgrayrendererwidget.sip @@ -7,7 +7,7 @@ class QgsSingleBandGrayRendererWidget: QgsRasterRendererWidget QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); ~QgsSingleBandGrayRendererWidget(); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) /Factory/; + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) /Factory/; QgsRasterRenderer* renderer(); void setMapCanvas( QgsMapCanvas* canvas ); @@ -22,5 +22,5 @@ class QgsSingleBandGrayRendererWidget: QgsRasterRendererWidget void doComputations(); public slots: - void loadMinMax( int theBandNo, double theMin, double theMax ); + void loadMinMax( int bandNo, double min, double max ); }; diff --git a/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip b/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip index 26e08029116..e5972c2e6bf 100644 --- a/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip +++ b/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip @@ -9,7 +9,7 @@ class QgsSingleBandPseudoColorRendererWidget : QgsRasterRendererWidget QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); ~QgsSingleBandPseudoColorRendererWidget(); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) /Factory/; + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) /Factory/; QgsRasterRenderer* renderer(); void setMapCanvas( QgsMapCanvas* canvas ); @@ -22,7 +22,7 @@ class QgsSingleBandPseudoColorRendererWidget : QgsRasterRendererWidget /** Executes the single band pseudo raster classficiation */ void classify(); - void loadMinMax( int theBandNo, double theMin, double theMax ); + void loadMinMax( int bandNo, double min, double max ); }; diff --git a/python/gui/symbology-ng/qgsrulebasedrendererwidget.sip b/python/gui/symbology-ng/qgsrulebasedrendererwidget.sip index 75f069dd3ba..7cf97d099a3 100644 --- a/python/gui/symbology-ng/qgsrulebasedrendererwidget.sip +++ b/python/gui/symbology-ng/qgsrulebasedrendererwidget.sip @@ -43,7 +43,7 @@ class QgsRuleBasedRendererModel : QAbstractItemModel void finishedAddingRules(); // call endInsertRows //! @note not available in python bindungs - // void setFeatureCounts( QMap theCountMap ); + // void setFeatureCounts( QMap countMap ); void clearFeatureCounts(); }; diff --git a/src/analysis/interpolation/qgsinterpolator.cpp b/src/analysis/interpolation/qgsinterpolator.cpp index d7f15d9d75f..dc0cc98b7fd 100644 --- a/src/analysis/interpolation/qgsinterpolator.cpp +++ b/src/analysis/interpolation/qgsinterpolator.cpp @@ -71,12 +71,12 @@ int QgsInterpolator::cacheBaseData() QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( attList ) ); - QgsFeature theFeature; - while ( fit.nextFeature( theFeature ) ) + QgsFeature feature; + while ( fit.nextFeature( feature ) ) { if ( !layer.zCoordInterpolation ) { - QVariant attributeVariant = theFeature.attribute( layer.interpolationAttribute ); + QVariant attributeVariant = feature.attribute( layer.interpolationAttribute ); if ( !attributeVariant.isValid() ) //attribute not found, something must be wrong (e.g. NULL value) { continue; @@ -88,7 +88,7 @@ int QgsInterpolator::cacheBaseData() } } - if ( addVerticesToCache( theFeature.geometry(), layer.zCoordInterpolation, attributeValue ) != 0 ) + if ( addVerticesToCache( feature.geometry(), layer.zCoordInterpolation, attributeValue ) != 0 ) { return 3; } @@ -107,7 +107,7 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry& geom, bool zCoord, d QByteArray wkb( geom.exportToWkb() ); QgsConstWkbPtr currentWkbPtr( wkb ); currentWkbPtr.readHeader(); - vertexData theVertex; //the current vertex + vertexData vertex; //the current vertex QgsWkbTypes::Type wkbType = geom.wkbType(); switch ( wkbType ) @@ -118,16 +118,16 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry& geom, bool zCoord, d FALLTHROUGH; case QgsWkbTypes::Point: { - currentWkbPtr >> theVertex.x >> theVertex.y; + currentWkbPtr >> vertex.x >> vertex.y; if ( zCoord && hasZValue ) { - currentWkbPtr >> theVertex.z; + currentWkbPtr >> vertex.z; } else { - theVertex.z = attributeValue; + vertex.z = attributeValue; } - mCachedBaseData.push_back( theVertex ); + mCachedBaseData.push_back( vertex ); break; } case QgsWkbTypes::LineString25D: @@ -140,16 +140,16 @@ int QgsInterpolator::addVerticesToCache( const QgsGeometry& geom, bool zCoord, d currentWkbPtr >> nPoints; for ( int index = 0; index < nPoints; ++index ) { - currentWkbPtr >> theVertex.x >> theVertex.y; + currentWkbPtr >> vertex.x >> vertex.y; if ( zCoord && hasZValue ) //skip z-coordinate for 25D geometries { - currentWkbPtr >> theVertex.z; + currentWkbPtr >> vertex.z; } else { - theVertex.z = attributeValue; + vertex.z = attributeValue; } - mCachedBaseData.push_back( theVertex ); + mCachedBaseData.push_back( vertex ); } break; } diff --git a/src/analysis/interpolation/qgstininterpolator.cpp b/src/analysis/interpolation/qgstininterpolator.cpp index 05307335753..f9cebd465e1 100644 --- a/src/analysis/interpolation/qgstininterpolator.cpp +++ b/src/analysis/interpolation/qgstininterpolator.cpp @@ -69,16 +69,16 @@ int QgsTINInterpolator::interpolatePoint( double x, double y, double& result ) void QgsTINInterpolator::initialize() { - DualEdgeTriangulation* theDualEdgeTriangulation = new DualEdgeTriangulation( 100000, nullptr ); + DualEdgeTriangulation* dualEdgeTriangulation = new DualEdgeTriangulation( 100000, nullptr ); if ( mInterpolation == CloughTocher ) { NormVecDecorator* dec = new NormVecDecorator(); - dec->addTriangulation( theDualEdgeTriangulation ); + dec->addTriangulation( dualEdgeTriangulation ); mTriangulation = dec; } else { - mTriangulation = theDualEdgeTriangulation; + mTriangulation = dualEdgeTriangulation; } //get number of features if we use a progress bar @@ -95,11 +95,11 @@ void QgsTINInterpolator::initialize() } } - QProgressDialog* theProgressDialog = nullptr; + QProgressDialog* progressDialog = nullptr; if ( mShowProgressDialog ) { - theProgressDialog = new QProgressDialog( QObject::tr( "Building triangulation..." ), QObject::tr( "Abort" ), 0, nFeatures, nullptr ); - theProgressDialog->setWindowModality( Qt::WindowModal ); + progressDialog = new QProgressDialog( QObject::tr( "Building triangulation..." ), QObject::tr( "Abort" ), 0, nFeatures, nullptr ); + progressDialog->setWindowModality( Qt::WindowModal ); } @@ -120,11 +120,11 @@ void QgsTINInterpolator::initialize() { if ( mShowProgressDialog ) { - if ( theProgressDialog->wasCanceled() ) + if ( progressDialog->wasCanceled() ) { break; } - theProgressDialog->setValue( nProcessedFeatures ); + progressDialog->setValue( nProcessedFeatures ); } insertData( &f, layer.zCoordInterpolation, layer.interpolationAttribute, layer.mInputType ); ++nProcessedFeatures; @@ -132,7 +132,7 @@ void QgsTINInterpolator::initialize() } } - delete theProgressDialog; + delete progressDialog; if ( mInterpolation == CloughTocher ) { @@ -155,14 +155,14 @@ void QgsTINInterpolator::initialize() } else //linear { - mTriangleInterpolator = new LinTriangleInterpolator( theDualEdgeTriangulation ); + mTriangleInterpolator = new LinTriangleInterpolator( dualEdgeTriangulation ); } mIsInitialized = true; //debug if ( mExportTriangulationToFile ) { - theDualEdgeTriangulation->saveAsShapefile( mTriangulationFilePath ); + dualEdgeTriangulation->saveAsShapefile( mTriangulationFilePath ); } } @@ -224,8 +224,8 @@ int QgsTINInterpolator::insertData( QgsFeature* f, bool zCoord, int attr, InputT { z = attributeValue; } - Point3D* thePoint = new Point3D( x, y, z ); - if ( mTriangulation->addPoint( thePoint ) == -100 ) + Point3D* point = new Point3D( x, y, z ); + if ( mTriangulation->addPoint( point ) == -100 ) { return -1; } diff --git a/src/app/gps/qgsgpsinformationwidget.cpp b/src/app/gps/qgsgpsinformationwidget.cpp index 8690c1734b9..9924dccf2ed 100644 --- a/src/app/gps/qgsgpsinformationwidget.cpp +++ b/src/app/gps/qgsgpsinformationwidget.cpp @@ -308,11 +308,11 @@ QgsGPSInformationWidget::~QgsGPSInformationWidget() } -void QgsGPSInformationWidget::on_mSpinTrackWidth_valueChanged( int theValue ) +void QgsGPSInformationWidget::on_mSpinTrackWidth_valueChanged( int value ) { if ( mpRubberBand ) { - mpRubberBand->setWidth( theValue ); + mpRubberBand->setWidth( value ); } } @@ -360,9 +360,9 @@ void QgsGPSInformationWidget::on_mBtnDebug_clicked() mStackedWidget->setCurrentIndex( 4 ); } -void QgsGPSInformationWidget::on_mConnectButton_toggled( bool theFlag ) +void QgsGPSInformationWidget::on_mConnectButton_toggled( bool flag ) { - if ( theFlag ) + if ( flag ) { connectGps(); } diff --git a/src/app/gps/qgsgpsinformationwidget.h b/src/app/gps/qgsgpsinformationwidget.h index e5eb32748d6..572e3b65048 100644 --- a/src/app/gps/qgsgpsinformationwidget.h +++ b/src/app/gps/qgsgpsinformationwidget.h @@ -48,14 +48,14 @@ class QgsGPSInformationWidget: public QWidget, private Ui::QgsGPSInformationWidg ~QgsGPSInformationWidget(); private slots: - void on_mConnectButton_toggled( bool theFlag ); + void on_mConnectButton_toggled( bool flag ); void displayGPSInformation( const QgsGPSInformation& info ); void logNmeaSentence( const QString& nmeaString ); // added to handle 'raw' data void updateCloseFeatureButton( QgsMapLayer * lyr ); void layerEditStateChanged(); // void setTrackColor(); // no longer used void on_mBtnTrackColor_clicked(); - void on_mSpinTrackWidth_valueChanged( int theValue ); + void on_mSpinTrackWidth_valueChanged( int value ); void on_mBtnPosition_clicked(); void on_mBtnSignal_clicked(); void on_mBtnSatellites_clicked(); @@ -65,7 +65,7 @@ class QgsGPSInformationWidget: public QWidget, private Ui::QgsGPSInformationWidg void on_mBtnAddVertex_clicked(); void on_mBtnCloseFeature_clicked(); void on_mBtnResetFeature_clicked(); -// not needed void on_mCbxAutoAddVertices_toggled( bool theFlag ); +// not needed void on_mCbxAutoAddVertices_toggled( bool flag ); void on_mBtnLogFile_clicked(); void connected( QgsGPSConnection * ); diff --git a/src/app/gps/qgsgpsmarker.cpp b/src/app/gps/qgsgpsmarker.cpp index 70d464cef07..58017826f2a 100644 --- a/src/app/gps/qgsgpsmarker.cpp +++ b/src/app/gps/qgsgpsmarker.cpp @@ -32,9 +32,9 @@ QgsGpsMarker::QgsGpsMarker( QgsMapCanvas* mapCanvas ) } } -void QgsGpsMarker::setSize( int theSize ) +void QgsGpsMarker::setSize( int size ) { - mSize = theSize; + mSize = size; } void QgsGpsMarker::setCenter( const QgsPoint& point ) diff --git a/src/app/gps/qgsgpsmarker.h b/src/app/gps/qgsgpsmarker.h index 58b5c8966d5..9938c4bab15 100644 --- a/src/app/gps/qgsgpsmarker.h +++ b/src/app/gps/qgsgpsmarker.h @@ -39,7 +39,7 @@ class QgsGpsMarker : public QgsMapCanvasItem virtual void updatePosition() override; - void setSize( int theSize ); + void setSize( int size ); protected: diff --git a/src/app/pluginmanager/qgspluginitemdelegate.h b/src/app/pluginmanager/qgspluginitemdelegate.h index 112bdc97658..a8b7d90700c 100644 --- a/src/app/pluginmanager/qgspluginitemdelegate.h +++ b/src/app/pluginmanager/qgspluginitemdelegate.h @@ -27,7 +27,7 @@ class QgsPluginItemDelegate : public QStyledItemDelegate Q_OBJECT public: explicit QgsPluginItemDelegate( QObject * parent = nullptr ); - QSize sizeHint( const QStyleOptionViewItem & theOption, const QModelIndex & theIndex ) const override; + QSize sizeHint( const QStyleOptionViewItem & option, const QModelIndex & index ) const override; void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; }; diff --git a/src/app/pluginmanager/qgspluginmanager.cpp b/src/app/pluginmanager/qgspluginmanager.cpp index 966668c9e28..1364b7d2828 100644 --- a/src/app/pluginmanager/qgspluginmanager.cpp +++ b/src/app/pluginmanager/qgspluginmanager.cpp @@ -1166,24 +1166,24 @@ void QgsPluginManager::setCurrentTab( int idx ) -void QgsPluginManager::currentPluginChanged( const QModelIndex & theIndex ) +void QgsPluginManager::currentPluginChanged( const QModelIndex & index ) { - if ( theIndex.column() == 0 ) + if ( index.column() == 0 ) { // Do exactly the same as if a plugin was clicked - on_vwPlugins_clicked( theIndex ); + on_vwPlugins_clicked( index ); } } -void QgsPluginManager::on_vwPlugins_clicked( const QModelIndex &theIndex ) +void QgsPluginManager::on_vwPlugins_clicked( const QModelIndex &index ) { - if ( theIndex.column() == 0 ) + if ( index.column() == 0 ) { // If the model has been filtered, the index row in the proxy won't match the index row in the underlying model // so we need to jump through this little hoop to get the correct item - QModelIndex realIndex = mModelProxy->mapToSource( theIndex ); + QModelIndex realIndex = mModelProxy->mapToSource( index ); QStandardItem* mypItem = mModelPlugins->itemFromIndex( realIndex ); if ( !mypItem->isEnabled() ) { @@ -1198,13 +1198,13 @@ void QgsPluginManager::on_vwPlugins_clicked( const QModelIndex &theIndex ) -void QgsPluginManager::on_vwPlugins_doubleClicked( const QModelIndex & theIndex ) +void QgsPluginManager::on_vwPlugins_doubleClicked( const QModelIndex & index ) { - if ( theIndex.column() == 0 ) + if ( index.column() == 0 ) { // If the model has been filtered, the index row in the proxy won't match the index row in the underlying model // so we need to jump through this little hoop to get the correct item - QModelIndex realIndex = mModelProxy->mapToSource( theIndex ); + QModelIndex realIndex = mModelProxy->mapToSource( index ); QStandardItem* mypItem = mModelPlugins->itemFromIndex( realIndex ); if ( mypItem->isCheckable() ) { @@ -1261,23 +1261,23 @@ void QgsPluginManager::on_wvDetails_linkClicked( const QUrl & url ) } -void QgsPluginManager::on_leFilter_textChanged( QString theText ) +void QgsPluginManager::on_leFilter_textChanged( QString text ) { - if ( theText.startsWith( QLatin1String( "tag:" ), Qt::CaseInsensitive ) ) + if ( text.startsWith( QLatin1String( "tag:" ), Qt::CaseInsensitive ) ) { - theText = theText.remove( QStringLiteral( "tag:" ) ); + text = text.remove( QStringLiteral( "tag:" ) ); mModelProxy->setFilterRole( PLUGIN_TAGS_ROLE ); - QgsDebugMsg( "PluginManager TAG filter changed to :" + theText ); + QgsDebugMsg( "PluginManager TAG filter changed to :" + text ); } else { mModelProxy->setFilterRole( 0 ); - QgsDebugMsg( "PluginManager filter changed to :" + theText ); + QgsDebugMsg( "PluginManager filter changed to :" + text ); } QRegExp::PatternSyntax mySyntax = QRegExp::PatternSyntax( QRegExp::RegExp ); Qt::CaseSensitivity myCaseSensitivity = Qt::CaseInsensitive; - QRegExp myRegExp( theText, myCaseSensitivity, mySyntax ); + QRegExp myRegExp( text, myCaseSensitivity, mySyntax ); mModelProxy->setFilterRegExp( myRegExp ); } diff --git a/src/app/pluginmanager/qgspluginmanager.h b/src/app/pluginmanager/qgspluginmanager.h index 414348939de..0e87aa69bb1 100644 --- a/src/app/pluginmanager/qgspluginmanager.h +++ b/src/app/pluginmanager/qgspluginmanager.h @@ -105,7 +105,7 @@ class QgsPluginManager : public QgsOptionsDialogBase, private Ui::QgsPluginManag void updateWindowTitle() override; //! Handle plugin selection - void currentPluginChanged( const QModelIndex & theIndex ); + void currentPluginChanged( const QModelIndex & index ); //! Load/unload plugin when checkbox state changed void pluginItemChanged( QStandardItem * item ); @@ -120,7 +120,7 @@ class QgsPluginManager : public QgsOptionsDialogBase, private Ui::QgsPluginManag void on_wvDetails_linkClicked( const QUrl & url ); //! Update the filter when user changes the filter expression - void on_leFilter_textChanged( QString theText ); + void on_leFilter_textChanged( QString text ); //! Upgrade all upgradeable plugins void on_buttonUpgradeAll_clicked(); diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp old mode 100755 new mode 100644 index 6578e6bc8d6..61141d877e7 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -2580,7 +2580,7 @@ void QgisApp::setIconSizes( int size ) } } -void QgisApp::setTheme( const QString& theThemeName ) +void QgisApp::setTheme( const QString& themeName ) { /***************************************************************** // Init the toolbar icons by setting the icon for each action. @@ -2602,8 +2602,8 @@ void QgisApp::setTheme( const QString& theThemeName ) // for the user to choose from. // */ - QgsApplication::setUITheme( theThemeName ); - //QgsDebugMsg("Setting theme to \n" + theThemeName); + QgsApplication::setUITheme( themeName ); + //QgsDebugMsg("Setting theme to \n" + themeName); mActionNewProject->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileNew.svg" ) ) ); mActionOpenProject->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileOpen.svg" ) ) ); mActionSaveProject->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFileSave.svg" ) ) ); @@ -2754,7 +2754,7 @@ void QgisApp::setTheme( const QString& theThemeName ) ( *composerIt )->setupTheme(); } - emit currentThemeChanged( theThemeName ); + emit currentThemeChanged( themeName ); } void QgisApp::setupConnections() @@ -3001,9 +3001,9 @@ void QgisApp::createOverview() mMapCanvas->setMapUpdateInterval( mySettings.value( QStringLiteral( "/qgis/map_update_interval" ), 250 ).toInt() ); } -void QgisApp::addDockWidget( Qt::DockWidgetArea theArea, QDockWidget* thepDockWidget ) +void QgisApp::addDockWidget( Qt::DockWidgetArea area, QDockWidget* thepDockWidget ) { - QMainWindow::addDockWidget( theArea, thepDockWidget ); + QMainWindow::addDockWidget( area, thepDockWidget ); // Make the right and left docks consume all vertical space and top // and bottom docks nest between them setCorner( Qt::TopLeftCorner, Qt::LeftDockWidgetArea ); @@ -3636,11 +3636,11 @@ void QgisApp::addVectorLayer() } -bool QgisApp::addVectorLayers( const QStringList &theLayerQStringList, const QString &enc, const QString &dataSourceType ) +bool QgisApp::addVectorLayers( const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType ) { bool wasfrozen = mMapCanvas->isFrozen(); QList myList; - Q_FOREACH ( QString src, theLayerQStringList ) + Q_FOREACH ( QString src, layerQStringList ) { src = src.trimmed(); QString base; @@ -4512,12 +4512,12 @@ void QgisApp::fileNewBlank() //as file new but accepts flags to indicate whether we should prompt to save -void QgisApp::fileNew( bool thePromptToSaveFlag, bool forceBlank ) +void QgisApp::fileNew( bool promptToSaveFlag, bool forceBlank ) { if ( checkTasksDependOnProject() ) return; - if ( thePromptToSaveFlag ) + if ( promptToSaveFlag ) { if ( !saveDirty() ) { @@ -5577,9 +5577,9 @@ void QgisApp::saveMapAsImage() } // saveMapAsImage //overloaded version of the above function -void QgisApp::saveMapAsImage( const QString& theImageFileNameQString, QPixmap * theQPixmap ) +void QgisApp::saveMapAsImage( const QString& imageFileNameQString, QPixmap * theQPixmap ) { - if ( theImageFileNameQString == QLatin1String( "" ) ) + if ( imageFileNameQString == QLatin1String( "" ) ) { //no fileName chosen return; @@ -5589,7 +5589,7 @@ void QgisApp::saveMapAsImage( const QString& theImageFileNameQString, QPixmap * //force the size of the canvas mMapCanvas->resize( theQPixmap->width(), theQPixmap->height() ); //save the mapview to the selected file - mMapCanvas->saveAsImage( theImageFileNameQString, theQPixmap ); + mMapCanvas->saveAsImage( imageFileNameQString, theQPixmap ); } } // saveMapAsImage @@ -7681,24 +7681,24 @@ void QgisApp::pasteAsNewVector() delete layer; } -QgsVectorLayer *QgisApp::pasteAsNewMemoryVector( const QString & theLayerName ) +QgsVectorLayer *QgisApp::pasteAsNewMemoryVector( const QString & layerName ) { - QString layerName = theLayerName; + QString layerNameCopy = layerName; - if ( layerName.isEmpty() ) + if ( layerNameCopy.isEmpty() ) { bool ok; QString defaultName = tr( "Pasted" ); - layerName = QInputDialog::getText( this, tr( "New temporary scratch layer name" ), - tr( "Layer name" ), QLineEdit::Normal, - defaultName, &ok ); + layerNameCopy = QInputDialog::getText( this, tr( "New temporary scratch layer name" ), + tr( "Layer name" ), QLineEdit::Normal, + defaultName, &ok ); if ( !ok ) return nullptr; - if ( layerName.isEmpty() ) + if ( layerNameCopy.isEmpty() ) { - layerName = defaultName; + layerNameCopy = defaultName; } } @@ -7706,7 +7706,7 @@ QgsVectorLayer *QgisApp::pasteAsNewMemoryVector( const QString & theLayerName ) if ( !layer ) return nullptr; - layer->setName( layerName ); + layer->setName( layerNameCopy ); mMapCanvas->freeze(); @@ -8397,10 +8397,10 @@ void QgisApp::saveLastMousePosition( const QgsPoint & p ) } -void QgisApp::showScale( double theScale ) +void QgisApp::showScale( double scale ) { // Why has MapCanvas the scale inverted? - mScaleWidget->setScale( 1.0 / theScale ); + mScaleWidget->setScale( 1.0 / scale ); // Not sure if the lines below do anything meaningful /Homann if ( mScaleWidget->width() > mScaleWidget->minimumWidth() ) @@ -8423,9 +8423,9 @@ void QgisApp::isInOverview() mLayerTreeView->defaultActions()->showInOverview(); } -void QgisApp::removingLayers( const QStringList& theLayers ) +void QgisApp::removingLayers( const QStringList& layers ) { - Q_FOREACH ( const QString &layerId, theLayers ) + Q_FOREACH ( const QString &layerId, layers ) { QgsVectorLayer *vlayer = qobject_cast( QgsProject::instance()->mapLayer( layerId ) ); @@ -9206,7 +9206,7 @@ void QgisApp::localCumulativeCutStretch() histogramStretch( true, QgsRasterMinMaxOrigin::CumulativeCut ); } -void QgisApp::histogramStretch( bool visibleAreaOnly, QgsRasterMinMaxOrigin::Limits theLimits ) +void QgisApp::histogramStretch( bool visibleAreaOnly, QgsRasterMinMaxOrigin::Limits limits ) { QgsMapLayer * myLayer = mLayerTreeView->currentLayer(); @@ -9231,7 +9231,7 @@ void QgisApp::histogramStretch( bool visibleAreaOnly, QgsRasterMinMaxOrigin::Lim if ( visibleAreaOnly ) myRectangle = mMapCanvas->mapSettings().outputExtentToLayerExtent( myRasterLayer, mMapCanvas->extent() ); - myRasterLayer->setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, theLimits, myRectangle ); + myRasterLayer->setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, limits, myRectangle ); myRasterLayer->triggerRepaint(); } @@ -9511,18 +9511,18 @@ QgsVectorLayer* QgisApp::addVectorLayer( const QString& vectorLayerPath, const Q -void QgisApp::addMapLayer( QgsMapLayer *theMapLayer ) +void QgisApp::addMapLayer( QgsMapLayer *mapLayer ) { mMapCanvas->freeze(); // Let render() do its own cursor management // QApplication::setOverrideCursor(Qt::WaitCursor); - if ( theMapLayer->isValid() ) + if ( mapLayer->isValid() ) { // Register this layer with the layers registry QList myList; - myList << theMapLayer; + myList << mapLayer; QgsProject::instance()->addMapLayers( myList ); // add it to the mapcanvas collection // not necessary since adding to registry adds to canvas mMapCanvas->addLayer(theMapLayer); @@ -9587,9 +9587,9 @@ void QgisApp::embedLayers() } } -void QgisApp::setExtent( const QgsRectangle& theRect ) +void QgisApp::setExtent( const QgsRectangle& rect ) { - mMapCanvas->setExtent( theRect ); + mMapCanvas->setExtent( rect ); } /** @@ -10314,17 +10314,17 @@ void QgisApp::destinationCrsChanged() updateCrsStatusBar(); } -void QgisApp::hasCrsTransformEnabled( bool theFlag ) +void QgisApp::hasCrsTransformEnabled( bool flag ) { // save this information to project - QgsProject::instance()->writeEntry( QStringLiteral( "SpatialRefSys" ), QStringLiteral( "/ProjectionsEnabled" ), ( theFlag ? 1 : 0 ) ); + QgsProject::instance()->writeEntry( QStringLiteral( "SpatialRefSys" ), QStringLiteral( "/ProjectionsEnabled" ), ( flag ? 1 : 0 ) ); updateCrsStatusBar(); } // slot to update the progress bar in the status bar -void QgisApp::showProgress( int theProgress, int theTotalSteps ) +void QgisApp::showProgress( int progress, int totalSteps ) { - if ( theProgress == theTotalSteps ) + if ( progress == totalSteps ) { mProgressBar->reset(); mProgressBar->hide(); @@ -10336,8 +10336,8 @@ void QgisApp::showProgress( int theProgress, int theTotalSteps ) { mProgressBar->show(); } - mProgressBar->setMaximum( theTotalSteps ); - mProgressBar->setValue( theProgress ); + mProgressBar->setMaximum( totalSteps ); + mProgressBar->setValue( progress ); if ( mProgressBar->maximum() == 0 ) { @@ -10399,9 +10399,9 @@ void QgisApp::extentChanged() mLayerTreeView->layerTreeModel()->setLegendMapViewData( mMapCanvas->mapUnitsPerPixel(), mMapCanvas->mapSettings().outputDpi(), mMapCanvas->scale() ); } -void QgisApp::layersWereAdded( const QList& theLayers ) +void QgisApp::layersWereAdded( const QList& layers ) { - Q_FOREACH ( QgsMapLayer* layer, theLayers ) + Q_FOREACH ( QgsMapLayer* layer, layers ) { QgsDataProvider *provider = nullptr; @@ -10455,9 +10455,9 @@ void QgisApp::updateMouseCoordinatePrecision() mCoordsEdit->setMouseCoordinatesPrecision( QgsCoordinateUtils::calculateCoordinatePrecision( mapCanvas()->mapUnitsPerPixel(), mapCanvas()->mapSettings().destinationCrs() ) ); } -void QgisApp::showStatusMessage( const QString& theMessage ) +void QgisApp::showStatusMessage( const QString& message ) { - statusBar()->showMessage( theMessage ); + statusBar()->showMessage( message ); } void QgisApp::displayMapToolMessage( const QString& message, QgsMessageBar::MessageLevel level ) @@ -11110,26 +11110,26 @@ void QgisApp::addRasterLayer() // of the calling method to manage things such as the frozen state of the mapcanvas and // using waitcursors etc. - this method won't and SHOULDN'T do it // -bool QgisApp::addRasterLayer( QgsRasterLayer *theRasterLayer ) +bool QgisApp::addRasterLayer( QgsRasterLayer *rasterLayer ) { - Q_CHECK_PTR( theRasterLayer ); + Q_CHECK_PTR( rasterLayer ); - if ( ! theRasterLayer ) + if ( ! rasterLayer ) { // XXX insert meaningful whine to the user here; although be // XXX mindful that a null layer may mean exhausted memory resources return false; } - if ( !theRasterLayer->isValid() ) + if ( !rasterLayer->isValid() ) { - delete theRasterLayer; + delete rasterLayer; return false; } // register this layer with the central layers registry QList myList; - myList << theRasterLayer; + myList << rasterLayer; QgsProject::instance()->addMapLayers( myList ); return true; @@ -11259,9 +11259,9 @@ QgsRasterLayer* QgisApp::addRasterLayer( //create a raster layer object and delegate to addRasterLayer(QgsRasterLayer *) -bool QgisApp::addRasterLayers( QStringList const &theFileNameQStringList, bool guiWarning ) +bool QgisApp::addRasterLayers( QStringList const &fileNameQStringList, bool guiWarning ) { - if ( theFileNameQStringList.empty() ) + if ( fileNameQStringList.empty() ) { // no files selected so bail out, but // allow mMapCanvas to handle events @@ -11276,8 +11276,8 @@ bool QgisApp::addRasterLayers( QStringList const &theFileNameQStringList, bool g // be ogr layers. We'll set returnValue to false if one or more layers fail // to load. bool returnValue = true; - for ( QStringList::ConstIterator myIterator = theFileNameQStringList.begin(); - myIterator != theFileNameQStringList.end(); + for ( QStringList::ConstIterator myIterator = fileNameQStringList.begin(); + myIterator != fileNameQStringList.end(); ++myIterator ) { QString errMsg; diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index a9eb06e3598..0e3f29203bd 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -168,14 +168,14 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow @param dataSourceType type of ogr datasource @returns true if successfully added layer */ - bool addVectorLayers( const QStringList &theLayerQStringList, const QString &enc, const QString &dataSourceType ); + bool addVectorLayers( const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType ); /** Overloaded vesion of the private addRasterLayer() Method that takes a list of file names instead of prompting user with a dialog. @returns true if successfully added layer(s) */ - bool addRasterLayers( const QStringList &theLayerQStringList, bool guiWarning = true ); + bool addRasterLayers( const QStringList &layerQStringList, bool guiWarning = true ); /** Open a raster layer for the given file @returns false if unable to open a raster layer for rasterFile @@ -190,10 +190,10 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow QString crsAndFormatAdjustedLayerUri( const QString& uri, const QStringList& supportedCrs, const QStringList& supportedFormats ) const; //! Add a 'pre-made' map layer to the project - void addMapLayer( QgsMapLayer *theMapLayer ); + void addMapLayer( QgsMapLayer *mapLayer ); //! Set the extents of the map canvas - void setExtent( const QgsRectangle& theRect ); + void setExtent( const QgsRectangle& rect ); //! Remove all layers from the map and legend - reimplements same method from qgisappbase void removeAllLayers(); @@ -645,7 +645,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow //! copies features on the clipboard to a new vector layer void pasteAsNewVector(); //! copies features on the clipboard to a new memory vector layer - QgsVectorLayer *pasteAsNewMemoryVector( const QString & theLayerName = QString() ); + QgsVectorLayer *pasteAsNewMemoryVector( const QString & layerName = QString() ); //! copies style of the active layer to the clipboard /** @@ -789,7 +789,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow //! Store the position for map tool tip void saveLastMousePosition( const QgsPoint & ); //! Slot to show current map scale; - void showScale( double theScale ); + void showScale( double scale ); //! Slot to handle user rotation input; //! @note added in 2.8 void userRotation(); @@ -999,7 +999,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow //! Create a new blank project (no template) void fileNewBlank(); //! As above but allows forcing without prompt and forcing blank project - void fileNew( bool thePromptToSaveFlag, bool forceBlank = false ); + void fileNew( bool promptToSaveFlag, bool forceBlank = false ); //! What type of project to open after launch void fileOpenAfterLaunch(); //! After project read, set any auto-opened project as successful @@ -1186,15 +1186,15 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow void selectionChanged( QgsMapLayer *layer ); - void showProgress( int theProgress, int theTotalSteps ); + void showProgress( int progress, int totalSteps ); void extentChanged(); void showRotation(); - void showStatusMessage( const QString& theMessage ); + void showStatusMessage( const QString& message ); void displayMapToolMessage( const QString& message, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO ); void displayMessage( const QString& title, const QString& message, QgsMessageBar::MessageLevel level ); void removeMapToolMessage(); void updateMouseCoordinatePrecision(); - void hasCrsTransformEnabled( bool theFlag ); + void hasCrsTransformEnabled( bool flag ); void destinationCrsChanged(); // void debugHook(); //! Add a Layer Definition file @@ -1462,7 +1462,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow /** Add a raster layer to the map (passed in as a ptr). * It won't force a refresh. */ - bool addRasterLayer( QgsRasterLayer * theRasterLayer ); + bool addRasterLayer( QgsRasterLayer * rasterLayer ); //! Open a raster layer - this is the generic function which takes all parameters QgsRasterLayer* addRasterLayerPrivate( const QString & uri, const QString & baseName, @@ -1526,7 +1526,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow void createDecorations(); //! Do histogram stretch for singleband gray / multiband color rasters - void histogramStretch( bool visibleAreaOnly = false, QgsRasterMinMaxOrigin::Limits theLimits = QgsRasterMinMaxOrigin::MinMax ); + void histogramStretch( bool visibleAreaOnly = false, QgsRasterMinMaxOrigin::Limits limits = QgsRasterMinMaxOrigin::MinMax ); //! Apply raster brightness void adjustBrightnessContrast( int delta, bool updateBrightness = true ); diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index acf54654f75..485a06f6d97 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -156,14 +156,14 @@ QgsRasterLayer* QgisAppInterface::addRasterLayer( const QString& url, const QStr return qgis->addRasterLayer( url, baseName, providerKey ); } -bool QgisAppInterface::addProject( const QString& theProjectName ) +bool QgisAppInterface::addProject( const QString& projectName ) { - return qgis->addProject( theProjectName ); + return qgis->addProject( projectName ); } -void QgisAppInterface::newProject( bool thePromptToSaveFlag ) +void QgisAppInterface::newProject( bool promptToSaveFlag ) { - qgis->fileNew( thePromptToSaveFlag ); + qgis->fileNew( promptToSaveFlag ); } QgsMapLayer *QgisAppInterface::activeLayer() diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index 8a2481363ee..1ed88215ef6 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -76,9 +76,9 @@ class APP_EXPORT QgisAppInterface : public QgisInterface QgsRasterLayer* addRasterLayer( const QString& url, const QString& baseName, const QString& providerKey ) override; //! Add a project - bool addProject( const QString& theProjectName ) override; + bool addProject( const QString& projectName ) override; //! Start a new blank project - void newProject( bool thePromptToSaveFlag = false ) override; + void newProject( bool promptToSaveFlag = false ) override; //! Get pointer to the active layer (layer selected in the legend) QgsMapLayer *activeLayer() override; diff --git a/src/app/qgsapplayertreeviewmenuprovider.cpp b/src/app/qgsapplayertreeviewmenuprovider.cpp index 2e2c67b59b0..29df7318e67 100644 --- a/src/app/qgsapplayertreeviewmenuprovider.cpp +++ b/src/app/qgsapplayertreeviewmenuprovider.cpp @@ -428,7 +428,7 @@ void QgsAppLayerTreeViewMenuProvider::addCustomLayerActions( QMenu* menu, QgsMap if ( ! lyrActions.isEmpty() ) { menu->addSeparator(); - QList theMenus; + QList menus; for ( int i = 0; i < lyrActions.count(); i++ ) { if ( lyrActions[i].allLayers || lyrActions[i].layers.contains( layer ) ) @@ -450,7 +450,7 @@ void QgsAppLayerTreeViewMenuProvider::addCustomLayerActions( QMenu* menu, QgsMap QMenu* newMenu = nullptr; QString dst = menuName; dst.remove( QChar( '&' ) ); - Q_FOREACH ( QMenu* menu, theMenus ) + Q_FOREACH ( QMenu* menu, menus ) { QString src = menu->title(); src.remove( QChar( '&' ) ); @@ -472,11 +472,11 @@ void QgsAppLayerTreeViewMenuProvider::addCustomLayerActions( QMenu* menu, QgsMap { // It doesn't exist, so create newMenu = new QMenu( menuName ); - theMenus.append( newMenu ); + menus.append( newMenu ); // Where to put it? - we worked that out above... menu->insertMenu( before, newMenu ); } - // QMenu* menu = getMenu( lyrActions[i].menu, &theBeforeSep, &theAfterSep, &theMenu ); + // QMenu* menu = getMenu( lyrActions[i].menu, &beforeSep, &afterSep, &menu ); newMenu->addAction( lyrActions[i].action ); } } diff --git a/src/app/qgsattributetabledialog.cpp b/src/app/qgsattributetabledialog.cpp index 887077f5986..7401dc708c8 100644 --- a/src/app/qgsattributetabledialog.cpp +++ b/src/app/qgsattributetabledialog.cpp @@ -79,14 +79,14 @@ void QgsAttributeTableDialog::updateMultiEditButtonState() } } -QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWidget *parent, Qt::WindowFlags flags ) +QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *layer, QWidget *parent, Qt::WindowFlags flags ) : QDialog( parent, flags ) , mDock( nullptr ) - , mLayer( theLayer ) + , mLayer( layer ) , mRubberBand( nullptr ) , mCurrentSearchWidgetWrapper( nullptr ) { - setObjectName( QStringLiteral( "QgsAttributeTableDialog/" ) + theLayer->id() ); + setObjectName( QStringLiteral( "QgsAttributeTableDialog/" ) + layer->id() ); setupUi( this ); Q_FOREACH ( const QgsField& field, mLayer->fields() ) @@ -137,11 +137,11 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid settings.value( QStringLiteral( "/qgis/attributeTableBehavior" ), QgsAttributeTableFilterModel::ShowAll ).toInt() == QgsAttributeTableFilterModel::ShowVisible ) { QgsMapCanvas *mc = QgisApp::instance()->mapCanvas(); - QgsRectangle extent( mc->mapSettings().mapToLayerCoordinates( theLayer, mc->extent() ) ); + QgsRectangle extent( mc->mapSettings().mapToLayerCoordinates( layer, mc->extent() ) ); r.setFilterRect( extent ); mRubberBand = new QgsRubberBand( mc, QgsWkbTypes::PolygonGeometry ); - mRubberBand->setToGeometry( QgsGeometry::fromRect( extent ), theLayer ); + mRubberBand->setToGeometry( QgsGeometry::fromRect( extent ), layer ); mActionShowAllFilter->setText( tr( "Show All Features In Initial Canvas Extent" ) ); } diff --git a/src/app/qgsattributetabledialog.h b/src/app/qgsattributetabledialog.h index b19e1433ad1..e1673b1cb9c 100644 --- a/src/app/qgsattributetabledialog.h +++ b/src/app/qgsattributetabledialog.h @@ -46,11 +46,11 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib /** * Constructor - * @param theLayer layer pointer + * @param layer layer pointer * @param parent parent object * @param flags window flags */ - QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::Window ); + QgsAttributeTableDialog( QgsVectorLayer *layer, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::Window ); ~QgsAttributeTableDialog(); QgsExpressionContext createExpressionContext() const override; diff --git a/src/app/qgscustomization.cpp b/src/app/qgscustomization.cpp index fb29c838da3..c8929ac4a71 100644 --- a/src/app/qgscustomization.cpp +++ b/src/app/qgscustomization.cpp @@ -70,15 +70,15 @@ QgsCustomizationDialog::~QgsCustomizationDialog() settings.setValue( QStringLiteral( "/Windows/Customization/geometry" ), saveGeometry() ); } -QTreeWidgetItem * QgsCustomizationDialog::item( const QString& thePath, QTreeWidgetItem *theItem ) +QTreeWidgetItem * QgsCustomizationDialog::item( const QString& path, QTreeWidgetItem *widgetItem ) { - QString path = thePath; - if ( path.startsWith( '/' ) ) - path = path.mid( 1 ); // remove '/' - QStringList names = path.split( '/' ); - path = QStringList( names.mid( 1 ) ).join( QStringLiteral( "/" ) ); + QString pathCopy = path; + if ( pathCopy.startsWith( '/' ) ) + pathCopy = pathCopy.mid( 1 ); // remove '/' + QStringList names = pathCopy.split( '/' ); + pathCopy = QStringList( names.mid( 1 ) ).join( QStringLiteral( "/" ) ); - if ( ! theItem ) + if ( ! widgetItem ) { for ( int i = 0; i < treeWidget->topLevelItemCount(); ++i ) { @@ -86,15 +86,15 @@ QTreeWidgetItem * QgsCustomizationDialog::item( const QString& thePath, QTreeWid QString objectName = myItem->text( 0 ); if ( objectName == names[0] ) { - return item( path, myItem ); + return item( pathCopy, myItem ); } } } else { - for ( int i = 0; i < theItem->childCount(); ++i ) + for ( int i = 0; i < widgetItem->childCount(); ++i ) { - QTreeWidgetItem *myItem = theItem->child( i ); + QTreeWidgetItem *myItem = widgetItem->child( i ); QString objectName = myItem->text( 0 ); if ( objectName == names[0] ) { @@ -104,7 +104,7 @@ QTreeWidgetItem * QgsCustomizationDialog::item( const QString& thePath, QTreeWid } else { - return item( path, myItem ); + return item( pathCopy, myItem ); } } } @@ -113,73 +113,73 @@ QTreeWidgetItem * QgsCustomizationDialog::item( const QString& thePath, QTreeWid return nullptr; } -bool QgsCustomizationDialog::itemChecked( const QString& thePath ) +bool QgsCustomizationDialog::itemChecked( const QString& path ) { - QgsDebugMsg( QString( "thePath = %1" ).arg( thePath ) ); - QTreeWidgetItem *myItem = item( thePath ); + QgsDebugMsg( QString( "thePath = %1" ).arg( path ) ); + QTreeWidgetItem *myItem = item( path ); if ( !myItem ) return true; return myItem->checkState( 0 ) == Qt::Checked ? true : false; } -void QgsCustomizationDialog::setItemChecked( const QString& thePath, bool on ) +void QgsCustomizationDialog::setItemChecked( const QString& path, bool on ) { - QgsDebugMsg( QString( "thePath = %1 on = %2" ).arg( thePath ).arg( on ) ); - QTreeWidgetItem *myItem = item( thePath ); + QgsDebugMsg( QString( "thePath = %1 on = %2" ).arg( path ).arg( on ) ); + QTreeWidgetItem *myItem = item( path ); if ( !myItem ) return; myItem->setCheckState( 0, on ? Qt::Checked : Qt::Unchecked ); } -void QgsCustomizationDialog::settingsToItem( const QString& thePath, QTreeWidgetItem *theItem, QSettings *theSettings ) +void QgsCustomizationDialog::settingsToItem( const QString& path, QTreeWidgetItem *item, QSettings *settings ) { - QString objectName = theItem->text( 0 ); + QString objectName = item->text( 0 ); if ( objectName.isEmpty() ) return; // object is not identifiable - QString myPath = thePath + '/' + objectName; + QString myPath = path + '/' + objectName; - bool on = theSettings->value( myPath, true ).toBool(); - theItem->setCheckState( 0, on ? Qt::Checked : Qt::Unchecked ); + bool on = settings->value( myPath, true ).toBool(); + item->setCheckState( 0, on ? Qt::Checked : Qt::Unchecked ); - for ( int i = 0; i < theItem->childCount(); ++i ) + for ( int i = 0; i < item->childCount(); ++i ) { - QTreeWidgetItem *myItem = theItem->child( i ); - settingsToItem( myPath, myItem, theSettings ); + QTreeWidgetItem *myItem = item->child( i ); + settingsToItem( myPath, myItem, settings ); } } -void QgsCustomizationDialog::itemToSettings( const QString& thePath, QTreeWidgetItem *theItem, QSettings *theSettings ) +void QgsCustomizationDialog::itemToSettings( const QString& path, QTreeWidgetItem *item, QSettings *settings ) { - QString objectName = theItem->text( 0 ); + QString objectName = item->text( 0 ); if ( objectName.isEmpty() ) return; // object is not identifiable - QString myPath = thePath + '/' + objectName; - bool on = theItem->checkState( 0 ) == Qt::Checked ? true : false; - theSettings->setValue( myPath, on ); + QString myPath = path + '/' + objectName; + bool on = item->checkState( 0 ) == Qt::Checked ? true : false; + settings->setValue( myPath, on ); - for ( int i = 0; i < theItem->childCount(); ++i ) + for ( int i = 0; i < item->childCount(); ++i ) { - QTreeWidgetItem *myItem = theItem->child( i ); - itemToSettings( myPath, myItem, theSettings ); + QTreeWidgetItem *myItem = item->child( i ); + itemToSettings( myPath, myItem, settings ); } } -void QgsCustomizationDialog::treeToSettings( QSettings *theSettings ) +void QgsCustomizationDialog::treeToSettings( QSettings *settings ) { for ( int i = 0; i < treeWidget->topLevelItemCount(); ++i ) { - itemToSettings( QStringLiteral( "/Customization" ), treeWidget->topLevelItem( i ), theSettings ); + itemToSettings( QStringLiteral( "/Customization" ), treeWidget->topLevelItem( i ), settings ); } } -void QgsCustomizationDialog::settingsToTree( QSettings *theSettings ) +void QgsCustomizationDialog::settingsToTree( QSettings *settings ) { for ( int i = 0; i < treeWidget->topLevelItemCount(); ++i ) { - settingsToItem( QStringLiteral( "/Customization" ), treeWidget->topLevelItem( i ), theSettings ); + settingsToItem( QStringLiteral( "/Customization" ), treeWidget->topLevelItem( i ), settings ); } } @@ -338,9 +338,9 @@ QTreeWidgetItem * QgsCustomizationDialog::createTreeItemWidgets() return myItem; } -QTreeWidgetItem * QgsCustomizationDialog::readWidgetsXmlNode( const QDomNode& theNode ) +QTreeWidgetItem * QgsCustomizationDialog::readWidgetsXmlNode( const QDomNode& node ) { - QDomElement myElement = theNode.toElement(); + QDomElement myElement = node.toElement(); QString name = myElement.attribute( QStringLiteral( "objectName" ), QLatin1String( "" ) ); QStringList data( name ); @@ -362,7 +362,7 @@ QTreeWidgetItem * QgsCustomizationDialog::readWidgetsXmlNode( const QDomNode& th myItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsSelectable ); myItem->setCheckState( 0, Qt::Checked ); - QDomNode n = theNode.firstChild(); + QDomNode n = node.firstChild(); while ( !n.isNull() ) { QDomElement e = n.toElement(); @@ -444,33 +444,33 @@ bool QgsCustomizationDialog::switchWidget( QWidget *widget, QMouseEvent *e ) return true; } -QString QgsCustomizationDialog::widgetPath( QWidget * theWidget, const QString& thePath ) +QString QgsCustomizationDialog::widgetPath( QWidget * widget, const QString& path ) { // go up until QDialog is reached - QString name = theWidget->objectName(); + QString name = widget->objectName(); - QString path = thePath; + QString pathCopy = path; if ( !QgsCustomization::sInternalWidgets.contains( name ) ) { - if ( !path.isEmpty() ) + if ( !pathCopy.isEmpty() ) { - path = name + '/' + path; + pathCopy = name + '/' + pathCopy; } else { - path = name; + pathCopy = name; } } - QWidget * parent = theWidget->parentWidget(); + QWidget * parent = widget->parentWidget(); - if ( !parent || theWidget->inherits( "QDialog" ) ) + if ( !parent || widget->inherits( "QDialog" ) ) { - return '/' + path; + return '/' + pathCopy; } - return widgetPath( parent, path ); + return widgetPath( parent, pathCopy ); } void QgsCustomizationDialog::setCatch( bool on ) @@ -642,7 +642,7 @@ QgsCustomization::~QgsCustomization() { } -void QgsCustomization::updateMainWindow( QMenu * theToolBarMenu ) +void QgsCustomization::updateMainWindow( QMenu * toolBarMenu ) { // collect tree items even if the customization is disabled createTreeItemMenus(); @@ -692,7 +692,7 @@ void QgsCustomization::updateMainWindow( QMenu * theToolBarMenu ) { mw->removeToolBar( tb ); // remove also from menu, because toolbars removed here, switched on later from menu don't work correctly - theToolBarMenu->removeAction( tb->toggleViewAction() ); + toolBarMenu->removeAction( tb->toggleViewAction() ); } else { @@ -814,10 +814,10 @@ void QgsCustomization::customizeWidget( QWidget * widget, QEvent * event, QSetti QgsCustomization::customizeWidget( path, widget, settings ); } -void QgsCustomization::customizeWidget( const QString& thePath, QWidget * theWidget, QSettings* settings ) +void QgsCustomization::customizeWidget( const QString& path, QWidget * widget, QSettings* settings ) { - QString name = theWidget->objectName(); - QString myPath = thePath; + QString name = widget->objectName(); + QString myPath = path; // Qt may insert some internal classes in the tree, e.g. QTabWidgetPrivate inserts // qt_tabwidget_stackedwidget, such widgets do not appear in the tree generated @@ -825,10 +825,10 @@ void QgsCustomization::customizeWidget( const QString& thePath, QWidget * theWid if ( !QgsCustomization::sInternalWidgets.contains( name ) ) { - myPath = thePath + '/' + name; + myPath = path + '/' + name; } - QObjectList children = theWidget->children(); + QObjectList children = widget->children(); QObjectList::iterator i; for ( i = children.begin(); i != children.end(); ++i ) { @@ -846,7 +846,7 @@ void QgsCustomization::customizeWidget( const QString& thePath, QWidget * theWid } else { - QLayout *l = theWidget->layout(); + QLayout *l = widget->layout(); if ( l ) { QgsDebugMsg( "remove" ); @@ -862,16 +862,16 @@ void QgsCustomization::customizeWidget( const QString& thePath, QWidget * theWid } } -void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget ) +void QgsCustomization::removeFromLayout( QLayout *layout, QWidget * widget ) { - if ( theLayout->indexOf( theWidget ) >= 0 ) + if ( layout->indexOf( widget ) >= 0 ) { - theLayout->removeWidget( theWidget ); + layout->removeWidget( widget ); return; } else { - QObjectList children = theLayout->children(); + QObjectList children = layout->children(); QObjectList::iterator i; for ( i = children.begin(); i != children.end(); ++i ) { @@ -879,7 +879,7 @@ void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget continue; QLayout *l = qobject_cast( *i ); - QgsCustomization::removeFromLayout( l, theWidget ); + QgsCustomization::removeFromLayout( l, widget ); } } } diff --git a/src/app/qgscustomization.h b/src/app/qgscustomization.h index 3acd4317472..ffeaddc75c4 100644 --- a/src/app/qgscustomization.h +++ b/src/app/qgscustomization.h @@ -39,31 +39,31 @@ class APP_EXPORT QgsCustomizationDialog : public QMainWindow, private Ui::QgsCus ~QgsCustomizationDialog(); // get item by path - QTreeWidgetItem *item( const QString& thePath, QTreeWidgetItem *theItem = nullptr ); + QTreeWidgetItem *item( const QString& path, QTreeWidgetItem *widgetItem = nullptr ); // // return current item state for given path - bool itemChecked( const QString& thePath ); + bool itemChecked( const QString& path ); // set item state for given path - void setItemChecked( const QString& thePath, bool on ); + void setItemChecked( const QString& path, bool on ); // recursively save tree item to settings - void itemToSettings( const QString& thePath, QTreeWidgetItem *theItem, QSettings *theSettings ); + void itemToSettings( const QString& path, QTreeWidgetItem *item, QSettings *settings ); // recursively save settings to tree items - void settingsToItem( const QString& thePath, QTreeWidgetItem *theItem, QSettings *theSettings ); + void settingsToItem( const QString& path, QTreeWidgetItem *item, QSettings *settings ); // save current tree to settings - void treeToSettings( QSettings *theSettings ); + void treeToSettings( QSettings *settings ); // restore current tree from settings - void settingsToTree( QSettings *theSettings ); + void settingsToTree( QSettings *settings ); // switch widget item in tree bool switchWidget( QWidget * widget, QMouseEvent *event ); // Get path of the widget - QString widgetPath( QWidget * theWidget, const QString& thePath = QString() ); + QString widgetPath( QWidget * widget, const QString& path = QString() ); void setCatch( bool on ); bool catchOn(); @@ -95,7 +95,7 @@ class APP_EXPORT QgsCustomizationDialog : public QMainWindow, private Ui::QgsCus private: void init(); QTreeWidgetItem * createTreeItemWidgets(); - QTreeWidgetItem * readWidgetsXmlNode( const QDomNode& theNode ); + QTreeWidgetItem * readWidgetsXmlNode( const QDomNode& node ); QString mLastDirSettingsName; QSettings* mSettings = nullptr; @@ -119,9 +119,9 @@ class APP_EXPORT QgsCustomization : public QObject void openDialog( QWidget *parent ); static void customizeWidget( QWidget * widget, QEvent * event, QSettings* settings ); static void customizeWidget( const QString& path, QWidget * widget, QSettings* settings ); - static void removeFromLayout( QLayout *theLayout, QWidget * widget ); + static void removeFromLayout( QLayout *layout, QWidget * widget ); - void updateMainWindow( QMenu * theToolBarMenu ); + void updateMainWindow( QMenu * toolBarMenu ); // make sure to enable/disable before creating QgisApp in order to get it customized (or not) void setEnabled( bool enabled ) { mEnabled = enabled; } diff --git a/src/app/qgsdecorationnortharrowdialog.cpp b/src/app/qgsdecorationnortharrowdialog.cpp index b520535001b..570f514bd13 100644 --- a/src/app/qgsdecorationnortharrowdialog.cpp +++ b/src/app/qgsdecorationnortharrowdialog.cpp @@ -80,14 +80,14 @@ void QgsDecorationNorthArrowDialog::on_buttonBox_rejected() } -void QgsDecorationNorthArrowDialog::on_spinAngle_valueChanged( int theInt ) +void QgsDecorationNorthArrowDialog::on_spinAngle_valueChanged( int spinAngle ) { - Q_UNUSED( theInt ); + Q_UNUSED( spinAngle ); } -void QgsDecorationNorthArrowDialog::on_sliderRotation_valueChanged( int theInt ) +void QgsDecorationNorthArrowDialog::on_sliderRotation_valueChanged( int rotationValue ) { - rotatePixmap( theInt ); + rotatePixmap( rotationValue ); } void QgsDecorationNorthArrowDialog::apply() @@ -102,7 +102,7 @@ void QgsDecorationNorthArrowDialog::apply() mDeco.update(); } -void QgsDecorationNorthArrowDialog::rotatePixmap( int theRotationInt ) +void QgsDecorationNorthArrowDialog::rotatePixmap( int rotationInt ) { QPixmap myQPixmap; QString myFileNameQString = QStringLiteral( ":/images/north_arrows/default.png" ); @@ -123,11 +123,11 @@ void QgsDecorationNorthArrowDialog::rotatePixmap( int theRotationInt ) //myQPainter.translate( (int)centerXDouble, (int)centerYDouble ); //rotate the canvas - myQPainter.rotate( theRotationInt ); + myQPainter.rotate( rotationInt ); //work out how to shift the image so that it appears in the center of the canvas //(x cos a + y sin a - x, -x sin a + y cos a - y) const double PI = 3.14159265358979323846; - double myRadiansDouble = ( PI / 180 ) * theRotationInt; + double myRadiansDouble = ( PI / 180 ) * rotationInt; int xShift = static_cast(( ( centerXDouble * cos( myRadiansDouble ) ) + ( centerYDouble * sin( myRadiansDouble ) ) @@ -165,8 +165,8 @@ void QgsDecorationNorthArrowDialog::rotatePixmap( int theRotationInt ) // Called when the widget has been resized. // -void QgsDecorationNorthArrowDialog::resizeEvent( QResizeEvent *theResizeEvent ) +void QgsDecorationNorthArrowDialog::resizeEvent( QResizeEvent *resizeEvent ) { - Q_UNUSED( theResizeEvent ); + Q_UNUSED( resizeEvent ); rotatePixmap( sliderRotation->value() ); } diff --git a/src/app/qgsdecorationnortharrowdialog.h b/src/app/qgsdecorationnortharrowdialog.h index 73f1609c026..0c397f30cfc 100644 --- a/src/app/qgsdecorationnortharrowdialog.h +++ b/src/app/qgsdecorationnortharrowdialog.h @@ -26,15 +26,15 @@ class APP_EXPORT QgsDecorationNorthArrowDialog : public QDialog, private Ui::Qgs ~QgsDecorationNorthArrowDialog(); private: - void rotatePixmap( int theRotationInt ); + void rotatePixmap( int rotationInt ); void resizeEvent( QResizeEvent * ) override; //overloads qwidget private slots: void on_buttonBox_accepted(); void on_buttonBox_rejected(); void on_buttonBox_helpRequested(); - void on_spinAngle_valueChanged( int theInt ); - void on_sliderRotation_valueChanged( int theInt ); + void on_spinAngle_valueChanged( int spinAngle ); + void on_sliderRotation_valueChanged( int rotationValue ); void apply(); protected: diff --git a/src/app/qgsidentifyresultsdialog.cpp b/src/app/qgsidentifyresultsdialog.cpp index 3ee0843bec8..00bc32f6ec4 100644 --- a/src/app/qgsidentifyresultsdialog.cpp +++ b/src/app/qgsidentifyresultsdialog.cpp @@ -1442,13 +1442,13 @@ void QgsIdentifyResultsDialog::handleCurrentItemChanged( QTreeWidgetItem *curren void QgsIdentifyResultsDialog::layerDestroyed() { - QObject *theSender = sender(); + QObject *senderObject = sender(); for ( int i = 0; i < lstResults->topLevelItemCount(); i++ ) { QTreeWidgetItem *layItem = lstResults->topLevelItem( i ); - if ( layItem->data( 0, Qt::UserRole ).value() == sender() ) + if ( layItem->data( 0, Qt::UserRole ).value() == senderObject ) { for ( int j = 0; j < layItem->childCount(); j++ ) { @@ -1457,15 +1457,15 @@ void QgsIdentifyResultsDialog::layerDestroyed() } } - disconnectLayer( theSender ); - delete layerItem( theSender ); + disconnectLayer( senderObject ); + delete layerItem( senderObject ); // remove items, starting from last for ( int i = tblResults->rowCount() - 1; i >= 0; i-- ) { QgsDebugMsg( QString( "item %1 / %2" ).arg( i ).arg( tblResults->rowCount() ) ); QTableWidgetItem *layItem = tblResults->item( i, 0 ); - if ( layItem && layItem->data( Qt::UserRole ).value() == sender() ) + if ( layItem && layItem->data( Qt::UserRole ).value() == senderObject ) { QgsDebugMsg( QString( "removing row %1" ).arg( i ) ); tblResults->removeRow( i ); diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index cb5275e24f6..0cb96986d90 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -1891,9 +1891,9 @@ void QgsOptions::on_mClearCache_clicked() QgsNetworkAccessManager::instance()->cache()->clear(); } -void QgsOptions::on_mOptionsStackedWidget_currentChanged( int theIndx ) +void QgsOptions::on_mOptionsStackedWidget_currentChanged( int indx ) { - Q_UNUSED( theIndx ); + Q_UNUSED( indx ); // load gdal driver list when gdal tab is first opened if ( mOptionsStackedWidget->currentWidget()->objectName() == QLatin1String( "mOptionsPageGDAL" ) && ! mLoadedGdalDriverList ) diff --git a/src/app/qgsoptions.h b/src/app/qgsoptions.h index d3843fc8cab..5dc6d765446 100644 --- a/src/app/qgsoptions.h +++ b/src/app/qgsoptions.h @@ -202,7 +202,7 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption void on_pbnExportScales_clicked(); //! Auto slot executed when the active page in the option section widget is changed - void on_mOptionsStackedWidget_currentChanged( int theIndx ); + void on_mOptionsStackedWidget_currentChanged( int indx ); //! A scale in the list of predefined scales changed void scaleItemChanged( QListWidgetItem* changedScaleItem ); diff --git a/src/app/qgspluginregistry.cpp b/src/app/qgspluginregistry.cpp index 52449c0ac2d..7230c841f79 100644 --- a/src/app/qgspluginregistry.cpp +++ b/src/app/qgspluginregistry.cpp @@ -313,11 +313,11 @@ void QgsPluginRegistry::loadPythonPlugin( const QString& packageName ) } -void QgsPluginRegistry::loadCppPlugin( const QString& theFullPathName ) +void QgsPluginRegistry::loadCppPlugin( const QString& fullPathName ) { QSettings settings; - QString baseName = QFileInfo( theFullPathName ).baseName(); + QString baseName = QFileInfo( fullPathName ).baseName(); // first check to see if its already loaded if ( isLoaded( baseName ) ) @@ -327,7 +327,7 @@ void QgsPluginRegistry::loadCppPlugin( const QString& theFullPathName ) return; } - QLibrary myLib( theFullPathName ); + QLibrary myLib( fullPathName ); QString myError; //we will only show detailed diagnostics if something went wrong myError += QObject::tr( "Library name is %1\n" ).arg( myLib.fileName() ); @@ -403,14 +403,14 @@ void QgsPluginRegistry::loadCppPlugin( const QString& theFullPathName ) } else { - QgsMessageLog::logMessage( QObject::tr( "Unable to find the class factory for %1." ).arg( theFullPathName ), QObject::tr( "Plugins" ) ); + QgsMessageLog::logMessage( QObject::tr( "Unable to find the class factory for %1." ).arg( fullPathName ), QObject::tr( "Plugins" ) ); } } break; default: // type is unknown - QgsMessageLog::logMessage( QObject::tr( "Plugin %1 did not return a valid type and cannot be loaded" ).arg( theFullPathName ), QObject::tr( "Plugins" ) ); + QgsMessageLog::logMessage( QObject::tr( "Plugin %1 did not return a valid type and cannot be loaded" ).arg( fullPathName ), QObject::tr( "Plugins" ) ); break; } } @@ -438,10 +438,10 @@ void QgsPluginRegistry::unloadPythonPlugin( const QString& packageName ) } -void QgsPluginRegistry::unloadCppPlugin( const QString& theFullPathName ) +void QgsPluginRegistry::unloadCppPlugin( const QString& fullPathName ) { QSettings settings; - QString baseName = QFileInfo( theFullPathName ).baseName(); + QString baseName = QFileInfo( fullPathName ).baseName(); settings.setValue( "/Plugins/" + baseName, false ); if ( isLoaded( baseName ) ) { @@ -458,16 +458,16 @@ void QgsPluginRegistry::unloadCppPlugin( const QString& theFullPathName ) //overloaded version of the next method that will load from multiple directories not just one -void QgsPluginRegistry::restoreSessionPlugins( const QStringList& thePluginDirList ) +void QgsPluginRegistry::restoreSessionPlugins( const QStringList& pluginDirList ) { - QStringListIterator myIterator( thePluginDirList ); + QStringListIterator myIterator( pluginDirList ); while ( myIterator.hasNext() ) { restoreSessionPlugins( myIterator.next() ); } } -void QgsPluginRegistry::restoreSessionPlugins( const QString& thePluginDirString ) +void QgsPluginRegistry::restoreSessionPlugins( const QString& pluginDirString ) { QSettings mySettings; @@ -480,11 +480,11 @@ void QgsPluginRegistry::restoreSessionPlugins( const QString& thePluginDirString #endif // check all libs in the current plugin directory and get name and descriptions - QDir myPluginDir( thePluginDirString, pluginExt, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::NoSymLinks ); + QDir myPluginDir( pluginDirString, pluginExt, QDir::Name | QDir::IgnoreCase, QDir::Files | QDir::NoSymLinks ); for ( uint i = 0; i < myPluginDir.count(); i++ ) { - QString myFullPath = thePluginDirString + '/' + myPluginDir[i]; + QString myFullPath = pluginDirString + '/' + myPluginDir[i]; if ( checkCppPlugin( myFullPath ) ) { // check if the plugin was active on last session diff --git a/src/app/qgspluginregistry.h b/src/app/qgspluginregistry.h index cd4b9777661..cb528979ebe 100644 --- a/src/app/qgspluginregistry.h +++ b/src/app/qgspluginregistry.h @@ -79,14 +79,14 @@ class APP_EXPORT QgsPluginRegistry void loadPythonPlugin( const QString& packageName ); //! C++ plugin unloader - void unloadCppPlugin( const QString& theFullPathName ); + void unloadCppPlugin( const QString& fullPathName ); //! Python plugin unloader void unloadPythonPlugin( const QString& packageName ); //! Overloaded version of the next method that will load from multiple directories not just one - void restoreSessionPlugins( const QStringList& thePluginDirList ); + void restoreSessionPlugins( const QStringList& pluginDirList ); //! Load any plugins used in the last qgis session - void restoreSessionPlugins( const QString& thePluginDirString ); + void restoreSessionPlugins( const QString& pluginDirString ); //! Check whether plugin is compatible with current version of QGIS bool isPythonPluginCompatible( const QString& packageName ) const; diff --git a/src/app/qgsrasterlayerproperties.cpp b/src/app/qgsrasterlayerproperties.cpp index 8ac749b9da9..373c3210c3a 100644 --- a/src/app/qgsrasterlayerproperties.cpp +++ b/src/app/qgsrasterlayerproperties.cpp @@ -69,7 +69,7 @@ #include #include -QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanvas* theCanvas, QWidget *parent, Qt::WindowFlags fl ) +QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanvas* canvas, QWidget *parent, Qt::WindowFlags fl ) : QgsOptionsDialogBase( QStringLiteral( "RasterLayerProperties" ), parent, fl ) // Constant that signals property not used. , TRSTRING_NOT_SET( tr( "Not Set" ) ) @@ -81,7 +81,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv , mRendererWidget( nullptr ) , mGradientHeight( 0.0 ) , mGradientWidth( 0.0 ) - , mMapCanvas( theCanvas ) + , mMapCanvas( canvas ) , mHistogramWidget( nullptr ) { mGrayMinimumMaximumEstimated = true; @@ -162,7 +162,7 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv mPixelSelectorTool = nullptr; if ( mMapCanvas ) { - mPixelSelectorTool = new QgsMapToolEmitPoint( theCanvas ); + mPixelSelectorTool = new QgsMapToolEmitPoint( canvas ); connect( mPixelSelectorTool, SIGNAL( canvasClicked( const QgsPoint&, Qt::MouseButton ) ), this, SLOT( pixelSelected( const QgsPoint& ) ) ); } else @@ -1633,10 +1633,10 @@ void QgsRasterLayerProperties::pixelSelected( const QgsPoint& canvasPoint ) tableTransparency->resizeRowsToContents(); } -void QgsRasterLayerProperties::sliderTransparency_valueChanged( int theValue ) +void QgsRasterLayerProperties::sliderTransparency_valueChanged( int value ) { //set the transparency percentage label to a suitable value - int myInt = static_cast < int >(( theValue / 255.0 ) * 100 ); //255.0 to prevent integer division + int myInt = static_cast < int >(( value / 255.0 ) * 100 ); //255.0 to prevent integer division lblTransparencyPercent->setText( QString::number( myInt ) + '%' ); }//sliderTransparency_valueChanged diff --git a/src/app/qgsrasterlayerproperties.h b/src/app/qgsrasterlayerproperties.h index 82af6c4ebd7..2fd1596fc7b 100644 --- a/src/app/qgsrasterlayerproperties.h +++ b/src/app/qgsrasterlayerproperties.h @@ -48,7 +48,7 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private /** \brief Constructor * @param ml Map layer for which properties will be displayed */ - QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanvas* theCanvas, QWidget *parent = nullptr, Qt::WindowFlags = QgisGui::ModalDialogFlags ); + QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanvas* canvas, QWidget *parent = nullptr, Qt::WindowFlags = QgisGui::ModalDialogFlags ); ~QgsRasterLayerProperties(); diff --git a/src/app/qgsstatusbarcoordinateswidget.cpp b/src/app/qgsstatusbarcoordinateswidget.cpp index d6e15cfc01c..47b7a3ec909 100644 --- a/src/app/qgsstatusbarcoordinateswidget.cpp +++ b/src/app/qgsstatusbarcoordinateswidget.cpp @@ -188,9 +188,9 @@ void QgsStatusBarCoordinatesWidget::dizzy() mMapCanvas->setTransform( matrix ); } -void QgsStatusBarCoordinatesWidget::extentsViewToggled( bool theFlag ) +void QgsStatusBarCoordinatesWidget::extentsViewToggled( bool flag ) { - if ( theFlag ) + if ( flag ) { //extents view mode! mToggleExtentsViewButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "extents.svg" ) ) ); diff --git a/src/app/qgsstatusbarcoordinateswidget.h b/src/app/qgsstatusbarcoordinateswidget.h index b2fa62486c7..7dca05d309e 100644 --- a/src/app/qgsstatusbarcoordinateswidget.h +++ b/src/app/qgsstatusbarcoordinateswidget.h @@ -55,7 +55,7 @@ class APP_EXPORT QgsStatusBarCoordinatesWidget : public QWidget private slots: void showMouseCoordinates( const QgsPoint &p ); - void extentsViewToggled( bool theFlag ); + void extentsViewToggled( bool flag ); void validateCoordinates(); void dizzy(); void showExtent(); diff --git a/src/app/qgstip.h b/src/app/qgstip.h index 13905755908..3a12d4ff167 100644 --- a/src/app/qgstip.h +++ b/src/app/qgstip.h @@ -47,9 +47,9 @@ class APP_EXPORT QgsTip // Mutators // //! Set the tip title - void setTitle( const QString& theTitle ) {mTitle = theTitle;} + void setTitle( const QString& title ) {mTitle = title;} //! Set the tip content - void setContent( const QString& theContent ) {mContent = theContent;} + void setContent( const QString& content ) {mContent = content;} private: QString mTitle; QString mContent; diff --git a/src/app/qgstipfactory.cpp b/src/app/qgstipfactory.cpp index d6af14a9c95..2fad17be719 100644 --- a/src/app/qgstipfactory.cpp +++ b/src/app/qgstipfactory.cpp @@ -296,16 +296,16 @@ QgsTipFactory::~QgsTipFactory() } //private helper method -void QgsTipFactory::addGuiTip( const QgsTip& theTip ) +void QgsTipFactory::addGuiTip( const QgsTip& tip ) { - mGuiTips << theTip; - mAllTips << theTip; + mGuiTips << tip; + mAllTips << tip; } //private helper method -void QgsTipFactory::addGenericTip( const QgsTip& theTip ) +void QgsTipFactory::addGenericTip( const QgsTip& tip ) { - mGenericTips << theTip; - mAllTips << theTip; + mGenericTips << tip; + mAllTips << tip; } QgsTip QgsTipFactory::getTip() { @@ -314,9 +314,9 @@ QgsTip QgsTipFactory::getTip() QgsTip myTip = mAllTips.at( myValue ); return myTip; } -QgsTip QgsTipFactory::getTip( int thePosition ) +QgsTip QgsTipFactory::getTip( int position ) { - QgsTip myTip = mAllTips.at( thePosition ); + QgsTip myTip = mAllTips.at( position ); return myTip; } QgsTip QgsTipFactory::getGenericTip() @@ -334,9 +334,9 @@ QgsTip QgsTipFactory::getGuiTip() return myTip; } -int QgsTipFactory::randomNumber( int theMax ) +int QgsTipFactory::randomNumber( int max ) { - Q_UNUSED( theMax ); + Q_UNUSED( max ); return 0; } diff --git a/src/app/qgstipfactory.h b/src/app/qgstipfactory.h index f79864e19a8..6c7a5bf56d3 100644 --- a/src/app/qgstipfactory.h +++ b/src/app/qgstipfactory.h @@ -43,13 +43,13 @@ class APP_EXPORT QgsTipFactory : public QObject QgsTip getTip(); /** Get a specific tip (generic or gui-centric). - * @param thePosition The tip returned will be based on the - * number passed in as thePosition. If the + * @param position The tip returned will be based on the + * number passed in as position. If the * position is invalid, an empty string will be * returned. * @return An QgsTip containing the tip */ - QgsTip getTip( int thePosition ); + QgsTip getTip( int position ); /** Get a random generic tip * @return An QgsTip containing the tip @@ -67,7 +67,7 @@ class APP_EXPORT QgsTipFactory : public QObject private: void addGenericTip( const QgsTip& ); void addGuiTip( const QgsTip& ); - int randomNumber( int theMax ); + int randomNumber( int max ); //@TODO move tipts into a sqlite db QList mGenericTips; QList mGuiTips; diff --git a/src/app/qgstipgui.cpp b/src/app/qgstipgui.cpp index c6d00fa848b..bdb7076a992 100644 --- a/src/app/qgstipgui.cpp +++ b/src/app/qgstipgui.cpp @@ -74,12 +74,12 @@ void QgsTipGui::showTip( QgsTip myTip ) txtTip->setHtml( content ); } -void QgsTipGui::on_cbxDisableTips_toggled( bool theFlag ) +void QgsTipGui::on_cbxDisableTips_toggled( bool flag ) { QSettings settings; //note the ! below as when the cbx is checked (true) we want to //change the setting to false - settings.setValue( QStringLiteral( "/qgis/showTips%1" ).arg( Qgis::QGIS_VERSION_INT / 100 ), !theFlag ); + settings.setValue( QStringLiteral( "/qgis/showTips%1" ).arg( Qgis::QGIS_VERSION_INT / 100 ), !flag ); hide(); } diff --git a/src/app/qgstipgui.h b/src/app/qgstipgui.h index 454ece926bc..fd62ea2e9ae 100644 --- a/src/app/qgstipgui.h +++ b/src/app/qgstipgui.h @@ -35,7 +35,7 @@ class APP_EXPORT QgsTipGui : public QDialog, private Ui::QgsTipGuiBase int mTipPosition; private slots: - void on_cbxDisableTips_toggled( bool theFlag ); + void on_cbxDisableTips_toggled( bool flag ); void prevClicked(); void nextClicked(); }; diff --git a/src/auth/basic/qgsauthbasicmethod.cpp b/src/auth/basic/qgsauthbasicmethod.cpp index 1210d30f055..78b4c27e789 100644 --- a/src/auth/basic/qgsauthbasicmethod.cpp +++ b/src/auth/basic/qgsauthbasicmethod.cpp @@ -187,14 +187,14 @@ void QgsAuthBasicMethod::removeMethodConfig( const QString &authcfg ) } } -QString QgsAuthBasicMethod::escapeUserPass( const QString &theVal, QChar delim ) const +QString QgsAuthBasicMethod::escapeUserPass( const QString &val, QChar delim ) const { - QString val = theVal; + QString escaped = val; - val.replace( '\\', QLatin1String( "\\\\" ) ); - val.replace( delim, QStringLiteral( "\\%1" ).arg( delim ) ); + escaped.replace( '\\', QLatin1String( "\\\\" ) ); + escaped.replace( delim, QStringLiteral( "\\%1" ).arg( delim ) ); - return val; + return escaped; } ////////////////////////////////////////////// diff --git a/src/auth/basic/qgsauthbasicmethod.h b/src/auth/basic/qgsauthbasicmethod.h index 81615cdf488..ff6bf111ad6 100644 --- a/src/auth/basic/qgsauthbasicmethod.h +++ b/src/auth/basic/qgsauthbasicmethod.h @@ -55,7 +55,7 @@ class QgsAuthBasicMethod : public QgsAuthMethod void removeMethodConfig( const QString &authcfg ); - QString escapeUserPass( const QString &theVal, QChar delim = '\'' ) const; + QString escapeUserPass( const QString &val, QChar delim = '\'' ) const; static QMap sAuthConfigCache; }; diff --git a/src/core/composer/qgscomposerarrow.cpp b/src/core/composer/qgscomposerarrow.cpp index 9ef8fb19957..4720859bb1d 100644 --- a/src/core/composer/qgscomposerarrow.cpp +++ b/src/core/composer/qgscomposerarrow.cpp @@ -175,10 +175,10 @@ void QgsComposerArrow::drawLine( QPainter *painter ) return; } - QPaintDevice* thePaintDevice = painter->device(); + QPaintDevice* paintDevice = painter->device(); painter->save(); //setup painter scaling to dots so that raster symbology is drawn to scale - double dotsPerMM = thePaintDevice->logicalDpiX() / 25.4; + double dotsPerMM = paintDevice->logicalDpiX() / 25.4; painter->scale( 1 / dotsPerMM, 1 / dotsPerMM ); //scale painter from mm to dots //setup render context @@ -219,7 +219,7 @@ void QgsComposerArrow::drawHardcodedMarker( QPainter *p, MarkerType type ) void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QString &markerPath ) { Q_UNUSED( markerPath ); - double theAngle = QgsComposerUtils::angle( mStartPoint, mStopPoint ); + double angle = QgsComposerUtils::angle( mStartPoint, mStopPoint ); double arrowHeadHeight; if ( type == StartMarker ) @@ -277,7 +277,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin fixPoint.setY( -arrowHeadHeight / 2.0 ); } QPointF rotatedFixPoint; - double angleRad = theAngle / 180 * M_PI; + double angleRad = angle / 180 * M_PI; rotatedFixPoint.setX( fixPoint.x() * cos( angleRad ) + fixPoint.y() * -sin( angleRad ) ); rotatedFixPoint.setY( fixPoint.x() * sin( angleRad ) + fixPoint.y() * cos( angleRad ) ); p->translate( canvasPoint.x() - rotatedFixPoint.x(), canvasPoint.y() - rotatedFixPoint.y() ); @@ -287,7 +287,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin p->translate( canvasPoint.x(), canvasPoint.y() ); } - p->rotate( theAngle ); + p->rotate( angle ); p->translate( -mArrowHeadWidth / 2.0, -arrowHeadHeight / 2.0 ); r.render( p, QRectF( 0, 0, mArrowHeadWidth, arrowHeadHeight ) ); p->restore(); diff --git a/src/core/composer/qgscomposerlegend.cpp b/src/core/composer/qgscomposerlegend.cpp index 98d153b9552..850af7a42ca 100644 --- a/src/core/composer/qgscomposerlegend.cpp +++ b/src/core/composer/qgscomposerlegend.cpp @@ -735,10 +735,10 @@ void QgsComposerLegend::doUpdateFilterByMap() QgsRectangle requestRectangle; mComposerMap->requestedExtent( requestRectangle ); - QSizeF theSize( requestRectangle.width(), requestRectangle.height() ); - theSize *= mComposerMap->mapUnitsToMM() * dpi / 25.4; + QSizeF size( requestRectangle.width(), requestRectangle.height() ); + size *= mComposerMap->mapUnitsToMM() * dpi / 25.4; - QgsMapSettings ms = mComposerMap->mapSettings( requestRectangle, theSize, dpi ); + QgsMapSettings ms = mComposerMap->mapSettings( requestRectangle, size, dpi ); QgsGeometry filterPolygon; if ( mInAtlas ) diff --git a/src/core/composer/qgscomposermap.cpp b/src/core/composer/qgscomposermap.cpp index 8e1b1b700e4..cc22e64c8af 100644 --- a/src/core/composer/qgscomposermap.cpp +++ b/src/core/composer/qgscomposermap.cpp @@ -325,8 +325,8 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem*, } mDrawing = true; - QPaintDevice* thePaintDevice = painter->device(); - if ( !thePaintDevice ) + QPaintDevice* paintDevice = painter->device(); + if ( !paintDevice ) { return; } @@ -339,15 +339,15 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem*, QgsRectangle cExtent = *currentMapExtent(); - QSizeF theSize( cExtent.width() * mapUnitsToMM(), cExtent.height() * mapUnitsToMM() ); + QSizeF size( cExtent.width() * mapUnitsToMM(), cExtent.height() * mapUnitsToMM() ); painter->save(); painter->translate( mXOffset, mYOffset ); - double dotsPerMM = thePaintDevice->logicalDpiX() / 25.4; - theSize *= dotsPerMM; // output size will be in dots (pixels) + double dotsPerMM = paintDevice->logicalDpiX() / 25.4; + size *= dotsPerMM; // output size will be in dots (pixels) painter->scale( 1 / dotsPerMM, 1 / dotsPerMM ); // scale painter from mm to dots - draw( painter, cExtent, theSize, thePaintDevice->logicalDpiX() ); + draw( painter, cExtent, size, paintDevice->logicalDpiX() ); //restore rotation painter->restore(); diff --git a/src/core/composer/qgscomposermapgrid.cpp b/src/core/composer/qgscomposermapgrid.cpp index d808342abd4..0fb7d1bd347 100644 --- a/src/core/composer/qgscomposermapgrid.cpp +++ b/src/core/composer/qgscomposermapgrid.cpp @@ -612,8 +612,8 @@ void QgsComposerMapGrid::draw( QPainter* p ) { return; } - QPaintDevice* thePaintDevice = p->device(); - if ( !thePaintDevice ) + QPaintDevice* paintDevice = p->device(); + if ( !paintDevice ) { return; } @@ -632,7 +632,7 @@ void QgsComposerMapGrid::draw( QPainter* p ) } //setup painter scaling to dots so that raster symbology is drawn to scale - double dotsPerMM = thePaintDevice->logicalDpiX() / 25.4; + double dotsPerMM = paintDevice->logicalDpiX() / 25.4; p->scale( 1 / dotsPerMM, 1 / dotsPerMM ); //scale painter from mm to dots //setup render context diff --git a/src/core/composer/qgscomposition.cpp b/src/core/composer/qgscomposition.cpp index 71a815856ee..62aef844976 100644 --- a/src/core/composer/qgscomposition.cpp +++ b/src/core/composer/qgscomposition.cpp @@ -685,7 +685,7 @@ const QgsComposerMap* QgsComposition::getComposerMapById( const int id ) const return nullptr; } -const QgsComposerItem* QgsComposition::getComposerItemById( const QString& theId ) const +const QgsComposerItem* QgsComposition::getComposerItemById( const QString& id ) const { QList itemList = items(); QList::iterator itemIt = itemList.begin(); @@ -694,7 +694,7 @@ const QgsComposerItem* QgsComposition::getComposerItemById( const QString& theId const QgsComposerItem* mypItem = dynamic_cast( *itemIt ); if ( mypItem ) { - if ( mypItem->id() == theId ) + if ( mypItem->id() == id ) { return mypItem; } @@ -704,7 +704,7 @@ const QgsComposerItem* QgsComposition::getComposerItemById( const QString& theId } #if 0 -const QgsComposerItem* QgsComposition::getComposerItemByUuid( QString theUuid, bool inAllComposers ) const +const QgsComposerItem* QgsComposition::getComposerItemByUuid( QString uuid, bool inAllComposers ) const { //This does not work since it seems impossible to get the QgisApp::instance() from here... Is there a workaround ? QSet composers = QSet(); @@ -728,7 +728,7 @@ const QgsComposerItem* QgsComposition::getComposerItemByUuid( QString theUuid, b const QgsComposerItem* mypItem = dynamic_cast( *itemIt ); if ( mypItem ) { - if ( mypItem->uuid() == theUuid ) + if ( mypItem->uuid() == uuid ) { return mypItem; } @@ -740,7 +740,7 @@ const QgsComposerItem* QgsComposition::getComposerItemByUuid( QString theUuid, b } #endif -const QgsComposerItem* QgsComposition::getComposerItemByUuid( const QString& theUuid ) const +const QgsComposerItem* QgsComposition::getComposerItemByUuid( const QString& uuid ) const { QList itemList = items(); QList::iterator itemIt = itemList.begin(); @@ -749,7 +749,7 @@ const QgsComposerItem* QgsComposition::getComposerItemByUuid( const QString& the const QgsComposerItem* mypItem = dynamic_cast( *itemIt ); if ( mypItem ) { - if ( mypItem->uuid() == theUuid ) + if ( mypItem->uuid() == uuid ) { return mypItem; } diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index add83a4ed73..3affcc0ba09 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -393,15 +393,15 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo /** Returns a composer item given its text identifier. * Ids are not necessarely unique, but this function returns only one element. - * @param theId - A QString representing the identifier of the item to retrieve. + * @param id - A QString representing the identifier of the item to retrieve. * @return QgsComposerItem pointer or 0 pointer if no such item exists. */ - const QgsComposerItem* getComposerItemById( const QString& theId ) const; + const QgsComposerItem* getComposerItemById( const QString& id ) const; /** Returns a composer item given its unique identifier. - * @param theUuid A QString representing the UUID of the item to + * @param uuid A QString representing the UUID of the item to */ - const QgsComposerItem* getComposerItemByUuid( const QString& theUuid ) const; + const QgsComposerItem* getComposerItemByUuid( const QString& uuid ) const; int printResolution() const {return mPrintResolution;} void setPrintResolution( const int dpi ); diff --git a/src/core/geometry/qgsgeos.h b/src/core/geometry/qgsgeos.h index f4350e7697a..5a98cb3b335 100644 --- a/src/core/geometry/qgsgeos.h +++ b/src/core/geometry/qgsgeos.h @@ -251,15 +251,15 @@ class CORE_EXPORT QgsGeos: public QgsGeometryEngine class GEOSException // clazy:exclude=rule-of-three { public: - explicit GEOSException( const QString& theMsg ) + explicit GEOSException( const QString& message ) { - if ( theMsg == QLatin1String( "Unknown exception thrown" ) && lastMsg().isNull() ) + if ( message == QLatin1String( "Unknown exception thrown" ) && lastMsg().isNull() ) { - msg = theMsg; + msg = message; } else { - msg = theMsg; + msg = message; lastMsg() = msg; } } diff --git a/src/core/layertree/qgslayertreemodellegendnode.cpp b/src/core/layertree/qgslayertreemodellegendnode.cpp index 0ae9d425f3e..c7a5997fdb1 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.cpp +++ b/src/core/layertree/qgslayertreemodellegendnode.cpp @@ -650,9 +650,9 @@ QImage QgsWmsLegendNode::renderMessage( const QString& msg ) const const int nlines = 1; const int w = 512, h = fontHeight * nlines + margin * ( nlines + 1 ); - QImage theImage( w, h, QImage::Format_ARGB32_Premultiplied ); + QImage image( w, h, QImage::Format_ARGB32_Premultiplied ); QPainter painter; - painter.begin( &theImage ); + painter.begin( &image ); painter.setPen( QColor( 255, 0, 0 ) ); painter.setFont( QFont( QStringLiteral( "Chicago" ), fontHeight ) ); painter.fillRect( 0, 0, w, h, QColor( 255, 255, 255 ) ); @@ -660,7 +660,7 @@ QImage QgsWmsLegendNode::renderMessage( const QString& msg ) const //painter.drawText(0,2*(margin+fontHeight),QString("retrying in 5 seconds...")); painter.end(); - return theImage; + return image; } void QgsWmsLegendNode::getLegendGraphicProgress( qint64 cur, qint64 tot ) @@ -687,16 +687,16 @@ void QgsWmsLegendNode::getLegendGraphicErrored( const QString& msg ) //QTimer::singleShot(5000, this, SLOT(invalidateMapBasedData())); } -void QgsWmsLegendNode::getLegendGraphicFinished( const QImage& theImage ) +void QgsWmsLegendNode::getLegendGraphicFinished( const QImage& image ) { if ( ! mFetcher ) return; // must be coming after error //QgsDebugMsg( QString("XXX legend graphic finished, image is %1x%2").arg(theImage.width()).arg(theImage.height()) ); - if ( ! theImage.isNull() ) + if ( ! image.isNull() ) { - if ( theImage != mImage ) + if ( image != mImage ) { - mImage = theImage; + mImage = image; //QgsDebugMsg( QString("XXX emitting dataChanged") ); emit dataChanged(); } diff --git a/src/core/qgsapplication.cpp b/src/core/qgsapplication.cpp index 66a00d11e94..08562951f56 100644 --- a/src/core/qgsapplication.cpp +++ b/src/core/qgsapplication.cpp @@ -350,9 +350,9 @@ void QgsApplication::setFileOpenEventReceiver( QObject * receiver ) } } -void QgsApplication::setPrefixPath( const QString &thePrefixPath, bool useDefaultPaths ) +void QgsApplication::setPrefixPath( const QString &prefixPath, bool useDefaultPaths ) { - ABISYM( mPrefixPath ) = thePrefixPath; + ABISYM( mPrefixPath ) = prefixPath; #if defined(_MSC_VER) if ( ABISYM( mPrefixPath ).endsWith( "/bin" ) ) { @@ -368,15 +368,15 @@ void QgsApplication::setPrefixPath( const QString &thePrefixPath, bool useDefaul ABISYM( mLibexecPath ) = ABISYM( mPrefixPath ) + '/' + QGIS_LIBEXEC_SUBDIR + '/'; } -void QgsApplication::setPluginPath( const QString &thePluginPath ) +void QgsApplication::setPluginPath( const QString &pluginPath ) { - ABISYM( mPluginPath ) = thePluginPath; + ABISYM( mPluginPath ) = pluginPath; } -void QgsApplication::setPkgDataPath( const QString &thePkgDataPath ) +void QgsApplication::setPkgDataPath( const QString &pkgDataPath ) { - ABISYM( mPkgDataPath ) = thePkgDataPath; - QString mySvgPath = thePkgDataPath + ( ABISYM( mRunningFromBuildDir ) ? "/images/svg/" : "/svg/" ); + ABISYM( mPkgDataPath ) = pkgDataPath; + QString mySvgPath = pkgDataPath + ( ABISYM( mRunningFromBuildDir ) ? "/images/svg/" : "/svg/" ); // avoid duplicate entries if ( !ABISYM( mDefaultSvgPaths ).contains( mySvgPath ) ) ABISYM( mDefaultSvgPaths ) << mySvgPath; @@ -387,9 +387,9 @@ void QgsApplication::setDefaultSvgPaths( const QStringList& pathList ) ABISYM( mDefaultSvgPaths ) = pathList; } -void QgsApplication::setAuthDatabaseDirPath( const QString& theAuthDbDirPath ) +void QgsApplication::setAuthDatabaseDirPath( const QString& authDbDirPath ) { - QFileInfo fi( theAuthDbDirPath ); + QFileInfo fi( authDbDirPath ); if ( fi.exists() && fi.isDir() && fi.isWritable() ) { ABISYM( mAuthDbDirPath ) = fi.canonicalFilePath() + QDir::separator(); @@ -441,16 +441,16 @@ QString QgsApplication::iconPath( const QString& iconFile ) return defaultThemePath() + iconFile; } -QIcon QgsApplication::getThemeIcon( const QString &theName ) +QIcon QgsApplication::getThemeIcon( const QString &name ) { QgsApplication* app = instance(); - if ( app && app->mIconCache.contains( theName ) ) - return app->mIconCache.value( theName ); + if ( app && app->mIconCache.contains( name ) ) + return app->mIconCache.value( name ); QIcon icon; - QString myPreferredPath = activeThemePath() + QDir::separator() + theName; - QString myDefaultPath = defaultThemePath() + QDir::separator() + theName; + QString myPreferredPath = activeThemePath() + QDir::separator() + name; + QString myDefaultPath = defaultThemePath() + QDir::separator() + name; if ( QFile::exists( myPreferredPath ) ) { icon = QIcon( myPreferredPath ); @@ -467,15 +467,15 @@ QIcon QgsApplication::getThemeIcon( const QString &theName ) } if ( app ) - app->mIconCache.insert( theName, icon ); + app->mIconCache.insert( name, icon ); return icon; } // TODO: add some caching mechanism ? -QPixmap QgsApplication::getThemePixmap( const QString &theName ) +QPixmap QgsApplication::getThemePixmap( const QString &name ) { - QString myPreferredPath = activeThemePath() + QDir::separator() + theName; - QString myDefaultPath = defaultThemePath() + QDir::separator() + theName; + QString myPreferredPath = activeThemePath() + QDir::separator() + name; + QString myDefaultPath = defaultThemePath() + QDir::separator() + name; if ( QFile::exists( myPreferredPath ) ) { return QPixmap( myPreferredPath ); @@ -491,9 +491,9 @@ QPixmap QgsApplication::getThemePixmap( const QString &theName ) /*! Set the theme path to the specified theme. */ -void QgsApplication::setThemeName( const QString &theThemeName ) +void QgsApplication::setThemeName( const QString &themeName ) { - ABISYM( mThemeName ) = theThemeName; + ABISYM( mThemeName ) = themeName; } /*! * Get the active theme name @@ -1207,23 +1207,23 @@ QString QgsApplication::relativePathToAbsolutePath( const QString& rpath, const return targetElems.join( QStringLiteral( "/" ) ); } -void QgsApplication::skipGdalDriver( const QString& theDriver ) +void QgsApplication::skipGdalDriver( const QString& driver ) { - if ( ABISYM( mGdalSkipList ).contains( theDriver ) || theDriver.isEmpty() ) + if ( ABISYM( mGdalSkipList ).contains( driver ) || driver.isEmpty() ) { return; } - ABISYM( mGdalSkipList ) << theDriver; + ABISYM( mGdalSkipList ) << driver; applyGdalSkippedDrivers(); } -void QgsApplication::restoreGdalDriver( const QString& theDriver ) +void QgsApplication::restoreGdalDriver( const QString& driver ) { - if ( !ABISYM( mGdalSkipList ).contains( theDriver ) ) + if ( !ABISYM( mGdalSkipList ).contains( driver ) ) { return; } - int myPos = ABISYM( mGdalSkipList ).indexOf( theDriver ); + int myPos = ABISYM( mGdalSkipList ).indexOf( driver ); if ( myPos >= 0 ) { ABISYM( mGdalSkipList ).removeAt( myPos ); diff --git a/src/core/qgsapplication.h b/src/core/qgsapplication.h index b23f04e4042..2aff99a6be7 100644 --- a/src/core/qgsapplication.h +++ b/src/core/qgsapplication.h @@ -94,7 +94,7 @@ class CORE_EXPORT QgsApplication : public QApplication * based on the supplied theme name exists. If it does not the theme name will * be reverted to 'default'. */ - static void setThemeName( const QString &theThemeName ); + static void setThemeName( const QString &themeName ); /** Set the active theme to the specified theme. * The theme name should be a single word e.g. 'default','classic'. @@ -208,11 +208,11 @@ class CORE_EXPORT QgsApplication : public QApplication //! Helper to get a theme icon. It will fall back to the //! default theme if the active theme does not have the required icon. - static QIcon getThemeIcon( const QString &theName ); + static QIcon getThemeIcon( const QString &name ); //! Helper to get a theme icon as a pixmap. It will fall back to the //! default theme if the active theme does not have the required icon. - static QPixmap getThemePixmap( const QString &theName ); + static QPixmap getThemePixmap( const QString &name ); //! Returns the path to user's style. static QString userStylePath(); @@ -265,19 +265,19 @@ class CORE_EXPORT QgsApplication : public QApplication static QString libexecPath(); //! Alters prefix path - used by 3rd party apps - static void setPrefixPath( const QString &thePrefixPath, bool useDefaultPaths = false ); + static void setPrefixPath( const QString &prefixPath, bool useDefaultPaths = false ); //! Alters plugin path - used by 3rd party apps - static void setPluginPath( const QString &thePluginPath ); + static void setPluginPath( const QString &pluginPath ); //! Alters pkg data path - used by 3rd party apps - static void setPkgDataPath( const QString &thePkgDataPath ); + static void setPkgDataPath( const QString &pkgDataPath ); //! Alters default svg paths - used by 3rd party apps. static void setDefaultSvgPaths( const QStringList& pathList ); //! Alters authentication data base directory path - used by 3rd party apps - static void setAuthDatabaseDirPath( const QString& theAuthDbDirPath ); + static void setAuthDatabaseDirPath( const QString& authDbDirPath ); //! loads providers static void initQgis(); @@ -359,13 +359,13 @@ class CORE_EXPORT QgsApplication : public QApplication * and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The * driver name should be the short format of the Gdal driver name e.g. GTIFF. */ - static void skipGdalDriver( const QString& theDriver ); + static void skipGdalDriver( const QString& driver ); /** Sets the GDAL_SKIP environment variable to exclude the specified driver * and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The * driver name should be the short format of the Gdal driver name e.g. GTIFF. */ - static void restoreGdalDriver( const QString& theDriver ); + static void restoreGdalDriver( const QString& driver ); /** Returns the list of gdal drivers that should be skipped (based on * GDAL_SKIP environment variable) diff --git a/src/core/qgsbrowsermodel.cpp b/src/core/qgsbrowsermodel.cpp index 8b7f1c6b966..9c9e55386bf 100644 --- a/src/core/qgsbrowsermodel.cpp +++ b/src/core/qgsbrowsermodel.cpp @@ -286,16 +286,16 @@ QModelIndex QgsBrowserModel::findPath( QAbstractItemModel *model, const QString& if ( !model ) return QModelIndex(); - QModelIndex theIndex; // starting from root + QModelIndex index; // starting from root bool foundChild = true; while ( foundChild ) { foundChild = false; // assume that the next child item will not be found - for ( int i = 0; i < model->rowCount( theIndex ); i++ ) + for ( int i = 0; i < model->rowCount( index ); i++ ) { - QModelIndex idx = model->index( i, 0, theIndex ); + QModelIndex idx = model->index( i, 0, index ); QString itemPath = model->data( idx, PathRole ).toString(); if ( itemPath == path ) @@ -308,14 +308,14 @@ QModelIndex QgsBrowserModel::findPath( QAbstractItemModel *model, const QString& if ( path.startsWith( itemPath + '/' ) ) { foundChild = true; - theIndex = idx; + index = idx; break; } } } if ( matchFlag == Qt::MatchStartsWith ) - return theIndex; + return index; QgsDebugMsg( "path not found" ); return QModelIndex(); // not found @@ -515,9 +515,9 @@ void QgsBrowserModel::refresh( const QString& path ) } /* Refresh item */ -void QgsBrowserModel::refresh( const QModelIndex& theIndex ) +void QgsBrowserModel::refresh( const QModelIndex& index ) { - QgsDataItem *item = dataItem( theIndex ); + QgsDataItem *item = dataItem( index ); if ( !item || item->state() == QgsDataItem::Populating ) return; diff --git a/src/core/qgscoordinatereferencesystem.cpp b/src/core/qgscoordinatereferencesystem.cpp index cafb619b63d..710a5c34aca 100644 --- a/src/core/qgscoordinatereferencesystem.cpp +++ b/src/core/qgscoordinatereferencesystem.cpp @@ -67,16 +67,16 @@ QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem() d = new QgsCoordinateReferenceSystemPrivate(); } -QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const QString& theDefinition ) +QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const QString& definition ) { d = new QgsCoordinateReferenceSystemPrivate(); - createFromString( theDefinition ); + createFromString( definition ); } -QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const long theId, CrsType theType ) +QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const long id, CrsType type ) { d = new QgsCoordinateReferenceSystemPrivate(); - createFromId( theId, theType ); + createFromId( id, type ); } QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem &srs ) //NOLINT @@ -187,19 +187,19 @@ QgsCoordinateReferenceSystem::~QgsCoordinateReferenceSystem() //NOLINT { } -bool QgsCoordinateReferenceSystem::createFromId( const long theId, CrsType theType ) +bool QgsCoordinateReferenceSystem::createFromId( const long id, CrsType type ) { bool result = false; - switch ( theType ) + switch ( type ) { case InternalCrsId: - result = createFromSrsId( theId ); + result = createFromSrsId( id ); break; case PostgisCrsId: - result = createFromSrid( theId ); + result = createFromSrid( id ); break; case EpsgCrsId: - result = createFromOgcWmsCrs( QStringLiteral( "EPSG:%1" ).arg( theId ) ); + result = createFromOgcWmsCrs( QStringLiteral( "EPSG:%1" ).arg( id ) ); break; default: //THIS IS BAD...THIS PART OF CODE SHOULD NEVER BE REACHED... @@ -208,10 +208,10 @@ bool QgsCoordinateReferenceSystem::createFromId( const long theId, CrsType theTy return result; } -bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinition ) +bool QgsCoordinateReferenceSystem::createFromString( const QString &definition ) { sCrsStringLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sStringCache.constFind( theDefinition ); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sStringCache.constFind( definition ); if ( crsIt != sStringCache.constEnd() ) { // found a match in the cache @@ -223,7 +223,7 @@ bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinitio bool result = false; QRegExp reCrsId( "^(epsg|postgis|internal)\\:(\\d+)$", Qt::CaseInsensitive ); - if ( reCrsId.indexIn( theDefinition ) == 0 ) + if ( reCrsId.indexIn( definition ) == 0 ) { QString authName = reCrsId.cap( 1 ).toLower(); CrsType type = InternalCrsId; @@ -237,7 +237,7 @@ bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinitio else { QRegExp reCrsStr( "^(?:(wkt|proj4)\\:)?(.+)$", Qt::CaseInsensitive ); - if ( reCrsStr.indexIn( theDefinition ) == 0 ) + if ( reCrsStr.indexIn( definition ) == 0 ) { if ( reCrsStr.cap( 1 ).toLower() == QLatin1String( "proj4" ) ) { @@ -262,34 +262,34 @@ bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinitio } sCrsStringLock.lockForWrite(); - sStringCache.insert( theDefinition, *this ); + sStringCache.insert( definition, *this ); sCrsStringLock.unlock(); return result; } -bool QgsCoordinateReferenceSystem::createFromUserInput( const QString &theDefinition ) +bool QgsCoordinateReferenceSystem::createFromUserInput( const QString &definition ) { - QString theWkt; + QString userWkt; char *wkt = nullptr; OGRSpatialReferenceH crs = OSRNewSpatialReference( nullptr ); // make sure towgs84 parameter is loaded if using an ESRI definition and gdal >= 1.9 - if ( theDefinition.startsWith( QLatin1String( "ESRI::" ) ) ) + if ( definition.startsWith( QLatin1String( "ESRI::" ) ) ) { setupESRIWktFix(); } - if ( OSRSetFromUserInput( crs, theDefinition.toLocal8Bit().constData() ) == OGRERR_NONE ) + if ( OSRSetFromUserInput( crs, definition.toLocal8Bit().constData() ) == OGRERR_NONE ) { if ( OSRExportToWkt( crs, &wkt ) == OGRERR_NONE ) { - theWkt = wkt; + userWkt = wkt; CPLFree( wkt ); } OSRDestroySpatialReference( crs ); } - //QgsDebugMsg( "theDefinition: " + theDefinition + " theWkt = " + theWkt ); - return createFromWkt( theWkt ); + //QgsDebugMsg( "definition: " + definition + " wkt = " + wkt ); + return createFromWkt( userWkt ); } void QgsCoordinateReferenceSystem::setupESRIWktFix() @@ -313,10 +313,10 @@ void QgsCoordinateReferenceSystem::setupESRIWktFix() } } -bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) +bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& crs ) { sOgcLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sOgcCache.constFind( theCrs ); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sOgcCache.constFind( crs ); if ( crsIt != sOgcCache.constEnd() ) { // found a match in the cache @@ -326,7 +326,7 @@ bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) } sOgcLock.unlock(); - QString wmsCrs = theCrs; + QString wmsCrs = crs; QRegExp re( "urn:ogc:def:crs:([^:]+).+([^:]+)", Qt::CaseInsensitive ); if ( re.exactMatch( wmsCrs ) ) @@ -339,7 +339,7 @@ bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) if ( re.exactMatch( wmsCrs ) && createFromSrsId( re.cap( 2 ).toInt() ) ) { sOgcLock.lockForWrite(); - sOgcCache.insert( theCrs, *this ); + sOgcCache.insert( crs, *this ); sOgcLock.unlock(); return true; } @@ -348,7 +348,7 @@ bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) if ( loadFromDatabase( QgsApplication::srsDatabaseFilePath(), QStringLiteral( "lower(auth_name||':'||auth_id)" ), wmsCrs.toLower() ) ) { sOgcLock.lockForWrite(); - sOgcCache.insert( theCrs, *this ); + sOgcCache.insert( crs, *this ); sOgcLock.unlock(); return true; } @@ -380,14 +380,14 @@ bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) d->mAxisInvertedDirty = false; sOgcLock.lockForWrite(); - sOgcCache.insert( theCrs, *this ); + sOgcCache.insert( crs, *this ); sOgcLock.unlock(); return d->mIsValid; } sOgcLock.lockForWrite(); - sOgcCache.insert( theCrs, QgsCoordinateReferenceSystem() ); + sOgcCache.insert( crs, QgsCoordinateReferenceSystem() ); sOgcLock.unlock(); return false; } @@ -571,12 +571,12 @@ bool QgsCoordinateReferenceSystem::hasAxisInverted() const return d->mAxisInverted; } -bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) +bool QgsCoordinateReferenceSystem::createFromWkt( const QString &wkt ) { d.detach(); sCRSWktLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sWktCache.constFind( theWkt ); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sWktCache.constFind( wkt ); if ( crsIt != sWktCache.constEnd() ) { // found a match in the cache @@ -590,13 +590,13 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) d->mWkt.clear(); d->mProj4.clear(); - if ( theWkt.isEmpty() ) + if ( wkt.isEmpty() ) { QgsDebugMsg( "theWkt is uninitialized, operation failed" ); return d->mIsValid; } - QgsDebugMsg( "wkt: " + theWkt ); - QByteArray ba = theWkt.toLatin1(); + QgsDebugMsg( "wkt: " + wkt ); + QByteArray ba = wkt.toLatin1(); const char *pWkt = ba.data(); OGRErr myInputResult = OSRImportFromWkt( d->mCRS, const_cast< char ** >( & pWkt ) ); @@ -605,12 +605,12 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) { QgsDebugMsg( "\n---------------------------------------------------------------" ); QgsDebugMsg( "This CRS could *** NOT *** be set from the supplied Wkt " ); - QgsDebugMsg( "INPUT: " + theWkt ); + QgsDebugMsg( "INPUT: " + wkt ); QgsDebugMsg( QString( "UNUSED WKT: %1" ).arg( pWkt ) ); QgsDebugMsg( "---------------------------------------------------------------\n" ); sCRSWktLock.lockForWrite(); - sWktCache.insert( theWkt, *this ); + sWktCache.insert( wkt, *this ); sCRSWktLock.unlock(); return d->mIsValid; } @@ -623,7 +623,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) QgsDebugMsg( "authid recognized as " + authid ); bool result = createFromOgcWmsCrs( authid ); sCRSWktLock.lockForWrite(); - sWktCache.insert( theWkt, *this ); + sWktCache.insert( wkt, *this ); sCRSWktLock.unlock(); return result; } @@ -665,7 +665,7 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) CPLFree( proj4src ); sCRSWktLock.lockForWrite(); - sWktCache.insert( theWkt, *this ); + sWktCache.insert( wkt, *this ); sCRSWktLock.unlock(); return d->mIsValid; @@ -677,12 +677,12 @@ bool QgsCoordinateReferenceSystem::isValid() const return d->mIsValid; } -bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4String ) +bool QgsCoordinateReferenceSystem::createFromProj4( const QString &proj4String ) { d.detach(); sProj4CacheLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sProj4Cache.constFind( theProj4String ); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sProj4Cache.constFind( proj4String ); if ( crsIt != sProj4Cache.constEnd() ) { // found a match in the cache @@ -700,7 +700,7 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin // +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666664 +k_0=0.99987742 // +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515.000000472 +units=m +no_defs // - QString myProj4String = theProj4String.trimmed(); + QString myProj4String = proj4String.trimmed(); QgsDebugMsg( "proj4: " + myProj4String ); d->mIsValid = false; d->mWkt.clear(); @@ -712,7 +712,7 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin QgsDebugMsg( "proj string supplied has no +proj argument" ); sProj4CacheLock.lockForWrite(); - sProj4Cache.insert( theProj4String, *this ); + sProj4Cache.insert( proj4String, *this ); sProj4CacheLock.unlock(); return d->mIsValid; @@ -773,15 +773,15 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin if ( lat1Str != QLatin1String( "" ) && lat2Str != QLatin1String( "" ) ) { // Make our new string to check... - QString theProj4StringModified = myProj4String; + QString proj4StringModified = myProj4String; // First just swap in the lat_2 value for lat_1 value - theProj4StringModified.replace( myStart1 + LAT_PREFIX_LEN, myLength1 - LAT_PREFIX_LEN, lat2Str ); + proj4StringModified.replace( myStart1 + LAT_PREFIX_LEN, myLength1 - LAT_PREFIX_LEN, lat2Str ); // Now we have to find the lat_2 location again since it has potentially moved... myStart2 = 0; - myStart2 = myLat2RegExp.indexIn( theProj4String, myStart2 ); - theProj4StringModified.replace( myStart2 + LAT_PREFIX_LEN, myLength2 - LAT_PREFIX_LEN, lat1Str ); + myStart2 = myLat2RegExp.indexIn( proj4String, myStart2 ); + proj4StringModified.replace( myStart2 + LAT_PREFIX_LEN, myLength2 - LAT_PREFIX_LEN, lat1Str ); QgsDebugMsg( "trying proj4string match with swapped lat_1,lat_2" ); - myRecord = getRecord( "select * from tbl_srs where parameters=" + quotedValue( theProj4StringModified.trimmed() ) + " order by deprecated" ); + myRecord = getRecord( "select * from tbl_srs where parameters=" + quotedValue( proj4StringModified.trimmed() ) + " order by deprecated" ); } } @@ -881,14 +881,14 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin } sProj4CacheLock.lockForWrite(); - sProj4Cache.insert( theProj4String, *this ); + sProj4Cache.insert( proj4String, *this ); sProj4CacheLock.unlock(); return d->mIsValid; } //private method meant for internal use by this class only -QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( const QString& theSql ) +QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( const QString& sql ) { QString myDatabaseFileName; QgsCoordinateReferenceSystem::RecordMap myMap; @@ -899,7 +899,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( sqlite3_stmt *myPreparedStatement = nullptr; int myResult; - QgsDebugMsg( "running query: " + theSql ); + QgsDebugMsg( "running query: " + sql ); // Get the full path name to the sqlite3 spatial reference database. myDatabaseFileName = QgsApplication::srsDatabaseFilePath(); QFileInfo myInfo( myDatabaseFileName ); @@ -916,7 +916,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( return myMap; } - myResult = sqlite3_prepare( myDatabase, theSql.toUtf8(), theSql.toUtf8().length(), &myPreparedStatement, &myTail ); + myResult = sqlite3_prepare( myDatabase, sql.toUtf8(), sql.toUtf8().length(), &myPreparedStatement, &myTail ); // XXX Need to free memory from the error msg if one is set if ( myResult == SQLITE_OK && sqlite3_step( myPreparedStatement ) == SQLITE_ROW ) { @@ -937,7 +937,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( } else { - QgsDebugMsg( "failed : " + theSql ); + QgsDebugMsg( "failed : " + sql ); } if ( myMap.empty() ) @@ -962,7 +962,7 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( return myMap; } - myResult = sqlite3_prepare( myDatabase, theSql.toUtf8(), theSql.toUtf8().length(), &myPreparedStatement, &myTail ); + myResult = sqlite3_prepare( myDatabase, sql.toUtf8(), sql.toUtf8().length(), &myPreparedStatement, &myTail ); // XXX Need to free memory from the error msg if one is set if ( myResult == SQLITE_OK && sqlite3_step( myPreparedStatement ) == SQLITE_ROW ) { @@ -983,14 +983,14 @@ QgsCoordinateReferenceSystem::RecordMap QgsCoordinateReferenceSystem::getRecord( } else { - QgsDebugMsg( "failed : " + theSql ); + QgsDebugMsg( "failed : " + sql ); } } sqlite3_finalize( myPreparedStatement ); sqlite3_close( myDatabase ); #ifdef QGISDEBUG - QgsDebugMsg( "retrieved: " + theSql ); + QgsDebugMsg( "retrieved: " + sql ); RecordMap::Iterator it; for ( it = myMap.begin(); it != myMap.end(); ++it ) { @@ -1084,49 +1084,49 @@ QgsUnitTypes::DistanceUnit QgsCoordinateReferenceSystem::mapUnits() const // Mutators ----------------------------------- -void QgsCoordinateReferenceSystem::setInternalId( long theSrsId ) +void QgsCoordinateReferenceSystem::setInternalId( long srsId ) { d.detach(); - d->mSrsId = theSrsId; + d->mSrsId = srsId; } void QgsCoordinateReferenceSystem::setAuthId( const QString& authId ) { d.detach(); d->mAuthId = authId; } -void QgsCoordinateReferenceSystem::setSrid( long theSrid ) +void QgsCoordinateReferenceSystem::setSrid( long srid ) { d.detach(); - d->mSRID = theSrid; + d->mSRID = srid; } -void QgsCoordinateReferenceSystem::setDescription( const QString& theDescription ) +void QgsCoordinateReferenceSystem::setDescription( const QString& description ) { d.detach(); - d->mDescription = theDescription; + d->mDescription = description; } -void QgsCoordinateReferenceSystem::setProj4String( const QString& theProj4String ) +void QgsCoordinateReferenceSystem::setProj4String( const QString& proj4String ) { d.detach(); - d->mProj4 = theProj4String; + d->mProj4 = proj4String; QgsLocaleNumC l; OSRDestroySpatialReference( d->mCRS ); d->mCRS = OSRNewSpatialReference( nullptr ); - d->mIsValid = OSRImportFromProj4( d->mCRS, theProj4String.trimmed().toLatin1().constData() ) == OGRERR_NONE; + d->mIsValid = OSRImportFromProj4( d->mCRS, proj4String.trimmed().toLatin1().constData() ) == OGRERR_NONE; // OSRImportFromProj4() may accept strings that are not valid proj.4 strings, // e.g if they lack a +ellps parameter, it will automatically add +ellps=WGS84, but as // we use the original mProj4 with QgsCoordinateTransform, it will fail to initialize // so better detect it now. - projPJ theProj = pj_init_plus( theProj4String.trimmed().toLatin1().constData() ); - if ( !theProj ) + projPJ proj = pj_init_plus( proj4String.trimmed().toLatin1().constData() ); + if ( !proj ) { QgsDebugMsg( "proj.4 string rejected by pj_init_plus()" ); d->mIsValid = false; } else { - pj_free( theProj ); + pj_free( proj ); } d->mWkt.clear(); setMapUnits(); @@ -1135,25 +1135,25 @@ void QgsCoordinateReferenceSystem::setProj4String( const QString& theProj4String debugPrint(); #endif } -void QgsCoordinateReferenceSystem::setGeographicFlag( bool theGeoFlag ) +void QgsCoordinateReferenceSystem::setGeographicFlag( bool geoFlag ) { d.detach(); - d->mIsGeographic = theGeoFlag; + d->mIsGeographic = geoFlag; } -void QgsCoordinateReferenceSystem::setEpsg( long theEpsg ) +void QgsCoordinateReferenceSystem::setEpsg( long epsg ) { d.detach(); - d->mAuthId = QStringLiteral( "EPSG:%1" ).arg( theEpsg ); + d->mAuthId = QStringLiteral( "EPSG:%1" ).arg( epsg ); } -void QgsCoordinateReferenceSystem::setProjectionAcronym( const QString& theProjectionAcronym ) +void QgsCoordinateReferenceSystem::setProjectionAcronym( const QString& projectionAcronym ) { d.detach(); - d->mProjectionAcronym = theProjectionAcronym; + d->mProjectionAcronym = projectionAcronym; } -void QgsCoordinateReferenceSystem::setEllipsoidAcronym( const QString& theEllipsoidAcronym ) +void QgsCoordinateReferenceSystem::setEllipsoidAcronym( const QString& ellipsoidAcronym ) { d.detach(); - d->mEllipsoidAcronym = theEllipsoidAcronym; + d->mEllipsoidAcronym = ellipsoidAcronym; } void QgsCoordinateReferenceSystem::setMapUnits() @@ -1317,15 +1317,15 @@ long QgsCoordinateReferenceSystem::findMatchingProj() return 0; } -bool QgsCoordinateReferenceSystem::operator==( const QgsCoordinateReferenceSystem &theSrs ) const +bool QgsCoordinateReferenceSystem::operator==( const QgsCoordinateReferenceSystem &srs ) const { - return ( !d->mIsValid && !theSrs.d->mIsValid ) || - ( d->mIsValid && theSrs.d->mIsValid && theSrs.authid() == authid() ); + return ( !d->mIsValid && !srs.d->mIsValid ) || + ( d->mIsValid && srs.d->mIsValid && srs.authid() == authid() ); } -bool QgsCoordinateReferenceSystem::operator!=( const QgsCoordinateReferenceSystem &theSrs ) const +bool QgsCoordinateReferenceSystem::operator!=( const QgsCoordinateReferenceSystem &srs ) const { - return !( *this == theSrs ); + return !( *this == srs ); } QString QgsCoordinateReferenceSystem::toWkt() const @@ -1342,12 +1342,12 @@ QString QgsCoordinateReferenceSystem::toWkt() const return d->mWkt; } -bool QgsCoordinateReferenceSystem::readXml( const QDomNode & theNode ) +bool QgsCoordinateReferenceSystem::readXml( const QDomNode & node ) { d.detach(); QgsDebugMsg( "Reading Spatial Ref Sys from xml ------------------------!" ); bool result = true; - QDomNode srsNode = theNode.namedItem( QStringLiteral( "spatialrefsys" ) ); + QDomNode srsNode = node.namedItem( QStringLiteral( "spatialrefsys" ) ); if ( ! srsNode.isNull() ) { @@ -1464,48 +1464,48 @@ bool QgsCoordinateReferenceSystem::readXml( const QDomNode & theNode ) return result; } -bool QgsCoordinateReferenceSystem::writeXml( QDomNode & theNode, QDomDocument & theDoc ) const +bool QgsCoordinateReferenceSystem::writeXml( QDomNode & node, QDomDocument & doc ) const { - QDomElement myLayerNode = theNode.toElement(); - QDomElement mySrsElement = theDoc.createElement( QStringLiteral( "spatialrefsys" ) ); + QDomElement myLayerNode = node.toElement(); + QDomElement mySrsElement = doc.createElement( QStringLiteral( "spatialrefsys" ) ); - QDomElement myProj4Element = theDoc.createElement( QStringLiteral( "proj4" ) ); - myProj4Element.appendChild( theDoc.createTextNode( toProj4() ) ); + QDomElement myProj4Element = doc.createElement( QStringLiteral( "proj4" ) ); + myProj4Element.appendChild( doc.createTextNode( toProj4() ) ); mySrsElement.appendChild( myProj4Element ); - QDomElement mySrsIdElement = theDoc.createElement( QStringLiteral( "srsid" ) ); - mySrsIdElement.appendChild( theDoc.createTextNode( QString::number( srsid() ) ) ); + QDomElement mySrsIdElement = doc.createElement( QStringLiteral( "srsid" ) ); + mySrsIdElement.appendChild( doc.createTextNode( QString::number( srsid() ) ) ); mySrsElement.appendChild( mySrsIdElement ); - QDomElement mySridElement = theDoc.createElement( QStringLiteral( "srid" ) ); - mySridElement.appendChild( theDoc.createTextNode( QString::number( postgisSrid() ) ) ); + QDomElement mySridElement = doc.createElement( QStringLiteral( "srid" ) ); + mySridElement.appendChild( doc.createTextNode( QString::number( postgisSrid() ) ) ); mySrsElement.appendChild( mySridElement ); - QDomElement myEpsgElement = theDoc.createElement( QStringLiteral( "authid" ) ); - myEpsgElement.appendChild( theDoc.createTextNode( authid() ) ); + QDomElement myEpsgElement = doc.createElement( QStringLiteral( "authid" ) ); + myEpsgElement.appendChild( doc.createTextNode( authid() ) ); mySrsElement.appendChild( myEpsgElement ); - QDomElement myDescriptionElement = theDoc.createElement( QStringLiteral( "description" ) ); - myDescriptionElement.appendChild( theDoc.createTextNode( description() ) ); + QDomElement myDescriptionElement = doc.createElement( QStringLiteral( "description" ) ); + myDescriptionElement.appendChild( doc.createTextNode( description() ) ); mySrsElement.appendChild( myDescriptionElement ); - QDomElement myProjectionAcronymElement = theDoc.createElement( QStringLiteral( "projectionacronym" ) ); - myProjectionAcronymElement.appendChild( theDoc.createTextNode( projectionAcronym() ) ); + QDomElement myProjectionAcronymElement = doc.createElement( QStringLiteral( "projectionacronym" ) ); + myProjectionAcronymElement.appendChild( doc.createTextNode( projectionAcronym() ) ); mySrsElement.appendChild( myProjectionAcronymElement ); - QDomElement myEllipsoidAcronymElement = theDoc.createElement( QStringLiteral( "ellipsoidacronym" ) ); - myEllipsoidAcronymElement.appendChild( theDoc.createTextNode( ellipsoidAcronym() ) ); + QDomElement myEllipsoidAcronymElement = doc.createElement( QStringLiteral( "ellipsoidacronym" ) ); + myEllipsoidAcronymElement.appendChild( doc.createTextNode( ellipsoidAcronym() ) ); mySrsElement.appendChild( myEllipsoidAcronymElement ); - QDomElement myGeographicFlagElement = theDoc.createElement( QStringLiteral( "geographicflag" ) ); + QDomElement myGeographicFlagElement = doc.createElement( QStringLiteral( "geographicflag" ) ); QString myGeoFlagText = QStringLiteral( "false" ); if ( isGeographic() ) { myGeoFlagText = QStringLiteral( "true" ); } - myGeographicFlagElement.appendChild( theDoc.createTextNode( myGeoFlagText ) ); + myGeographicFlagElement.appendChild( doc.createTextNode( myGeoFlagText ) ); mySrsElement.appendChild( myGeographicFlagElement ); myLayerNode.appendChild( mySrsElement ); @@ -1522,14 +1522,14 @@ bool QgsCoordinateReferenceSystem::writeXml( QDomNode & theNode, QDomDocument & // Returns the whole proj4 string for the selected srsid //this is a static method! NOTE I've made it private for now to reduce API clutter TS -QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int theSrsId ) +QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int srsId ) { QString myDatabaseFileName; QString myProjString; - QString mySql = QStringLiteral( "select parameters from tbl_srs where srs_id = %1 order by deprecated" ).arg( theSrsId ); + QString mySql = QStringLiteral( "select parameters from tbl_srs where srs_id = %1 order by deprecated" ).arg( srsId ); - QgsDebugMsg( "mySrsId = " + QString::number( theSrsId ) ); + QgsDebugMsg( "mySrsId = " + QString::number( srsId ) ); QgsDebugMsg( "USER_CRS_START_ID = " + QString::number( USER_CRS_START_ID ) ); QgsDebugMsg( "Selection sql : " + mySql ); @@ -1537,7 +1537,7 @@ QString QgsCoordinateReferenceSystem::proj4FromSrsId( const int theSrsId ) // Determine if this is a user projection or a system on // user projection defs all have srs_id >= 100000 // - if ( theSrsId >= USER_CRS_START_ID ) + if ( srsId >= USER_CRS_START_ID ) { myDatabaseFileName = QgsApplication::qgisUserDatabaseFilePath(); QFileInfo myFileInfo; diff --git a/src/core/qgscoordinatereferencesystem.h b/src/core/qgscoordinatereferencesystem.h index 27e69da2961..31d26b9d5d6 100644 --- a/src/core/qgscoordinatereferencesystem.h +++ b/src/core/qgscoordinatereferencesystem.h @@ -215,20 +215,20 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * - "WKT:" - handled with createFromWkt() * * If no prefix is specified, WKT definition is assumed. - * @param theDefinition A String containing a coordinate reference system definition. + * @param definition A String containing a coordinate reference system definition. * @see createFromString() */ // TODO QGIS 3: remove "POSTGIS" and "INTERNAL", allow PROJ4 without the prefix - explicit QgsCoordinateReferenceSystem( const QString& theDefinition ); + explicit QgsCoordinateReferenceSystem( const QString& definition ); /** Constructor a CRS object using a postgis SRID, an EPSG code or an internal QGIS CRS ID. * @note We encourage you to use EPSG code, WKT or Proj4 to describe CRS's in your code * wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile. - * @param theId The ID valid for the chosen CRS ID type - * @param theType One of the types described in CrsType + * @param id The ID valid for the chosen CRS ID type + * @param type One of the types described in CrsType */ - // TODO QGIS 3: remove theType and always use EPSG code - QgsCoordinateReferenceSystem( const long theId, CrsType theType = PostgisCrsId ); + // TODO QGIS 3: remove type and always use EPSG code + QgsCoordinateReferenceSystem( const long id, CrsType type = PostgisCrsId ); //! Copy constructor QgsCoordinateReferenceSystem( const QgsCoordinateReferenceSystem& srs ); @@ -295,8 +295,8 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * wherever possible. Internal QGIS CRS IDs are not guaranteed to be permanent / involatile. * @return True on success else false */ - // TODO QGIS 3: remove theType and always use EPSG code, rename to createFromEpsg - bool createFromId( const long theId, CrsType theType = PostgisCrsId ); + // TODO QGIS 3: remove type and always use EPSG code, rename to createFromEpsg + bool createFromId( const long id, CrsType type = PostgisCrsId ); /** * Sets this CRS to the given OGC WMS-format Coordinate Reference Systems. @@ -309,14 +309,14 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * @see fromOgcWmsCrs() */ // TODO QGIS 3: remove "QGIS" and "CUSTOM", only support "USER" (also returned by authid()) - bool createFromOgcWmsCrs( const QString& theCrs ); + bool createFromOgcWmsCrs( const QString& crs ); /** Sets this CRS by lookup of the given PostGIS SRID in the CRS database. - * @param theSrid The postgis SRID for the desired spatial reference system. + * @param srid The postgis SRID for the desired spatial reference system. * @return True on success else false */ // TODO QGIS 3: remove unless really necessary - let's use EPSG codes instead - bool createFromSrid( const long theSrid ); + bool createFromSrid( const long srid ); /** Sets this CRS using a WKT definition. * @@ -326,22 +326,22 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * set up the object. * @note Some members may be left blank if no match can be found in CRS database. * @note this method uses an internal cache. Call invalidateCache() to clear the cache. - * @param theWkt The WKT for the desired spatial reference system. + * @param wkt The WKT for the desired spatial reference system. * @return True on success else false * @see fromWkt() */ - bool createFromWkt( const QString &theWkt ); + bool createFromWkt( const QString &wkt ); /** Sets this CRS by lookup of internal QGIS CRS ID in the CRS database. * * If the srsid is < USER_CRS_START_ID, system CRS database is used, otherwise * user's local CRS database from home directory is used. * @note this method uses an internal cache. Call invalidateCache() to clear the cache. - * @param theSrsId The internal QGIS CRS ID for the desired spatial reference system. + * @param srsId The internal QGIS CRS ID for the desired spatial reference system. * @return True on success else false * @see fromSrsId() */ - bool createFromSrsId( const long theSrsId ); + bool createFromSrsId( const long srsId ); /** Sets this CRS by passing it a PROJ.4 style formatted string. * @@ -361,11 +361,11 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * * @note Some members may be left blank if no match can be found in CRS database. * @note this method uses an internal cache. Call invalidateCache() to clear the cache. - * @param theProjString A proj4 format string + * @param projString A proj4 format string * @return True on success else false * @see fromProj4() */ - bool createFromProj4( const QString &theProjString ); + bool createFromProj4( const QString &projString ); /** Set up this CRS from a string definition. * @@ -377,10 +377,10 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * - "WKT:" - handled with createFromWkt() * * If no prefix is specified, WKT definition is assumed. - * @param theDefinition A String containing a coordinate reference system definition. + * @param definition A String containing a coordinate reference system definition. * @return True on success else false */ - bool createFromString( const QString &theDefinition ); + bool createFromString( const QString &definition ); /** Set up this CRS from various text formats. * @@ -393,11 +393,11 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * ( http://www.gdal.org/ogr/classOGRSpatialReference.html#aec3c6a49533fe457ddc763d699ff8796 ) * @note this function generates a WKT string using OSRSetFromUserInput() and * passes it to createFromWkt() function. - * @param theDefinition A String containing a coordinate reference system definition. + * @param definition A String containing a coordinate reference system definition. * @return True on success else false */ // TODO QGIS3: rename to createFromStringOGR so it is clear it's similar to createFromString, just different backend - bool createFromUserInput( const QString &theDefinition ); + bool createFromUserInput( const QString &definition ); /** Make sure that ESRI WKT import is done properly. * This is required for proper shapefile CRS import when using gdal>= 1.9. @@ -437,26 +437,26 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * * Internally it will use authid() for comparison. */ - bool operator==( const QgsCoordinateReferenceSystem &theSrs ) const; + bool operator==( const QgsCoordinateReferenceSystem &srs ) const; /** Overloaded != operator used to compare to CRS's. * * Returns opposite bool value to operator == */ - bool operator!=( const QgsCoordinateReferenceSystem &theSrs ) const; + bool operator!=( const QgsCoordinateReferenceSystem &srs ) const; /** Restores state from the given DOM node. - * @param theNode The node from which state will be restored + * @param node The node from which state will be restored * @return bool True on success, False on failure */ - bool readXml( const QDomNode & theNode ); + bool readXml( const QDomNode & node ); /** Stores state to the given Dom node in the given document. - * @param theNode The node in which state will be restored - * @param theDoc The document in which state will be stored + * @param node The node in which state will be restored + * @param doc The document in which state will be stored * @return bool True on success, False on failure */ - bool writeXml( QDomNode & theNode, QDomDocument & theDoc ) const; + bool writeXml( QDomNode & node, QDomDocument & doc ) const; /** Sets custom function to force valid CRS @@ -595,28 +595,28 @@ class CORE_EXPORT QgsCoordinateReferenceSystem private: /** A static helper function to find out the proj4 string for a srsid - * @param theSrsId The srsid used for the lookup + * @param srsId The srsid used for the lookup * @return QString The proj4 string */ - static QString proj4FromSrsId( const int theSrsId ); + static QString proj4FromSrsId( const int srsId ); /** Set the QGIS SrsId - * @param theSrsId The internal sqlite3 srs.db primary key for this CRS + * @param srsId The internal sqlite3 srs.db primary key for this CRS */ - void setInternalId( long theSrsId ); + void setInternalId( long srsId ); /** Set the postgis srid - * @param theSrid The postgis spatial_ref_sys key for this CRS + * @param srid The postgis spatial_ref_sys key for this CRS */ - void setSrid( long theSrid ); + void setSrid( long srid ); /** Set the Description - * @param theDescription A textual description of the CRS. + * @param description A textual description of the CRS. */ - void setDescription( const QString& theDescription ); + void setDescription( const QString& description ); /** Set the Proj Proj4String. - * @param theProj4String Proj4 format specifies + * @param proj4String Proj4 format specifies * (excluding proj and ellips) that define this CRS. * @note some content of the PROJ4 string may be stripped off by this * method due to the parsing of the string by OSRNewSpatialReference . @@ -625,17 +625,17 @@ class CORE_EXPORT QgsCoordinateReferenceSystem * Gets stored in the CRS as: * +proj=longlat +datum=WGS84 +no_defs */ - void setProj4String( const QString& theProj4String ); + void setProj4String( const QString& proj4String ); /** Set this Geographic? flag - * @param theGeoFlag Whether this is a geographic or projected coordinate system + * @param geoFlag Whether this is a geographic or projected coordinate system */ - void setGeographicFlag( bool theGeoFlag ); + void setGeographicFlag( bool geoFlag ); /** Set the EpsgCrsId identifier for this CRS - * @param theEpsg the ESPG identifier for this CRS (defaults to 0) + * @param epsg the ESPG identifier for this CRS (defaults to 0) */ - void setEpsg( long theEpsg ); + void setEpsg( long epsg ); /** Set the authority identifier for this CRS * @param theID the authority identifier for this CRS (defaults to 0) @@ -643,14 +643,14 @@ class CORE_EXPORT QgsCoordinateReferenceSystem void setAuthId( const QString& theID ); /** Set the projection acronym - * @param theProjectionAcronym the acronym (must be a valid proj4 projection acronym) + * @param projectionAcronym the acronym (must be a valid proj4 projection acronym) */ - void setProjectionAcronym( const QString& theProjectionAcronym ); + void setProjectionAcronym( const QString& projectionAcronym ); /** Set the ellipsoid acronym - * @param theEllipsoidAcronym the acronym (must be a valid proj4 ellipsoid acronym) + * @param ellipsoidAcronym the acronym (must be a valid proj4 ellipsoid acronym) */ - void setEllipsoidAcronym( const QString& theEllipsoidAcronym ); + void setEllipsoidAcronym( const QString& ellipsoidAcronym ); /** Print the description if debugging */ @@ -662,10 +662,10 @@ class CORE_EXPORT QgsCoordinateReferenceSystem /** Get a record from the srs.db or qgis.db backends, given an sql statement. * @note only handles queries that return a single record. * @note it will first try the system srs.db then the users qgis.db! - * @param theSql The sql query to execute + * @param sql The sql query to execute * @return An associative array of field name <-> value pairs */ - RecordMap getRecord( const QString& theSql ); + RecordMap getRecord( const QString& sql ); //! Open SQLite db and show message if cannot be opened //! @return the same code as sqlite3_open diff --git a/src/core/qgscoordinatetransform.cpp b/src/core/qgscoordinatetransform.cpp index c2bcb85b637..05e6f0efe8f 100644 --- a/src/core/qgscoordinatetransform.cpp +++ b/src/core/qgscoordinatetransform.cpp @@ -86,14 +86,14 @@ QgsCoordinateReferenceSystem QgsCoordinateTransform::destinationCrs() const return d->mDestCRS; } -QgsPoint QgsCoordinateTransform::transform( const QgsPoint &thePoint, TransformDirection direction ) const +QgsPoint QgsCoordinateTransform::transform( const QgsPoint &point, TransformDirection direction ) const { if ( !d->mIsValid || d->mShortCircuit ) - return thePoint; + return point; // transform x - double x = thePoint.x(); - double y = thePoint.y(); + double x = point.x(); + double y = point.y(); double z = 0.0; try { @@ -124,15 +124,15 @@ QgsPoint QgsCoordinateTransform::transform( const double theX, const double theY } } -QgsRectangle QgsCoordinateTransform::transform( const QgsRectangle &theRect, TransformDirection direction ) const +QgsRectangle QgsCoordinateTransform::transform( const QgsRectangle &rect, TransformDirection direction ) const { if ( !d->mIsValid || d->mShortCircuit ) - return theRect; + return rect; // transform x - double x1 = theRect.xMinimum(); - double y1 = theRect.yMinimum(); - double x2 = theRect.xMaximum(); - double y2 = theRect.yMaximum(); + double x1 = rect.xMinimum(); + double y1 = rect.yMinimum(); + double x2 = rect.xMaximum(); + double y2 = rect.yMaximum(); // Number of points to reproject------+ // | @@ -152,10 +152,10 @@ QgsRectangle QgsCoordinateTransform::transform( const QgsRectangle &theRect, Tra #ifdef COORDINATE_TRANSFORM_VERBOSE QgsDebugMsg( "Rect projection..." ); - QgsDebugMsg( QString( "Xmin : %1 --> %2" ).arg( theRect.xMinimum() ).arg( x1 ) ); - QgsDebugMsg( QString( "Ymin : %1 --> %2" ).arg( theRect.yMinimum() ).arg( y1 ) ); - QgsDebugMsg( QString( "Xmax : %1 --> %2" ).arg( theRect.xMaximum() ).arg( x2 ) ); - QgsDebugMsg( QString( "Ymax : %1 --> %2" ).arg( theRect.yMaximum() ).arg( y2 ) ); + QgsDebugMsg( QString( "Xmin : %1 --> %2" ).arg( rect.xMinimum() ).arg( x1 ) ); + QgsDebugMsg( QString( "Ymin : %1 --> %2" ).arg( rect.yMinimum() ).arg( y1 ) ); + QgsDebugMsg( QString( "Xmax : %1 --> %2" ).arg( rect.xMaximum() ).arg( x2 ) ); + QgsDebugMsg( QString( "Ymax : %1 --> %2" ).arg( rect.yMaximum() ).arg( y2 ) ); #endif return QgsRectangle( x1, y1, x2, y2 ); } @@ -564,37 +564,37 @@ bool QgsCoordinateTransform::isShortCircuited() const return !d->mIsValid || d->mShortCircuit; } -bool QgsCoordinateTransform::readXml( const QDomNode & theNode ) +bool QgsCoordinateTransform::readXml( const QDomNode & node ) { d.detach(); QgsDebugMsg( "Reading Coordinate Transform from xml ------------------------!" ); - QDomNode mySrcNode = theNode.namedItem( QStringLiteral( "sourcesrs" ) ); + QDomNode mySrcNode = node.namedItem( QStringLiteral( "sourcesrs" ) ); d->mSourceCRS.readXml( mySrcNode ); - QDomNode myDestNode = theNode.namedItem( QStringLiteral( "destinationsrs" ) ); + QDomNode myDestNode = node.namedItem( QStringLiteral( "destinationsrs" ) ); d->mDestCRS.readXml( myDestNode ); - d->mSourceDatumTransform = theNode.toElement().attribute( QStringLiteral( "sourceDatumTransform" ), QStringLiteral( "-1" ) ).toInt(); - d->mDestinationDatumTransform = theNode.toElement().attribute( QStringLiteral( "destinationDatumTransform" ), QStringLiteral( "-1" ) ).toInt(); + d->mSourceDatumTransform = node.toElement().attribute( QStringLiteral( "sourceDatumTransform" ), QStringLiteral( "-1" ) ).toInt(); + d->mDestinationDatumTransform = node.toElement().attribute( QStringLiteral( "destinationDatumTransform" ), QStringLiteral( "-1" ) ).toInt(); return d->initialize(); } -bool QgsCoordinateTransform::writeXml( QDomNode & theNode, QDomDocument & theDoc ) const +bool QgsCoordinateTransform::writeXml( QDomNode & node, QDomDocument & doc ) const { - QDomElement myNodeElement = theNode.toElement(); - QDomElement myTransformElement = theDoc.createElement( QStringLiteral( "coordinatetransform" ) ); + QDomElement myNodeElement = node.toElement(); + QDomElement myTransformElement = doc.createElement( QStringLiteral( "coordinatetransform" ) ); myTransformElement.setAttribute( QStringLiteral( "sourceDatumTransform" ), QString::number( d->mSourceDatumTransform ) ); myTransformElement.setAttribute( QStringLiteral( "destinationDatumTransform" ), QString::number( d->mDestinationDatumTransform ) ); - QDomElement mySourceElement = theDoc.createElement( QStringLiteral( "sourcesrs" ) ); - d->mSourceCRS.writeXml( mySourceElement, theDoc ); + QDomElement mySourceElement = doc.createElement( QStringLiteral( "sourcesrs" ) ); + d->mSourceCRS.writeXml( mySourceElement, doc ); myTransformElement.appendChild( mySourceElement ); - QDomElement myDestElement = theDoc.createElement( QStringLiteral( "destinationsrs" ) ); - d->mDestCRS.writeXml( myDestElement, theDoc ); + QDomElement myDestElement = doc.createElement( QStringLiteral( "destinationsrs" ) ); + d->mDestCRS.writeXml( myDestElement, doc ); myTransformElement.appendChild( myDestElement ); myNodeElement.appendChild( myTransformElement ); diff --git a/src/core/qgscredentials.cpp b/src/core/qgscredentials.cpp index 66246812521..6442a1b23e5 100644 --- a/src/core/qgscredentials.cpp +++ b/src/core/qgscredentials.cpp @@ -20,14 +20,14 @@ QgsCredentials *QgsCredentials::sInstance = nullptr; -void QgsCredentials::setInstance( QgsCredentials *theInstance ) +void QgsCredentials::setInstance( QgsCredentials *instance ) { if ( sInstance ) { QgsDebugMsg( "already registered an instance of QgsCredentials" ); } - sInstance = theInstance; + sInstance = instance; } QgsCredentials *QgsCredentials::instance() diff --git a/src/core/qgscredentials.h b/src/core/qgscredentials.h index 71deba51e6d..41b01b40c4e 100644 --- a/src/core/qgscredentials.h +++ b/src/core/qgscredentials.h @@ -80,7 +80,7 @@ class CORE_EXPORT QgsCredentials virtual bool requestMasterPassword( QString &password, bool stored = false ) = 0; //! register instance - void setInstance( QgsCredentials *theInstance ); + void setInstance( QgsCredentials *instance ); private: Q_DISABLE_COPY( QgsCredentials ) diff --git a/src/core/qgsdataprovider.h b/src/core/qgsdataprovider.h index 66c61a6ef18..c4d0e26defc 100644 --- a/src/core/qgsdataprovider.h +++ b/src/core/qgsdataprovider.h @@ -421,10 +421,10 @@ class CORE_EXPORT QgsDataProvider : public QObject QgsError mError; //! Add error message - void appendError( const QgsErrorMessage & theMessage ) { mError.append( theMessage );} + void appendError( const QgsErrorMessage & message ) { mError.append( message );} //! Set error message - void setError( const QgsError & theError ) { mError = theError;} + void setError( const QgsError & error ) { mError = error;} private: diff --git a/src/core/qgsdatasourceuri.cpp b/src/core/qgsdatasourceuri.cpp index ea3b18acb57..d4badb8353e 100644 --- a/src/core/qgsdatasourceuri.cpp +++ b/src/core/qgsdatasourceuri.cpp @@ -359,9 +359,9 @@ void QgsDataSourceUri::setKeyColumn( const QString& column ) } -void QgsDataSourceUri::setUseEstimatedMetadata( bool theFlag ) +void QgsDataSourceUri::setUseEstimatedMetadata( bool flag ) { - mUseEstimatedMetadata = theFlag; + mUseEstimatedMetadata = flag; } bool QgsDataSourceUri::useEstimatedMetadata() const @@ -369,9 +369,9 @@ bool QgsDataSourceUri::useEstimatedMetadata() const return mUseEstimatedMetadata; } -void QgsDataSourceUri::disableSelectAtId( bool theFlag ) +void QgsDataSourceUri::disableSelectAtId( bool flag ) { - mSelectAtIdDisabled = theFlag; + mSelectAtIdDisabled = flag; } bool QgsDataSourceUri::selectAtIdDisabled() const @@ -394,14 +394,14 @@ void QgsDataSourceUri::setSchema( const QString& schema ) mSchema = schema; } -QString QgsDataSourceUri::escape( const QString &theVal, QChar delim = '\'' ) const +QString QgsDataSourceUri::escape( const QString &val, QChar delim = '\'' ) const { - QString val = theVal; + QString escaped = val; - val.replace( '\\', QLatin1String( "\\\\" ) ); - val.replace( delim, QStringLiteral( "\\%1" ).arg( delim ) ); + escaped.replace( '\\', QLatin1String( "\\\\" ) ); + escaped.replace( delim, QStringLiteral( "\\%1" ).arg( delim ) ); - return val; + return escaped; } void QgsDataSourceUri::skipBlanks( const QString &uri, int &i ) @@ -552,32 +552,32 @@ QString QgsDataSourceUri::connectionInfo( bool expandAuthConfig ) const QString QgsDataSourceUri::uri( bool expandAuthConfig ) const { - QString theUri = connectionInfo( expandAuthConfig ); + QString uri = connectionInfo( expandAuthConfig ); if ( !mKeyColumn.isEmpty() ) { - theUri += QStringLiteral( " key='%1'" ).arg( escape( mKeyColumn ) ); + uri += QStringLiteral( " key='%1'" ).arg( escape( mKeyColumn ) ); } if ( mUseEstimatedMetadata ) { - theUri += QStringLiteral( " estimatedmetadata=true" ); + uri += QStringLiteral( " estimatedmetadata=true" ); } if ( !mSrid.isEmpty() ) { - theUri += QStringLiteral( " srid=%1" ).arg( mSrid ); + uri += QStringLiteral( " srid=%1" ).arg( mSrid ); } if ( mWkbType != QgsWkbTypes::Unknown && mWkbType != QgsWkbTypes::NoGeometry ) { - theUri += QLatin1String( " type=" ); - theUri += QgsWkbTypes::displayString( mWkbType ); + uri += QLatin1String( " type=" ); + uri += QgsWkbTypes::displayString( mWkbType ); } if ( mSelectAtIdDisabled ) { - theUri += QStringLiteral( " selectatid=false" ); + uri += QStringLiteral( " selectatid=false" ); } for ( QMap::const_iterator it = mParams.begin(); it != mParams.end(); ++it ) @@ -588,19 +588,19 @@ QString QgsDataSourceUri::uri( bool expandAuthConfig ) const continue; } - theUri += ' ' + it.key() + "='" + escape( it.value() ) + '\''; + uri += ' ' + it.key() + "='" + escape( it.value() ) + '\''; } QString columnName( mGeometryColumn ); columnName.replace( '\\', QLatin1String( "\\\\" ) ); columnName.replace( ')', QLatin1String( "\\)" ) ); - theUri += QStringLiteral( " table=%1%2 sql=%3" ) - .arg( quotedTablename(), - mGeometryColumn.isNull() ? QString() : QStringLiteral( " (%1)" ).arg( columnName ), - mSql ); + uri += QStringLiteral( " table=%1%2 sql=%3" ) + .arg( quotedTablename(), + mGeometryColumn.isNull() ? QString() : QStringLiteral( " (%1)" ).arg( columnName ), + mSql ); - return theUri; + return uri; } QByteArray QgsDataSourceUri::encodedUri() const diff --git a/src/core/qgsdatasourceuri.h b/src/core/qgsdatasourceuri.h index fd3f0926461..a76143b6da8 100644 --- a/src/core/qgsdatasourceuri.h +++ b/src/core/qgsdatasourceuri.h @@ -143,13 +143,13 @@ class CORE_EXPORT QgsDataSourceUri QString geometryColumn() const; //! set use Estimated Metadata - void setUseEstimatedMetadata( bool theFlag ); + void setUseEstimatedMetadata( bool flag ); //! Returns true if estimated metadata are used bool useEstimatedMetadata() const; //! Set to true to disable selection by id - void disableSelectAtId( bool theFlag ); + void disableSelectAtId( bool flag ); //! Returns whether the selection by id is disabled bool selectAtIdDisabled() const; diff --git a/src/core/qgsdatumtransformstore.cpp b/src/core/qgsdatumtransformstore.cpp index 311d2c6ad87..f5dbc2a5550 100644 --- a/src/core/qgsdatumtransformstore.cpp +++ b/src/core/qgsdatumtransformstore.cpp @@ -102,14 +102,14 @@ void QgsDatumTransformStore::readXml( const QDomNode& parentNode ) } } -void QgsDatumTransformStore::writeXml( QDomNode& parentNode, QDomDocument& theDoc ) const +void QgsDatumTransformStore::writeXml( QDomNode& parentNode, QDomDocument& doc ) const { // layer coordinate transform infos - QDomElement layerCoordTransformInfo = theDoc.createElement( QStringLiteral( "layer_coordinate_transform_info" ) ); + QDomElement layerCoordTransformInfo = doc.createElement( QStringLiteral( "layer_coordinate_transform_info" ) ); for ( QHash< QString, Entry >::const_iterator coordIt = mEntries.constBegin(); coordIt != mEntries.constEnd(); ++coordIt ) { - QDomElement layerCoordTransformElem = theDoc.createElement( QStringLiteral( "layer_coordinate_transform" ) ); + QDomElement layerCoordTransformElem = doc.createElement( QStringLiteral( "layer_coordinate_transform" ) ); layerCoordTransformElem.setAttribute( QStringLiteral( "layerid" ), coordIt.key() ); layerCoordTransformElem.setAttribute( QStringLiteral( "srcAuthId" ), coordIt->srcAuthId ); layerCoordTransformElem.setAttribute( QStringLiteral( "destAuthId" ), coordIt->destAuthId ); diff --git a/src/core/qgsdatumtransformstore.h b/src/core/qgsdatumtransformstore.h index c6e7d2a7549..865c098ae00 100644 --- a/src/core/qgsdatumtransformstore.h +++ b/src/core/qgsdatumtransformstore.h @@ -52,7 +52,7 @@ class CORE_EXPORT QgsDatumTransformStore void readXml( const QDomNode& parentNode ); - void writeXml( QDomNode& parentNode, QDomDocument& theDoc ) const; + void writeXml( QDomNode& parentNode, QDomDocument& doc ) const; struct CORE_EXPORT Entry { diff --git a/src/core/qgserror.cpp b/src/core/qgserror.cpp index 05bcff5ec56..6da66992785 100644 --- a/src/core/qgserror.cpp +++ b/src/core/qgserror.cpp @@ -22,32 +22,32 @@ #include -QgsErrorMessage::QgsErrorMessage( const QString & theMessage, const QString & theTag, const QString & theFile, const QString & theFunction, int theLine ) - : mMessage( theMessage ) - , mTag( theTag ) - , mFile( theFile ) - , mFunction( theFunction ) - , mLine( theLine ) +QgsErrorMessage::QgsErrorMessage( const QString & message, const QString & tag, const QString & file, const QString & function, int line ) + : mMessage( message ) + , mTag( tag ) + , mFile( file ) + , mFunction( function ) + , mLine( line ) , mFormat( Text ) { } -QgsError::QgsError( const QString & theMessage, const QString & theTag ) +QgsError::QgsError( const QString & message, const QString & tag ) { - append( theMessage, theTag ); + append( message, tag ); } -void QgsError::append( const QString & theMessage, const QString & theTag ) +void QgsError::append( const QString & message, const QString & tag ) { - mMessageList.append( QgsErrorMessage( theMessage, theTag ) ); + mMessageList.append( QgsErrorMessage( message, tag ) ); } -void QgsError::append( const QgsErrorMessage & theMessage ) +void QgsError::append( const QgsErrorMessage & message ) { - mMessageList.append( theMessage ); + mMessageList.append( message ); } -QString QgsError::message( QgsErrorMessage::Format theFormat ) const +QString QgsError::message( QgsErrorMessage::Format format ) const { QString str; @@ -79,7 +79,7 @@ QString QgsError::message( QgsErrorMessage::Format theFormat ) const #endif #endif - if ( theFormat == QgsErrorMessage::Text ) + if ( format == QgsErrorMessage::Text ) { if ( !str.isEmpty() ) { diff --git a/src/core/qgserror.h b/src/core/qgserror.h index b5c18a74713..d81df488502 100644 --- a/src/core/qgserror.h +++ b/src/core/qgserror.h @@ -44,13 +44,13 @@ class CORE_EXPORT QgsErrorMessage {} /** Constructor. - * @param theMessage error message string - * @param theTag error label, for example GDAL, GDAL Provider, Raster layer - * @param theFile the file where error was created - * @param theFunction the function where error was created - * @param theLine the line where error was created + * @param message error message string + * @param tag error label, for example GDAL, GDAL Provider, Raster layer + * @param file the file where error was created + * @param function the function where error was created + * @param line the line where error was created */ - QgsErrorMessage( const QString & theMessage, const QString & theTag = QString::null, const QString & theFile = QString::null, const QString & theFunction = QString::null, int theLine = 0 ); + QgsErrorMessage( const QString & message, const QString & tag = QString::null, const QString & file = QString::null, const QString & function = QString::null, int line = 0 ); QString message() const { return mMessage; } QString tag() const { return mTag; } @@ -86,21 +86,21 @@ class CORE_EXPORT QgsError QgsError() {} /** Constructor with single message. - * @param theMessage error message - * @param theTag short description, e.g. GDAL, Provider, Layer + * @param message error message + * @param tag short description, e.g. GDAL, Provider, Layer */ - QgsError( const QString & theMessage, const QString & theTag ); + QgsError( const QString & message, const QString & tag ); /** Append new error message. - * @param theMessage error message string - * @param theTag error label, for example GDAL, GDAL Provider, Raster layer + * @param message error message string + * @param tag error label, for example GDAL, GDAL Provider, Raster layer */ - void append( const QString & theMessage, const QString & theTag ); + void append( const QString & message, const QString & tag ); /** Append new error message. - * @param theMessage error message + * @param message error message */ - void append( const QgsErrorMessage & theMessage ); + void append( const QgsErrorMessage & message ); /** Test if any error is set. * @return true if contains error @@ -108,10 +108,10 @@ class CORE_EXPORT QgsError bool isEmpty() const { return mMessageList.isEmpty(); } /** Full error messages description - * @param theFormat output format + * @param format output format * @return error report */ - QString message( QgsErrorMessage::Format theFormat = QgsErrorMessage::Html ) const; + QString message( QgsErrorMessage::Format format = QgsErrorMessage::Html ) const; /** Short error description, usually the first error in chain, the real error. * @return error description diff --git a/src/core/qgsfeaturestore.h b/src/core/qgsfeaturestore.h index eb23c776162..c6a39951296 100644 --- a/src/core/qgsfeaturestore.h +++ b/src/core/qgsfeaturestore.h @@ -58,7 +58,7 @@ class CORE_EXPORT QgsFeatureStore QgsFeatureList& features() { return mFeatures; } //! Set map of optional parameters - void setParams( const QMap &theParams ) { mParams = theParams; } + void setParams( const QMap ¶ms ) { mParams = params; } //! Get map of optional parameters QMap params() const { return mParams; } diff --git a/src/core/qgsgml.cpp b/src/core/qgsgml.cpp index 073946f5aa3..3b6391353b3 100644 --- a/src/core/qgsgml.cpp +++ b/src/core/qgsgml.cpp @@ -479,7 +479,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a const char* pszLocalName = ( pszSep ) ? pszSep + 1 : el; const int nsLen = ( pszSep ) ? ( int )( pszSep - el ) : 0; const int localNameLen = ( pszSep ) ? ( int )( elLen - nsLen ) - 1 : elLen; - ParseMode theParseMode( mParseModeStack.isEmpty() ? None : mParseModeStack.top() ); + ParseMode parseMode( mParseModeStack.isEmpty() ? None : mParseModeStack.top() ); // Figure out if the GML namespace is GML_NAMESPACE or GML32_NAMESPACE if ( !mGMLNameSpaceURIPtr && pszSep ) @@ -499,8 +499,8 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a const bool isGMLNS = ( nsLen == mGMLNameSpaceURI.size() && mGMLNameSpaceURIPtr && memcmp( el, mGMLNameSpaceURIPtr, nsLen ) == 0 ); bool isGeom = false; - if ( theParseMode == Geometry || theParseMode == Coordinate || theParseMode == PosList || - theParseMode == MultiPoint || theParseMode == MultiLine || theParseMode == MultiPolygon ) + if ( parseMode == Geometry || parseMode == Coordinate || parseMode == PosList || + parseMode == MultiPoint || parseMode == MultiLine || parseMode == MultiPolygon ) { mGeometryString.append( "<", 1 ); mGeometryString.append( pszLocalName, localNameLen ); @@ -563,31 +563,31 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mCurrentExtent = QgsRectangle(); mBoundedByNullFound = false; } - else if ( theParseMode == BoundingBox && + else if ( parseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "null" ) ) { mParseModeStack.push( QgsGmlStreamingParser::Null ); mBoundedByNullFound = true; } - else if ( theParseMode == BoundingBox && + else if ( parseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "Envelope" ) ) { isGeom = true; mParseModeStack.push( QgsGmlStreamingParser::Envelope ); } - else if ( theParseMode == Envelope && + else if ( parseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "lowerCorner" ) ) { mParseModeStack.push( QgsGmlStreamingParser::LowerCorner ); mStringCash.clear(); } - else if ( theParseMode == Envelope && + else if ( parseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "upperCorner" ) ) { mParseModeStack.push( QgsGmlStreamingParser::UpperCorner ); mStringCash.clear(); } - else if ( theParseMode == None && !mTypeNamePtr && + else if ( parseMode == None && !mTypeNamePtr && LOCALNAME_EQUALS( "Tuple" ) ) { Q_ASSERT( !mCurrentFeature ); @@ -598,7 +598,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mParseModeStack.push( QgsGmlStreamingParser::Tuple ); mCurrentFeatureId.clear(); } - else if ( theParseMode == Tuple ) + else if ( parseMode == Tuple ) { QString currentTypename( QString::fromUtf8( pszLocalName, localNameLen ) ); QMap< QString, LayerProperties >::const_iterator iter = mMapTypeNameToProperties.constFind( currentTypename ); @@ -641,7 +641,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mCurrentFeatureId += id; } } - else if ( theParseMode == None && + else if ( parseMode == None && localNameLen == static_cast( mTypeNameUTF8Len ) && memcmp( pszLocalName, mTypeNamePtr, mTypeNameUTF8Len ) == 0 ) { @@ -680,7 +680,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a } } - else if ( theParseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "Box" ) ) + else if ( parseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "Box" ) ) { isGeom = true; } @@ -717,7 +717,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a isGeom = true; mParseModeStack.push( QgsGmlStreamingParser::MultiPolygon ); } - else if ( theParseMode == FeatureTuple ) + else if ( parseMode == FeatureTuple ) { QString localName( QString::fromUtf8( pszLocalName, localNameLen ) ); if ( mThematicAttributes.contains( mCurrentTypename + '|' + localName ) ) @@ -727,7 +727,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mStringCash.clear(); } } - else if ( theParseMode == Feature ) + else if ( parseMode == Feature ) { QString localName( QString::fromUtf8( pszLocalName, localNameLen ) ); if ( mThematicAttributes.contains( localName ) ) @@ -840,33 +840,33 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) const char* pszLocalName = ( pszSep ) ? pszSep + 1 : el; const int nsLen = ( pszSep ) ? ( int )( pszSep - el ) : 0; const int localNameLen = ( pszSep ) ? ( int )( elLen - nsLen ) - 1 : elLen; - ParseMode theParseMode( mParseModeStack.isEmpty() ? None : mParseModeStack.top() ); + ParseMode parseMode( mParseModeStack.isEmpty() ? None : mParseModeStack.top() ); const bool isGMLNS = ( nsLen == mGMLNameSpaceURI.size() && mGMLNameSpaceURIPtr && memcmp( el, mGMLNameSpaceURIPtr, nsLen ) == 0 ); - if ( theParseMode == Coordinate && isGMLNS && LOCALNAME_EQUALS( "coordinates" ) ) + if ( parseMode == Coordinate && isGMLNS && LOCALNAME_EQUALS( "coordinates" ) ) { mParseModeStack.pop(); } - else if ( theParseMode == PosList && isGMLNS && + else if ( parseMode == PosList && isGMLNS && ( LOCALNAME_EQUALS( "pos" ) || LOCALNAME_EQUALS( "posList" ) ) ) { mParseModeStack.pop(); } - else if ( theParseMode == AttributeTuple && + else if ( parseMode == AttributeTuple && mCurrentTypename + '|' + QString::fromUtf8( pszLocalName, localNameLen ) == mAttributeName ) //add a thematic attribute to the feature { mParseModeStack.pop(); setAttribute( mAttributeName, mStringCash ); } - else if ( theParseMode == Attribute && QString::fromUtf8( pszLocalName, localNameLen ) == mAttributeName ) //add a thematic attribute to the feature + else if ( parseMode == Attribute && QString::fromUtf8( pszLocalName, localNameLen ) == mAttributeName ) //add a thematic attribute to the feature { mParseModeStack.pop(); setAttribute( mAttributeName, mStringCash ); } - else if ( theParseMode == Geometry && + else if ( parseMode == Geometry && localNameLen == static_cast( mGeometryAttributeUTF8Len ) && memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 ) { @@ -891,7 +891,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } mGeometryString.clear(); } - else if ( theParseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "boundedBy" ) ) + else if ( parseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "boundedBy" ) ) { //create bounding box from mStringCash if ( mCurrentExtent.isNull() && @@ -909,15 +909,15 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) mParseModeStack.pop(); } - else if ( theParseMode == Null && isGMLNS && LOCALNAME_EQUALS( "null" ) ) + else if ( parseMode == Null && isGMLNS && LOCALNAME_EQUALS( "null" ) ) { mParseModeStack.pop(); } - else if ( theParseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "Envelope" ) ) + else if ( parseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "Envelope" ) ) { mParseModeStack.pop(); } - else if ( theParseMode == LowerCorner && isGMLNS && LOCALNAME_EQUALS( "lowerCorner" ) ) + else if ( parseMode == LowerCorner && isGMLNS && LOCALNAME_EQUALS( "lowerCorner" ) ) { QList points; pointsFromPosListString( points, mStringCash, 2 ); @@ -928,7 +928,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } mParseModeStack.pop(); } - else if ( theParseMode == UpperCorner && isGMLNS && LOCALNAME_EQUALS( "upperCorner" ) ) + else if ( parseMode == UpperCorner && isGMLNS && LOCALNAME_EQUALS( "upperCorner" ) ) { QList points; pointsFromPosListString( points, mStringCash, 2 ); @@ -939,14 +939,14 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } mParseModeStack.pop(); } - else if ( theParseMode == FeatureTuple && mParseDepth == mFeatureTupleDepth ) + else if ( parseMode == FeatureTuple && mParseDepth == mFeatureTupleDepth ) { mParseModeStack.pop(); mFeatureTupleDepth = 0; } - else if (( theParseMode == Tuple && !mTypeNamePtr && + else if (( parseMode == Tuple && !mTypeNamePtr && LOCALNAME_EQUALS( "Tuple" ) ) || - ( theParseMode == Feature && + ( parseMode == Feature && localNameLen == static_cast( mTypeNameUTF8Len ) && memcmp( pszLocalName, mTypeNamePtr, mTypeNameUTF8Len ) == 0 ) ) { @@ -984,7 +984,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) if ( pointList.isEmpty() ) return; // error - if ( theParseMode == QgsGmlStreamingParser::Geometry ) + if ( parseMode == QgsGmlStreamingParser::Geometry ) { //directly add WKB point to the feature if ( getPointWKB( mCurrentWKB, *( pointList.constBegin() ) ) != 0 ) @@ -1024,7 +1024,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) { //error } - if ( theParseMode == QgsGmlStreamingParser::Geometry ) + if ( parseMode == QgsGmlStreamingParser::Geometry ) { if ( getLineWKB( mCurrentWKB, pointList ) != 0 ) { @@ -1054,7 +1054,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } } } - else if (( theParseMode == Geometry || theParseMode == MultiPolygon ) && + else if (( parseMode == Geometry || parseMode == MultiPolygon ) && isGMLNS && LOCALNAME_EQUALS( "LinearRing" ) ) { QList pointList; @@ -1079,7 +1079,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) QgsDebugMsg( "no wkb fragments" ); } } - else if (( theParseMode == Geometry || theParseMode == MultiPolygon ) && isGMLNS && + else if (( parseMode == Geometry || parseMode == MultiPolygon ) && isGMLNS && LOCALNAME_EQUALS( "Polygon" ) ) { if ( mWkbType != QgsWkbTypes::MultiPolygon )//keep multitype in case of geometry type mix @@ -1087,26 +1087,26 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) mWkbType = QgsWkbTypes::Polygon; } - if ( theParseMode == Geometry ) + if ( parseMode == Geometry ) { createPolygonFromFragments(); } } - else if ( theParseMode == MultiPoint && isGMLNS && + else if ( parseMode == MultiPoint && isGMLNS && LOCALNAME_EQUALS( "MultiPoint" ) ) { mWkbType = QgsWkbTypes::MultiPoint; mParseModeStack.pop(); createMultiPointFromFragments(); } - else if ( theParseMode == MultiLine && isGMLNS && + else if ( parseMode == MultiLine && isGMLNS && ( LOCALNAME_EQUALS( "MultiLineString" ) || LOCALNAME_EQUALS( "MultiCurve" ) ) ) { mWkbType = QgsWkbTypes::MultiLineString; mParseModeStack.pop(); createMultiLineFromFragments(); } - else if ( theParseMode == MultiPolygon && isGMLNS && + else if ( parseMode == MultiPolygon && isGMLNS && ( LOCALNAME_EQUALS( "MultiPolygon" ) || LOCALNAME_EQUALS( "MultiSurface" ) ) ) { mWkbType = QgsWkbTypes::MultiPolygon; @@ -1117,7 +1117,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) { mParseModeStack.pop(); } - else if ( theParseMode == ExceptionText && LOCALNAME_EQUALS( "ExceptionText" ) ) + else if ( parseMode == ExceptionText && LOCALNAME_EQUALS( "ExceptionText" ) ) { mExceptionText = mStringCash; mParseModeStack.pop(); @@ -1145,14 +1145,14 @@ void QgsGmlStreamingParser::characters( const XML_Char* chars, int len ) mGeometryString.append( chars, len ); } - QgsGmlStreamingParser::ParseMode theParseMode = mParseModeStack.top(); - if ( theParseMode == QgsGmlStreamingParser::Attribute || - theParseMode == QgsGmlStreamingParser::AttributeTuple || - theParseMode == QgsGmlStreamingParser::Coordinate || - theParseMode == QgsGmlStreamingParser::PosList || - theParseMode == QgsGmlStreamingParser::LowerCorner || - theParseMode == QgsGmlStreamingParser::UpperCorner || - theParseMode == QgsGmlStreamingParser::ExceptionText ) + QgsGmlStreamingParser::ParseMode parseMode = mParseModeStack.top(); + if ( parseMode == QgsGmlStreamingParser::Attribute || + parseMode == QgsGmlStreamingParser::AttributeTuple || + parseMode == QgsGmlStreamingParser::Coordinate || + parseMode == QgsGmlStreamingParser::PosList || + parseMode == QgsGmlStreamingParser::LowerCorner || + parseMode == QgsGmlStreamingParser::UpperCorner || + parseMode == QgsGmlStreamingParser::ExceptionText ) { mStringCash.append( QString::fromUtf8( chars, len ) ); } diff --git a/src/core/qgslogger.cpp b/src/core/qgslogger.cpp index ef0d9b0469a..4cd33ea715d 100644 --- a/src/core/qgslogger.cpp +++ b/src/core/qgslogger.cpp @@ -139,7 +139,7 @@ void QgsLogger::fatal( const QString& msg ) qFatal( "%s", msg.toLocal8Bit().constData() ); } -void QgsLogger::logMessageToFile( const QString& theMessage ) +void QgsLogger::logMessageToFile( const QString& message ) { if ( sLogFile.isEmpty() ) return; @@ -148,7 +148,7 @@ void QgsLogger::logMessageToFile( const QString& theMessage ) QFile file( sLogFile ); if ( !file.open( QIODevice::Append ) ) return; - file.write( theMessage.toLocal8Bit().constData() ); + file.write( message.toLocal8Bit().constData() ); file.write( "\n" ); file.close(); } diff --git a/src/core/qgslogger.h b/src/core/qgslogger.h index 3711064354a..80ba88d8089 100644 --- a/src/core/qgslogger.h +++ b/src/core/qgslogger.h @@ -96,7 +96,7 @@ class CORE_EXPORT QgsLogger static int debugLevel() { init(); return sDebugLevel; } //! Logs the message passed in to the logfile defined in QGIS_LOG_FILE if any. * - static void logMessageToFile( const QString& theMessage ); + static void logMessageToFile( const QString& message ); /** Reads the environment variable QGIS_LOG_FILE. Returns NULL if the variable is not set, * otherwise returns a file name for writing log messages to.*/ diff --git a/src/core/qgsmaplayer.cpp b/src/core/qgsmaplayer.cpp index d71f51168c9..b6e5665271d 100644 --- a/src/core/qgsmaplayer.cpp +++ b/src/core/qgsmaplayer.cpp @@ -1032,7 +1032,7 @@ bool QgsMapLayer::loadNamedStyleFromDatabase( const QString &db, const QString & { QgsDebugMsg( QString( "db = %1 uri = %2" ).arg( db, uri ) ); - bool theResultFlag = false; + bool resultFlag = false; // read from database sqlite3 *myDatabase = nullptr; @@ -1061,7 +1061,7 @@ bool QgsMapLayer::loadNamedStyleFromDatabase( const QString &db, const QString & sqlite3_step( myPreparedStatement ) == SQLITE_ROW ) { qml = QString::fromUtf8( reinterpret_cast< const char * >( sqlite3_column_text( myPreparedStatement, 0 ) ) ); - theResultFlag = true; + resultFlag = true; } sqlite3_finalize( myPreparedStatement ); @@ -1069,7 +1069,7 @@ bool QgsMapLayer::loadNamedStyleFromDatabase( const QString &db, const QString & sqlite3_close( myDatabase ); - return theResultFlag; + return resultFlag; } diff --git a/src/core/qgsmaprenderercustompainterjob.cpp b/src/core/qgsmaprenderercustompainterjob.cpp index e6988b36b1b..03d3122fe0c 100644 --- a/src/core/qgsmaprenderercustompainterjob.cpp +++ b/src/core/qgsmaprenderercustompainterjob.cpp @@ -64,9 +64,9 @@ void QgsMapRendererCustomPainterJob::start() mPainter->setRenderHint( QPainter::Antialiasing, mSettings.testFlag( QgsMapSettings::Antialiasing ) ); #ifndef QT_NO_DEBUG - QPaintDevice* thePaintDevice = mPainter->device(); - QString errMsg = QStringLiteral( "pre-set DPI not equal to painter's DPI (%1 vs %2)" ).arg( thePaintDevice->logicalDpiX() ).arg( mSettings.outputDpi() ); - Q_ASSERT_X( qgsDoubleNear( thePaintDevice->logicalDpiX(), mSettings.outputDpi() ), "Job::startRender()", errMsg.toLatin1().data() ); + QPaintDevice* paintDevice = mPainter->device(); + QString errMsg = QStringLiteral( "pre-set DPI not equal to painter's DPI (%1 vs %2)" ).arg( paintDevice->logicalDpiX() ).arg( mSettings.outputDpi() ); + Q_ASSERT_X( qgsDoubleNear( paintDevice->logicalDpiX(), mSettings.outputDpi() ), "Job::startRender()", errMsg.toLatin1().data() ); #endif mLabelingEngineV2.reset(); diff --git a/src/core/qgsmapsettings.cpp b/src/core/qgsmapsettings.cpp index 5c154985c0f..2dde3096045 100644 --- a/src/core/qgsmapsettings.cpp +++ b/src/core/qgsmapsettings.cpp @@ -383,26 +383,26 @@ QgsCoordinateTransform QgsMapSettings::layerTransform( QgsMapLayer *layer ) cons } -double QgsMapSettings::layerToMapUnits( QgsMapLayer *theLayer, const QgsRectangle& referenceExtent ) const +double QgsMapSettings::layerToMapUnits( QgsMapLayer *layer, const QgsRectangle& referenceExtent ) const { - QgsRectangle extent = referenceExtent.isEmpty() ? theLayer->extent() : referenceExtent; + QgsRectangle extent = referenceExtent.isEmpty() ? layer->extent() : referenceExtent; QgsPoint l1( extent.xMinimum(), extent.yMinimum() ); QgsPoint l2( extent.xMaximum(), extent.yMaximum() ); double distLayerUnits = std::sqrt( l1.sqrDist( l2 ) ); - QgsPoint m1 = layerToMapCoordinates( theLayer, l1 ); - QgsPoint m2 = layerToMapCoordinates( theLayer, l2 ); + QgsPoint m1 = layerToMapCoordinates( layer, l1 ); + QgsPoint m2 = layerToMapCoordinates( layer, l2 ); double distMapUnits = std::sqrt( m1.sqrDist( m2 ) ); return distMapUnits / distLayerUnits; } -QgsRectangle QgsMapSettings::layerExtentToOutputExtent( QgsMapLayer* theLayer, QgsRectangle extent ) const +QgsRectangle QgsMapSettings::layerExtentToOutputExtent( QgsMapLayer* layer, QgsRectangle extent ) const { if ( hasCrsTransformEnabled() ) { try { - QgsCoordinateTransform ct = layerTransform( theLayer ); + QgsCoordinateTransform ct = layerTransform( layer ); if ( ct.isValid() ) { QgsDebugMsg( QString( "sourceCrs = " + ct.sourceCrs().authid() ) ); @@ -423,13 +423,13 @@ QgsRectangle QgsMapSettings::layerExtentToOutputExtent( QgsMapLayer* theLayer, Q } -QgsRectangle QgsMapSettings::outputExtentToLayerExtent( QgsMapLayer* theLayer, QgsRectangle extent ) const +QgsRectangle QgsMapSettings::outputExtentToLayerExtent( QgsMapLayer* layer, QgsRectangle extent ) const { if ( hasCrsTransformEnabled() ) { try { - QgsCoordinateTransform ct = layerTransform( theLayer ); + QgsCoordinateTransform ct = layerTransform( layer ); if ( ct.isValid() ) { QgsDebugMsg( QString( "sourceCrs = " + ct.sourceCrs().authid() ) ); @@ -450,13 +450,13 @@ QgsRectangle QgsMapSettings::outputExtentToLayerExtent( QgsMapLayer* theLayer, Q } -QgsPoint QgsMapSettings::layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint point ) const +QgsPoint QgsMapSettings::layerToMapCoordinates( QgsMapLayer* layer, QgsPoint point ) const { if ( hasCrsTransformEnabled() ) { try { - QgsCoordinateTransform ct = layerTransform( theLayer ); + QgsCoordinateTransform ct = layerTransform( layer ); if ( ct.isValid() ) point = ct.transform( point, QgsCoordinateTransform::ForwardTransform ); } @@ -473,13 +473,13 @@ QgsPoint QgsMapSettings::layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint } -QgsRectangle QgsMapSettings::layerToMapCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) const +QgsRectangle QgsMapSettings::layerToMapCoordinates( QgsMapLayer* layer, QgsRectangle rect ) const { if ( hasCrsTransformEnabled() ) { try { - QgsCoordinateTransform ct = layerTransform( theLayer ); + QgsCoordinateTransform ct = layerTransform( layer ); if ( ct.isValid() ) rect = ct.transform( rect, QgsCoordinateTransform::ForwardTransform ); } @@ -496,13 +496,13 @@ QgsRectangle QgsMapSettings::layerToMapCoordinates( QgsMapLayer* theLayer, QgsRe } -QgsPoint QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint point ) const +QgsPoint QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* layer, QgsPoint point ) const { if ( hasCrsTransformEnabled() ) { try { - QgsCoordinateTransform ct = layerTransform( theLayer ); + QgsCoordinateTransform ct = layerTransform( layer ); if ( ct.isValid() ) point = ct.transform( point, QgsCoordinateTransform::ReverseTransform ); } @@ -519,13 +519,13 @@ QgsPoint QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint } -QgsRectangle QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) const +QgsRectangle QgsMapSettings::mapToLayerCoordinates( QgsMapLayer* layer, QgsRectangle rect ) const { if ( hasCrsTransformEnabled() ) { try { - QgsCoordinateTransform ct = layerTransform( theLayer ); + QgsCoordinateTransform ct = layerTransform( layer ); if ( ct.isValid() ) rect = ct.transform( rect, QgsCoordinateTransform::ReverseTransform ); } @@ -599,30 +599,30 @@ QgsRectangle QgsMapSettings::fullExtent() const } -void QgsMapSettings::readXml( QDomNode& theNode ) +void QgsMapSettings::readXml( QDomNode& node ) { // set units - QDomNode mapUnitsNode = theNode.namedItem( QStringLiteral( "units" ) ); + QDomNode mapUnitsNode = node.namedItem( QStringLiteral( "units" ) ); QgsUnitTypes::DistanceUnit units = QgsXmlUtils::readMapUnits( mapUnitsNode.toElement() ); setMapUnits( units ); // set projections flag - QDomNode projNode = theNode.namedItem( QStringLiteral( "projections" ) ); + QDomNode projNode = node.namedItem( QStringLiteral( "projections" ) ); setCrsTransformEnabled( projNode.toElement().text().toInt() ); // set destination CRS QgsCoordinateReferenceSystem srs; - QDomNode srsNode = theNode.namedItem( QStringLiteral( "destinationsrs" ) ); + QDomNode srsNode = node.namedItem( QStringLiteral( "destinationsrs" ) ); srs.readXml( srsNode ); setDestinationCrs( srs ); // set extent - QDomNode extentNode = theNode.namedItem( QStringLiteral( "extent" ) ); + QDomNode extentNode = node.namedItem( QStringLiteral( "extent" ) ); QgsRectangle aoi = QgsXmlUtils::readRectangle( extentNode.toElement() ); setExtent( aoi ); // set rotation - QDomNode rotationNode = theNode.namedItem( QStringLiteral( "rotation" ) ); + QDomNode rotationNode = node.namedItem( QStringLiteral( "rotation" ) ); QString rotationVal = rotationNode.toElement().text(); if ( ! rotationVal.isEmpty() ) { @@ -631,47 +631,47 @@ void QgsMapSettings::readXml( QDomNode& theNode ) } //render map tile - QDomElement renderMapTileElem = theNode.firstChildElement( QStringLiteral( "rendermaptile" ) ); + QDomElement renderMapTileElem = node.firstChildElement( QStringLiteral( "rendermaptile" ) ); if ( !renderMapTileElem.isNull() ) { setFlag( QgsMapSettings::RenderMapTile, renderMapTileElem.text() == QLatin1String( "1" ) ); } - mDatumTransformStore.readXml( theNode ); + mDatumTransformStore.readXml( node ); } -void QgsMapSettings::writeXml( QDomNode& theNode, QDomDocument& theDoc ) +void QgsMapSettings::writeXml( QDomNode& node, QDomDocument& doc ) { // units - theNode.appendChild( QgsXmlUtils::writeMapUnits( mapUnits(), theDoc ) ); + node.appendChild( QgsXmlUtils::writeMapUnits( mapUnits(), doc ) ); // Write current view extents - theNode.appendChild( QgsXmlUtils::writeRectangle( extent(), theDoc ) ); + node.appendChild( QgsXmlUtils::writeRectangle( extent(), doc ) ); // Write current view rotation - QDomElement rotNode = theDoc.createElement( QStringLiteral( "rotation" ) ); + QDomElement rotNode = doc.createElement( QStringLiteral( "rotation" ) ); rotNode.appendChild( - theDoc.createTextNode( qgsDoubleToString( rotation() ) ) + doc.createTextNode( qgsDoubleToString( rotation() ) ) ); - theNode.appendChild( rotNode ); + node.appendChild( rotNode ); // projections enabled - QDomElement projNode = theDoc.createElement( QStringLiteral( "projections" ) ); - projNode.appendChild( theDoc.createTextNode( QString::number( hasCrsTransformEnabled() ) ) ); - theNode.appendChild( projNode ); + QDomElement projNode = doc.createElement( QStringLiteral( "projections" ) ); + projNode.appendChild( doc.createTextNode( QString::number( hasCrsTransformEnabled() ) ) ); + node.appendChild( projNode ); // destination CRS - QDomElement srsNode = theDoc.createElement( QStringLiteral( "destinationsrs" ) ); - theNode.appendChild( srsNode ); - destinationCrs().writeXml( srsNode, theDoc ); + QDomElement srsNode = doc.createElement( QStringLiteral( "destinationsrs" ) ); + node.appendChild( srsNode ); + destinationCrs().writeXml( srsNode, doc ); //render map tile - QDomElement renderMapTileElem = theDoc.createElement( QStringLiteral( "rendermaptile" ) ); - QDomText renderMapTileText = theDoc.createTextNode( testFlag( QgsMapSettings::RenderMapTile ) ? "1" : "0" ); + QDomElement renderMapTileElem = doc.createElement( QStringLiteral( "rendermaptile" ) ); + QDomText renderMapTileText = doc.createTextNode( testFlag( QgsMapSettings::RenderMapTile ) ? "1" : "0" ); renderMapTileElem.appendChild( renderMapTileText ); - theNode.appendChild( renderMapTileElem ); + node.appendChild( renderMapTileElem ); - mDatumTransformStore.writeXml( theNode, theDoc ); + mDatumTransformStore.writeXml( node, doc ); } diff --git a/src/core/qgsmapsettings.h b/src/core/qgsmapsettings.h index 91c495dba67..06bc51458af 100644 --- a/src/core/qgsmapsettings.h +++ b/src/core/qgsmapsettings.h @@ -224,51 +224,51 @@ class CORE_EXPORT QgsMapSettings const QgsMapToPixel& mapToPixel() const { return mMapToPixel; } /** Computes an *estimated* conversion factor between layer and map units: layerUnits * layerToMapUnits = mapUnits - * @param theLayer The layer + * @param layer The layer * @param referenceExtent A reference extent based on which to perform the computation. If not specified, the layer extent is used * @note added in QGIS 2.12 */ - double layerToMapUnits( QgsMapLayer* theLayer, const QgsRectangle& referenceExtent = QgsRectangle() ) const; + double layerToMapUnits( QgsMapLayer* layer, const QgsRectangle& referenceExtent = QgsRectangle() ) const; /** * @brief transform bounding box from layer's CRS to output CRS - * @see layerToMapCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) if you want to transform a rectangle + * @see layerToMapCoordinates( QgsMapLayer* layer, QgsRectangle rect ) if you want to transform a rectangle * @return a bounding box (aligned rectangle) containing the transformed extent */ - QgsRectangle layerExtentToOutputExtent( QgsMapLayer* theLayer, QgsRectangle extent ) const; + QgsRectangle layerExtentToOutputExtent( QgsMapLayer* layer, QgsRectangle extent ) const; /** * @brief transform bounding box from output CRS to layer's CRS - * @see mapToLayerCoordinates( QgsMapLayer* theLayer,QgsRectangle rect ) if you want to transform a rectangle + * @see mapToLayerCoordinates( QgsMapLayer* layer,QgsRectangle rect ) if you want to transform a rectangle * @return a bounding box (aligned rectangle) containing the transformed extent */ - QgsRectangle outputExtentToLayerExtent( QgsMapLayer* theLayer, QgsRectangle extent ) const; + QgsRectangle outputExtentToLayerExtent( QgsMapLayer* layer, QgsRectangle extent ) const; /** * @brief transform point coordinates from layer's CRS to output CRS * @return the transformed point */ - QgsPoint layerToMapCoordinates( QgsMapLayer* theLayer, QgsPoint point ) const; + QgsPoint layerToMapCoordinates( QgsMapLayer* layer, QgsPoint point ) const; /** * @brief transform rectangle from layer's CRS to output CRS * @see layerExtentToOutputExtent() if you want to transform a bounding box * @return the transformed rectangle */ - QgsRectangle layerToMapCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) const; + QgsRectangle layerToMapCoordinates( QgsMapLayer* layer, QgsRectangle rect ) const; /** * @brief transform point coordinates from output CRS to layer's CRS * @return the transformed point */ - QgsPoint mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint point ) const; + QgsPoint mapToLayerCoordinates( QgsMapLayer* layer, QgsPoint point ) const; /** * @brief transform rectangle from output CRS to layer's CRS * @see outputExtentToLayerExtent() if you want to transform a bounding box * @return the transformed rectangle */ - QgsRectangle mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRectangle rect ) const; + QgsRectangle mapToLayerCoordinates( QgsMapLayer* layer, QgsRectangle rect ) const; /** * @brief Return coordinate transform from layer's CRS to destination CRS @@ -282,9 +282,9 @@ class CORE_EXPORT QgsMapSettings /* serialization */ - void readXml( QDomNode& theNode ); + void readXml( QDomNode& node ); - void writeXml( QDomNode& theNode, QDomDocument& theDoc ); + void writeXml( QDomNode& node, QDomDocument& doc ); /** Sets the segmentation tolerance applied when rendering curved geometries @param tolerance the segmentation tolerance*/ diff --git a/src/core/qgsmultirenderchecker.cpp b/src/core/qgsmultirenderchecker.cpp index 70ca517ad6b..c44c0a8cb10 100644 --- a/src/core/qgsmultirenderchecker.cpp +++ b/src/core/qgsmultirenderchecker.cpp @@ -22,9 +22,9 @@ QgsMultiRenderChecker::QgsMultiRenderChecker() { } -void QgsMultiRenderChecker::setControlName( const QString& theName ) +void QgsMultiRenderChecker::setControlName( const QString& name ) { - mControlName = theName; + mControlName = name; } void QgsMultiRenderChecker::setControlPathPrefix( const QString& prefix ) @@ -37,7 +37,7 @@ void QgsMultiRenderChecker::setMapSettings( const QgsMapSettings& mapSettings ) mMapSettings = mapSettings; } -bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int theMismatchCount ) +bool QgsMultiRenderChecker::runTest( const QString& testName, unsigned int mismatchCount ) { bool successful = false; @@ -67,11 +67,11 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th if ( !mRenderedImage.isNull() ) { checker.setRenderedImage( mRenderedImage ); - result = checker.compareImages( theTestName, theMismatchCount, mRenderedImage ); + result = checker.compareImages( testName, mismatchCount, mRenderedImage ); } else { - result = checker.runTest( theTestName, theMismatchCount ); + result = checker.runTest( testName, mismatchCount ); mRenderedImage = checker.renderedImage(); } @@ -128,7 +128,7 @@ QgsCompositionChecker::QgsCompositionChecker() { } -bool QgsCompositionChecker::testComposition( QString &theReport, int page, int pixelDiff ) +bool QgsCompositionChecker::testComposition( QString &checkedReport, int page, int pixelDiff ) { if ( !mComposition ) { @@ -171,7 +171,7 @@ bool QgsCompositionChecker::testComposition( QString &theReport, int page, int p bool testResult = runTest( mTestName, pixelDiff ); - theReport += report(); + checkedReport += report(); return testResult; } diff --git a/src/core/qgsmultirenderchecker.h b/src/core/qgsmultirenderchecker.h index 3e61f788fd3..c8681348f7a 100644 --- a/src/core/qgsmultirenderchecker.h +++ b/src/core/qgsmultirenderchecker.h @@ -61,7 +61,7 @@ class CORE_EXPORT QgsMultiRenderChecker * suffixed) the path to the image will be constructed like this: * controlImagePath + '/' + mControlName + '/' + mControlName + '.png' */ - void setControlName( const QString& theName ); + void setControlName( const QString& name ); void setControlPathPrefix( const QString& prefix ); @@ -84,25 +84,25 @@ class CORE_EXPORT QgsMultiRenderChecker * Set tolerance for color components used by runTest() * Default value is 0. * - * @param theColorTolerance The maximum difference for each color component + * @param colorTolerance The maximum difference for each color component * including alpha to be considered correct. */ - void setColorTolerance( unsigned int theColorTolerance ) { mColorTolerance = theColorTolerance; } + void setColorTolerance( unsigned int colorTolerance ) { mColorTolerance = colorTolerance; } /** * Test using renderer to generate the image to be compared. * - * @param theTestName - to be used as the basis for writing a file to + * @param testName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png * - * @param theMismatchCount - defaults to 0 - the number of pixels that + * @param mismatchCount - defaults to 0 - the number of pixels that * are allowed to be different from the control image. In some cases * rendering may be non-deterministic. This parameter allows you to account * for that by providing a tolerance. * * @note make sure to call setExpectedImage and setMapSettings first */ - bool runTest( const QString& theTestName, unsigned int theMismatchCount = 0 ); + bool runTest( const QString& testName, unsigned int mismatchCount = 0 ); /** * Returns a report for this test @@ -145,7 +145,7 @@ class CORE_EXPORT QgsCompositionChecker : public QgsMultiRenderChecker void setSize( QSize size ) { mSize = size; } - bool testComposition( QString &theReport, int page = 0, int pixelDiff = 0 ); + bool testComposition( QString &checkedReport, int page = 0, int pixelDiff = 0 ); private: QgsCompositionChecker(); //forbidden diff --git a/src/core/qgsnetworkaccessmanager.cpp b/src/core/qgsnetworkaccessmanager.cpp index 13936f88e34..d3c83ad975e 100644 --- a/src/core/qgsnetworkaccessmanager.cpp +++ b/src/core/qgsnetworkaccessmanager.cpp @@ -241,9 +241,9 @@ void QgsNetworkAccessManager::abortRequest() } -QString QgsNetworkAccessManager::cacheLoadControlName( QNetworkRequest::CacheLoadControl theControl ) +QString QgsNetworkAccessManager::cacheLoadControlName( QNetworkRequest::CacheLoadControl control ) { - switch ( theControl ) + switch ( control ) { case QNetworkRequest::AlwaysNetwork: return QStringLiteral( "AlwaysNetwork" ); @@ -259,21 +259,21 @@ QString QgsNetworkAccessManager::cacheLoadControlName( QNetworkRequest::CacheLoa return QStringLiteral( "PreferNetwork" ); } -QNetworkRequest::CacheLoadControl QgsNetworkAccessManager::cacheLoadControlFromName( const QString &theName ) +QNetworkRequest::CacheLoadControl QgsNetworkAccessManager::cacheLoadControlFromName( const QString &name ) { - if ( theName == QLatin1String( "AlwaysNetwork" ) ) + if ( name == QLatin1String( "AlwaysNetwork" ) ) { return QNetworkRequest::AlwaysNetwork; } - else if ( theName == QLatin1String( "PreferNetwork" ) ) + else if ( name == QLatin1String( "PreferNetwork" ) ) { return QNetworkRequest::PreferNetwork; } - else if ( theName == QLatin1String( "PreferCache" ) ) + else if ( name == QLatin1String( "PreferCache" ) ) { return QNetworkRequest::PreferCache; } - else if ( theName == QLatin1String( "AlwaysCache" ) ) + else if ( name == QLatin1String( "AlwaysCache" ) ) { return QNetworkRequest::AlwaysCache; } diff --git a/src/core/qgsnetworkaccessmanager.h b/src/core/qgsnetworkaccessmanager.h index 06b499fd1c6..8f373905588 100644 --- a/src/core/qgsnetworkaccessmanager.h +++ b/src/core/qgsnetworkaccessmanager.h @@ -73,10 +73,10 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes ); //! Get name for QNetworkRequest::CacheLoadControl - static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl theControl ); + static QString cacheLoadControlName( QNetworkRequest::CacheLoadControl control ); //! Get QNetworkRequest::CacheLoadControl from name - static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &theName ); + static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &name ); //! Setup the NAM according to the user's settings void setupDefaultProxyAndCache(); diff --git a/src/core/qgsowsconnection.cpp b/src/core/qgsowsconnection.cpp index 711d6acdcfc..d4476ee6a60 100644 --- a/src/core/qgsowsconnection.cpp +++ b/src/core/qgsowsconnection.cpp @@ -35,11 +35,11 @@ #include #include -QgsOwsConnection::QgsOwsConnection( const QString & theService, const QString & theConnName ) - : mConnName( theConnName ) - , mService( theService ) +QgsOwsConnection::QgsOwsConnection( const QString & service, const QString & connName ) + : mConnName( connName ) + , mService( service ) { - QgsDebugMsg( "theConnName = " + theConnName ); + QgsDebugMsg( "theConnName = " + connName ); QSettings settings; @@ -97,28 +97,28 @@ QgsDataSourceUri QgsOwsConnection::uri() const return mUri; } -QStringList QgsOwsConnection::connectionList( const QString & theService ) +QStringList QgsOwsConnection::connectionList( const QString & service ) { QSettings settings; - settings.beginGroup( "/Qgis/connections-" + theService.toLower() ); + settings.beginGroup( "/Qgis/connections-" + service.toLower() ); return settings.childGroups(); } -QString QgsOwsConnection::selectedConnection( const QString & theService ) +QString QgsOwsConnection::selectedConnection( const QString & service ) { QSettings settings; - return settings.value( "/Qgis/connections-" + theService.toLower() + "/selected" ).toString(); + return settings.value( "/Qgis/connections-" + service.toLower() + "/selected" ).toString(); } -void QgsOwsConnection::setSelectedConnection( const QString & theService, const QString & name ) +void QgsOwsConnection::setSelectedConnection( const QString & service, const QString & name ) { QSettings settings; - settings.setValue( "/Qgis/connections-" + theService.toLower() + "/selected", name ); + settings.setValue( "/Qgis/connections-" + service.toLower() + "/selected", name ); } -void QgsOwsConnection::deleteConnection( const QString & theService, const QString & name ) +void QgsOwsConnection::deleteConnection( const QString & service, const QString & name ) { QSettings settings; - settings.remove( "/Qgis/connections-" + theService.toLower() + '/' + name ); - settings.remove( "/Qgis/" + theService + '/' + name ); + settings.remove( "/Qgis/connections-" + service.toLower() + '/' + name ); + settings.remove( "/Qgis/" + service + '/' + name ); } diff --git a/src/core/qgsowsconnection.h b/src/core/qgsowsconnection.h index a0703f74cd7..cf1babb27c0 100644 --- a/src/core/qgsowsconnection.h +++ b/src/core/qgsowsconnection.h @@ -39,21 +39,21 @@ class CORE_EXPORT QgsOwsConnection : public QObject /** * Constructor - * @param theService service name: WMS,WFS,WCS - * @param theConnName connection name + * @param service service name: WMS,WFS,WCS + * @param connName connection name */ - QgsOwsConnection( const QString & theService, const QString & theConnName ); + QgsOwsConnection( const QString & service, const QString & connName ); //! Returns the list of connections for the specified service - static QStringList connectionList( const QString & theService ); + static QStringList connectionList( const QString & service ); //! Deletes the connection for the specified service with the specified name - static void deleteConnection( const QString & theService, const QString & name ); + static void deleteConnection( const QString & service, const QString & name ); //! Retrieves the selected connection for the specified service - static QString selectedConnection( const QString & theService ); + static QString selectedConnection( const QString & service ); //! Marks the specified connection for the specified service as selected - static void setSelectedConnection( const QString & theService, const QString & name ); + static void setSelectedConnection( const QString & service, const QString & name ); QString mConnName; //! Returns the connection uri diff --git a/src/core/qgspoint.cpp b/src/core/qgspoint.cpp index 01db65cd9a6..21d46183b75 100644 --- a/src/core/qgspoint.cpp +++ b/src/core/qgspoint.cpp @@ -106,8 +106,8 @@ QgsVector QgsVector::perpVector() const double QgsVector::angle() const { - double theAngle = atan2( mY, mX ); - return theAngle < 0.0 ? theAngle + 2.0 * M_PI : theAngle; + double angle = atan2( mY, mX ); + return angle < 0.0 ? angle + 2.0 * M_PI : angle; } double QgsVector::angle( QgsVector v ) const @@ -117,9 +117,9 @@ double QgsVector::angle( QgsVector v ) const QgsVector QgsVector::rotateBy( double rot ) const { - double theAngle = atan2( mY, mX ) + rot; + double angle = atan2( mY, mX ) + rot; double len = length(); - return QgsVector( len * cos( theAngle ), len * sin( theAngle ) ); + return QgsVector( len * cos( angle ), len * sin( angle ) ); } QgsVector QgsVector::normalized() const @@ -169,14 +169,14 @@ QString QgsPoint::toString() const return rep; } -QString QgsPoint::toString( int thePrecision ) const +QString QgsPoint::toString( int precision ) const { - QString x = qIsFinite( m_x ) ? QString::number( m_x, 'f', thePrecision ) : QObject::tr( "infinite" ); - QString y = qIsFinite( m_y ) ? QString::number( m_y, 'f', thePrecision ) : QObject::tr( "infinite" ); + QString x = qIsFinite( m_x ) ? QString::number( m_x, 'f', precision ) : QObject::tr( "infinite" ); + QString y = qIsFinite( m_y ) ? QString::number( m_y, 'f', precision ) : QObject::tr( "infinite" ); return QStringLiteral( "%1,%2" ).arg( x, y ); } -QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffix, const bool padded ) const +QString QgsPoint::toDegreesMinutesSeconds( int precision, const bool useSuffix, const bool padded ) const { //first, limit longitude to -360 to 360 degree range double myWrappedX = fmod( m_x, 360.0 ); @@ -213,7 +213,7 @@ QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffi double mySecondsY = double( myFloatMinutesY - myIntMinutesY ) * 60; //make sure rounding to specified precision doesn't create seconds >= 60 - if ( qRound( mySecondsX * pow( 10.0, thePrecision ) ) >= 60 * pow( 10.0, thePrecision ) ) + if ( qRound( mySecondsX * pow( 10.0, precision ) ) >= 60 * pow( 10.0, precision ) ) { mySecondsX = qMax( mySecondsX - 60, 0.0 ); myIntMinutesX++; @@ -223,7 +223,7 @@ QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffi myDegreesX++; } } - if ( qRound( mySecondsY * pow( 10.0, thePrecision ) ) >= 60 * pow( 10.0, thePrecision ) ) + if ( qRound( mySecondsY * pow( 10.0, precision ) ) >= 60 * pow( 10.0, precision ) ) { mySecondsY = qMax( mySecondsY - 60, 0.0 ); myIntMinutesY++; @@ -256,18 +256,18 @@ QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffi } //check if coordinate is all zeros for the specified precision, and if so, //remove the sign and hemisphere strings - if ( myDegreesX == 0 && myIntMinutesX == 0 && qRound( mySecondsX * pow( 10.0, thePrecision ) ) == 0 ) + if ( myDegreesX == 0 && myIntMinutesX == 0 && qRound( mySecondsX * pow( 10.0, precision ) ) == 0 ) { myXSign = QString(); myXHemisphere = QString(); } - if ( myDegreesY == 0 && myIntMinutesY == 0 && qRound( mySecondsY * pow( 10.0, thePrecision ) ) == 0 ) + if ( myDegreesY == 0 && myIntMinutesY == 0 && qRound( mySecondsY * pow( 10.0, precision ) ) == 0 ) { myYSign = QString(); myYHemisphere = QString(); } //also remove directional prefix from 180 degree longitudes - if ( myDegreesX == 180 && myIntMinutesX == 0 && qRound( mySecondsX * pow( 10.0, thePrecision ) ) == 0 ) + if ( myDegreesX == 180 && myIntMinutesX == 0 && qRound( mySecondsX * pow( 10.0, precision ) ) == 0 ) { myXHemisphere = QString(); } @@ -275,9 +275,9 @@ QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffi QString myMinutesX = padded ? QStringLiteral( "%1" ).arg( myIntMinutesX, 2, 10, QChar( '0' ) ) : QString::number( myIntMinutesX ); QString myMinutesY = padded ? QStringLiteral( "%1" ).arg( myIntMinutesY, 2, 10, QChar( '0' ) ) : QString::number( myIntMinutesY ); //pad seconds with leading digits if required - int digits = 2 + ( thePrecision == 0 ? 0 : 1 + thePrecision ); //1 for decimal place if required - QString myStrSecondsX = padded ? QStringLiteral( "%1" ).arg( mySecondsX, digits, 'f', thePrecision, QChar( '0' ) ) : QString::number( mySecondsX, 'f', thePrecision ); - QString myStrSecondsY = padded ? QStringLiteral( "%1" ).arg( mySecondsY, digits, 'f', thePrecision, QChar( '0' ) ) : QString::number( mySecondsY, 'f', thePrecision ); + int digits = 2 + ( precision == 0 ? 0 : 1 + precision ); //1 for decimal place if required + QString myStrSecondsX = padded ? QStringLiteral( "%1" ).arg( mySecondsX, digits, 'f', precision, QChar( '0' ) ) : QString::number( mySecondsX, 'f', precision ); + QString myStrSecondsY = padded ? QStringLiteral( "%1" ).arg( mySecondsY, digits, 'f', precision, QChar( '0' ) ) : QString::number( mySecondsY, 'f', precision ); QString rep = myXSign + QString::number( myDegreesX ) + QChar( 176 ) + myMinutesX + QChar( 0x2032 ) + @@ -290,7 +290,7 @@ QString QgsPoint::toDegreesMinutesSeconds( int thePrecision, const bool useSuffi return rep; } -QString QgsPoint::toDegreesMinutes( int thePrecision, const bool useSuffix, const bool padded ) const +QString QgsPoint::toDegreesMinutes( int precision, const bool useSuffix, const bool padded ) const { //first, limit longitude to -360 to 360 degree range double myWrappedX = fmod( m_x, 360.0 ); @@ -311,12 +311,12 @@ QString QgsPoint::toDegreesMinutes( int thePrecision, const bool useSuffix, cons double myFloatMinutesY = double(( qAbs( m_y ) - myDegreesY ) * 60 ); //make sure rounding to specified precision doesn't create minutes >= 60 - if ( qRound( myFloatMinutesX * pow( 10.0, thePrecision ) ) >= 60 * pow( 10.0, thePrecision ) ) + if ( qRound( myFloatMinutesX * pow( 10.0, precision ) ) >= 60 * pow( 10.0, precision ) ) { myFloatMinutesX = qMax( myFloatMinutesX - 60, 0.0 ); myDegreesX++; } - if ( qRound( myFloatMinutesY * pow( 10.0, thePrecision ) ) >= 60 * pow( 10.0, thePrecision ) ) + if ( qRound( myFloatMinutesY * pow( 10.0, precision ) ) >= 60 * pow( 10.0, precision ) ) { myFloatMinutesY = qMax( myFloatMinutesY - 60, 0.0 ); myDegreesY++; @@ -344,26 +344,26 @@ QString QgsPoint::toDegreesMinutes( int thePrecision, const bool useSuffix, cons } //check if coordinate is all zeros for the specified precision, and if so, //remove the sign and hemisphere strings - if ( myDegreesX == 0 && qRound( myFloatMinutesX * pow( 10.0, thePrecision ) ) == 0 ) + if ( myDegreesX == 0 && qRound( myFloatMinutesX * pow( 10.0, precision ) ) == 0 ) { myXSign = QString(); myXHemisphere = QString(); } - if ( myDegreesY == 0 && qRound( myFloatMinutesY * pow( 10.0, thePrecision ) ) == 0 ) + if ( myDegreesY == 0 && qRound( myFloatMinutesY * pow( 10.0, precision ) ) == 0 ) { myYSign = QString(); myYHemisphere = QString(); } //also remove directional prefix from 180 degree longitudes - if ( myDegreesX == 180 && qRound( myFloatMinutesX * pow( 10.0, thePrecision ) ) == 0 ) + if ( myDegreesX == 180 && qRound( myFloatMinutesX * pow( 10.0, precision ) ) == 0 ) { myXHemisphere = QString(); } //pad minutes with leading digits if required - int digits = 2 + ( thePrecision == 0 ? 0 : 1 + thePrecision ); //1 for decimal place if required - QString myStrMinutesX = padded ? QStringLiteral( "%1" ).arg( myFloatMinutesX, digits, 'f', thePrecision, QChar( '0' ) ) : QString::number( myFloatMinutesX, 'f', thePrecision ); - QString myStrMinutesY = padded ? QStringLiteral( "%1" ).arg( myFloatMinutesY, digits, 'f', thePrecision, QChar( '0' ) ) : QString::number( myFloatMinutesY, 'f', thePrecision ); + int digits = 2 + ( precision == 0 ? 0 : 1 + precision ); //1 for decimal place if required + QString myStrMinutesX = padded ? QStringLiteral( "%1" ).arg( myFloatMinutesX, digits, 'f', precision, QChar( '0' ) ) : QString::number( myFloatMinutesX, 'f', precision ); + QString myStrMinutesY = padded ? QStringLiteral( "%1" ).arg( myFloatMinutesY, digits, 'f', precision, QChar( '0' ) ) : QString::number( myFloatMinutesY, 'f', precision ); QString rep = myXSign + QString::number( myDegreesX ) + QChar( 176 ) + myStrMinutesX + QChar( 0x2032 ) + diff --git a/src/core/qgspoint.h b/src/core/qgspoint.h index 293c7c5957b..bf521c10016 100644 --- a/src/core/qgspoint.h +++ b/src/core/qgspoint.h @@ -236,29 +236,29 @@ class CORE_EXPORT QgsPoint QString toString() const; //! As above but with precision for string representation of a point - QString toString( int thePrecision ) const; + QString toString( int precision ) const; /** Return a string representation as degrees minutes seconds. * Its up to the calling function to ensure that this point can * be meaningfully represented in this form. - * @param thePrecision number of decimal points to use for seconds + * @param precision number of decimal points to use for seconds * @param useSuffix set to true to include a direction suffix (e.g., 'N'), * set to false to use a "-" prefix for west and south coordinates * @param padded set to true to force minutes and seconds to use two decimals, * e.g., '05' instead of '5'. */ - QString toDegreesMinutesSeconds( int thePrecision, const bool useSuffix = true, const bool padded = false ) const; + QString toDegreesMinutesSeconds( int precision, const bool useSuffix = true, const bool padded = false ) const; /** Return a string representation as degrees minutes. * Its up to the calling function to ensure that this point can * be meaningfully represented in this form. - * @param thePrecision number of decimal points to use for minutes + * @param precision number of decimal points to use for minutes * @param useSuffix set to true to include a direction suffix (e.g., 'N'), * set to false to use a "-" prefix for west and south coordinates * @param padded set to true to force minutes to use two decimals, * e.g., '05' instead of '5'. */ - QString toDegreesMinutes( int thePrecision, const bool useSuffix = true, const bool padded = false ) const; + QString toDegreesMinutes( int precision, const bool useSuffix = true, const bool padded = false ) const; /** Return the well known text representation for the point. diff --git a/src/core/qgsproject.h b/src/core/qgsproject.h index 26b21ff69b5..0cc28746aca 100644 --- a/src/core/qgsproject.h +++ b/src/core/qgsproject.h @@ -565,7 +565,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * The layersAdded() and layerWasAdded() signals will always be emitted. * The legendLayersAdded() signal is emitted only if addToLegend is true. * - * @param theMapLayers A list of layer which should be added to the registry + * @param mapLayers A list of layer which should be added to the registry * @param addToLegend If true (by default), the layers will be added to the * legend and to the main canvas. If you have a private * layer you can set this parameter to false to hide it. @@ -583,7 +583,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * @note added in QGIS 1.8 * @see addMapLayer() */ - QList addMapLayers( const QList& theMapLayers, + QList addMapLayers( const QList& mapLayers, bool addToLegend = true, bool takeOwnership = true ); @@ -596,7 +596,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * If you are adding multiple layers at once, you should use * addMapLayers() instead. * - * @param theMapLayer A layer to add to the registry + * @param mapLayer A layer to add to the registry * @param addToLegend If true (by default), the layer will be added to the * legend and to the main canvas. If you have a private * layer you can set this parameter to false to hide it. @@ -614,7 +614,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera * take ownership * @see addMapLayers() */ - QgsMapLayer* addMapLayer( QgsMapLayer * theMapLayer, bool addToLegend = true, bool takeOwnership = true ); + QgsMapLayer* addMapLayer( QgsMapLayer * mapLayer, bool addToLegend = true, bool takeOwnership = true ); /** * @brief diff --git a/src/core/qgsprojectfiletransform.cpp b/src/core/qgsprojectfiletransform.cpp index cfed90cc9cd..a6f2430eeda 100644 --- a/src/core/qgsprojectfiletransform.cpp +++ b/src/core/qgsprojectfiletransform.cpp @@ -339,19 +339,19 @@ void QgsProjectFileTransform::transform0110to1000() QString providerKey = providerNode.toElement().text(); //create the layer to get the provider for int->fieldName conversion - QgsVectorLayer* theLayer = new QgsVectorLayer( dataSource, QLatin1String( "" ), providerKey, false ); - if ( !theLayer->isValid() ) + QgsVectorLayer* layer = new QgsVectorLayer( dataSource, QLatin1String( "" ), providerKey, false ); + if ( !layer->isValid() ) { - delete theLayer; + delete layer; return; } - QgsVectorDataProvider* theProvider = theLayer->dataProvider(); - if ( !theProvider ) + QgsVectorDataProvider* provider = layer->dataProvider(); + if ( !provider ) { return; } - QgsFields theFields = theProvider->fields(); + QgsFields fields = provider->fields(); //read classificationfield QDomNodeList classificationFieldList = layerElem.elementsByTagName( QStringLiteral( "classificationfield" ) ); @@ -359,9 +359,9 @@ void QgsProjectFileTransform::transform0110to1000() { QDomElement classificationFieldElem = classificationFieldList.at( j ).toElement(); int fieldNumber = classificationFieldElem.text().toInt(); - if ( fieldNumber >= 0 && fieldNumber < theFields.count() ) + if ( fieldNumber >= 0 && fieldNumber < fields.count() ) { - QDomText fieldName = mDom.createTextNode( theFields.at( fieldNumber ).name() ); + QDomText fieldName = mDom.createTextNode( fields.at( fieldNumber ).name() ); QDomNode nameNode = classificationFieldElem.firstChild(); classificationFieldElem.replaceChild( fieldName, nameNode ); } diff --git a/src/core/qgsproviderregistry.cpp b/src/core/qgsproviderregistry.cpp index 9522c991a83..6e7eafacb2f 100644 --- a/src/core/qgsproviderregistry.cpp +++ b/src/core/qgsproviderregistry.cpp @@ -37,7 +37,7 @@ typedef QString providerkey_t(); typedef QString description_t(); typedef bool isprovider_t(); typedef QString fileVectorFilters_t(); -typedef void buildsupportedrasterfilefilter_t( QString & theFileFiltersString ); +typedef void buildsupportedrasterfilefilter_t( QString & fileFiltersString ); typedef QString databaseDrivers_t(); typedef QString directoryDrivers_t(); typedef QString protocolDrivers_t(); diff --git a/src/core/qgsrectangle.cpp b/src/core/qgsrectangle.cpp index f99abf27054..640cc84a2a7 100644 --- a/src/core/qgsrectangle.cpp +++ b/src/core/qgsrectangle.cpp @@ -286,17 +286,17 @@ QString QgsRectangle::toString( bool automaticPrecision ) const // overloaded version of above fn to allow precision to be set // Return a string representation of the rectangle with high precision -QString QgsRectangle::toString( int thePrecision ) const +QString QgsRectangle::toString( int precision ) const { QString rep; if ( isEmpty() ) rep = QStringLiteral( "Empty" ); else rep = QStringLiteral( "%1,%2 : %3,%4" ) - .arg( xmin, 0, 'f', thePrecision ) - .arg( ymin, 0, 'f', thePrecision ) - .arg( xmax, 0, 'f', thePrecision ) - .arg( ymax, 0, 'f', thePrecision ); + .arg( xmin, 0, 'f', precision ) + .arg( ymin, 0, 'f', precision ) + .arg( xmax, 0, 'f', precision ) + .arg( ymax, 0, 'f', precision ); QgsDebugMsgLevel( QString( "Extents : %1" ).arg( rep ), 4 ); diff --git a/src/core/qgsrectangle.h b/src/core/qgsrectangle.h index 8c6fa6fe2e6..68a8f4cc7c4 100644 --- a/src/core/qgsrectangle.h +++ b/src/core/qgsrectangle.h @@ -118,7 +118,7 @@ class CORE_EXPORT QgsRectangle //! returns string representation of form xmin,ymin xmax,ymax QString toString( bool automaticPrecision = false ) const; //! overloaded toString that allows precision of numbers to be set - QString toString( int thePrecision ) const; + QString toString( int precision ) const; //! returns rectangle as a polygon QString asPolygon() const; diff --git a/src/core/qgsrenderchecker.cpp b/src/core/qgsrenderchecker.cpp index 08215a3b795..1e3c3fdc064 100644 --- a/src/core/qgsrenderchecker.cpp +++ b/src/core/qgsrenderchecker.cpp @@ -52,24 +52,24 @@ QString QgsRenderChecker::controlImagePath() const return myControlImageDir; } -void QgsRenderChecker::setControlName( const QString &theName ) +void QgsRenderChecker::setControlName( const QString &name ) { - mControlName = theName; - mExpectedImageFile = controlImagePath() + theName + '/' + mControlPathSuffix + theName + ".png"; + mControlName = name; + mExpectedImageFile = controlImagePath() + name + '/' + mControlPathSuffix + name + ".png"; } -void QgsRenderChecker::setControlPathSuffix( const QString& theName ) +void QgsRenderChecker::setControlPathSuffix( const QString& name ) { - if ( !theName.isEmpty() ) - mControlPathSuffix = theName + '/'; + if ( !name.isEmpty() ) + mControlPathSuffix = name + '/'; else mControlPathSuffix.clear(); } -QString QgsRenderChecker::imageToHash( const QString& theImageFile ) +QString QgsRenderChecker::imageToHash( const QString& imageFile ) { QImage myImage; - myImage.load( theImageFile ); + myImage.load( imageFile ); QByteArray myByteArray; QBuffer myBuffer( &myByteArray ); myImage.save( &myBuffer, "PNG" ); @@ -105,7 +105,7 @@ void QgsRenderChecker::drawBackground( QImage* image ) p.end(); } -bool QgsRenderChecker::isKnownAnomaly( const QString& theDiffImageFile ) +bool QgsRenderChecker::isKnownAnomaly( const QString& diffImageFile ) { QString myControlImageDir = controlImagePath() + mControlName + '/'; QDir myDirectory = QDir( myControlImageDir ); @@ -117,7 +117,7 @@ bool QgsRenderChecker::isKnownAnomaly( const QString& theDiffImageFile ) //all files except the control file myList.removeAt( myList.indexOf( QFileInfo( mExpectedImageFile ).fileName() ) ); - QString myImageHash = imageToHash( theDiffImageFile ); + QString myImageHash = imageToHash( diffImageFile ); for ( int i = 0; i < myList.size(); ++i ) @@ -132,7 +132,7 @@ bool QgsRenderChecker::isKnownAnomaly( const QString& theDiffImageFile ) .arg( myFile, myAnomalyHash ); myHashMessage += QStringLiteral( "  matches %1 (hash %2)" ) - .arg( theDiffImageFile, + .arg( diffImageFile, myImageHash ); //foo CDash emitDashMessage( QStringLiteral( "Anomaly check" ), QgsDartMeasurement::Text, myHashMessage ); @@ -165,8 +165,8 @@ void QgsRenderChecker::emitDashMessage( const QString& name, QgsDartMeasurement: emitDashMessage( QgsDartMeasurement( name, type, value ) ); } -bool QgsRenderChecker::runTest( const QString& theTestName, - unsigned int theMismatchCount ) +bool QgsRenderChecker::runTest( const QString& testName, + unsigned int mismatchCount ) { if ( mExpectedImageFile.isEmpty() ) { @@ -213,7 +213,7 @@ bool QgsRenderChecker::runTest( const QString& theTestName, // Save the pixmap to disk so the user can make a // visual assessment if needed // - mRenderedImageFile = QDir::tempPath() + '/' + theTestName + "_result.png"; + mRenderedImageFile = QDir::tempPath() + '/' + testName + "_result.png"; myImage.setDotsPerMeterX( myExpectedImage.dotsPerMeterX() ); myImage.setDotsPerMeterY( myExpectedImage.dotsPerMeterY() ); @@ -229,7 +229,7 @@ bool QgsRenderChecker::runTest( const QString& theTestName, //create a world file to go with the image... - QFile wldFile( QDir::tempPath() + '/' + theTestName + "_result.wld" ); + QFile wldFile( QDir::tempPath() + '/' + testName + "_result.wld" ); if ( wldFile.open( QIODevice::WriteOnly | QIODevice::Truncate ) ) { QgsRectangle r = mMapSettings.extent(); @@ -242,13 +242,13 @@ bool QgsRenderChecker::runTest( const QString& theTestName, qgsDoubleToString( r.yMaximum() - mMapSettings.mapUnitsPerPixel() / 2.0 ) ); } - return compareImages( theTestName, theMismatchCount ); + return compareImages( testName, mismatchCount ); } -bool QgsRenderChecker::compareImages( const QString& theTestName, - unsigned int theMismatchCount, - const QString& theRenderedImageFile ) +bool QgsRenderChecker::compareImages( const QString& testName, + unsigned int mismatchCount, + const QString& renderedImageFile ) { if ( mExpectedImageFile.isEmpty() ) { @@ -259,9 +259,9 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, "Image File not set.\n"; return false; } - if ( ! theRenderedImageFile.isEmpty() ) + if ( ! renderedImageFile.isEmpty() ) { - mRenderedImageFile = theRenderedImageFile; + mRenderedImageFile = renderedImageFile; #ifdef Q_OS_WIN mRenderedImageFile = mRenderedImageFile.replace( '\\', '/' ); #endif @@ -294,7 +294,7 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, QImage myDifferenceImage( myExpectedImage.width(), myExpectedImage.height(), QImage::Format_RGB32 ); - QString myDiffImageFile = QDir::tempPath() + '/' + theTestName + "_result_diff.png"; + QString myDiffImageFile = QDir::tempPath() + '/' + testName + "_result_diff.png"; myDifferenceImage.fill( qRgb( 152, 219, 249 ) ); //check for mask @@ -324,7 +324,7 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, "Expected size: %2 w x %3 h (%4 pixels)
" "Actual size: %5 w x %6 h (%7 pixels)" "" ) - .arg( theTestName ) + .arg( testName ) .arg( myExpectedImage.width() ).arg( myExpectedImage.height() ).arg( mMatchTarget ) .arg( myResultImage.width() ).arg( myResultImage.height() ).arg( myPixelCount ); mReport += QString( "\n" @@ -352,7 +352,7 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, "" "\n" "\n" ) - .arg( theTestName, + .arg( testName, myDiffImageFile, mRenderedImageFile, mExpectedImageFile ) @@ -367,8 +367,8 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, // // To get the images into CDash // - emitDashMessage( "Rendered Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, mRenderedImageFile ); - emitDashMessage( "Expected Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, mExpectedImageFile ); + emitDashMessage( "Rendered Image " + testName + prefix, QgsDartMeasurement::ImagePng, mRenderedImageFile ); + emitDashMessage( "Expected Image " + testName + prefix, QgsDartMeasurement::ImagePng, mExpectedImageFile ); // // Put the same info to debug too @@ -379,13 +379,13 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, if ( mMatchTarget != myPixelCount ) { - qDebug( "Test image and result image for %s are different dimensions", theTestName.toLocal8Bit().constData() ); + qDebug( "Test image and result image for %s are different dimensions", testName.toLocal8Bit().constData() ); if ( qAbs( myExpectedImage.width() - myResultImage.width() ) > mMaxSizeDifferenceX || qAbs( myExpectedImage.height() - myResultImage.height() ) > mMaxSizeDifferenceY ) { mReport += QLatin1String( "" ); - mReport += "Expected image and result image for " + theTestName + " are different dimensions - FAILING!"; + mReport += "Expected image and result image for " + testName + " are different dimensions - FAILING!"; mReport += QLatin1String( "" ); mReport += myImagesString; delete maskImage; @@ -394,7 +394,7 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, else { mReport += QLatin1String( "" ); - mReport += "Expected image and result image for " + theTestName + " are different dimensions, but within tolerance"; + mReport += "Expected image and result image for " + testName + " are different dimensions, but within tolerance"; mReport += QLatin1String( "" ); } } @@ -453,29 +453,29 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, //save the diff image to disk // myDifferenceImage.save( myDiffImageFile ); - emitDashMessage( "Difference Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, myDiffImageFile ); + emitDashMessage( "Difference Image " + testName + prefix, QgsDartMeasurement::ImagePng, myDiffImageFile ); delete maskImage; // // Send match result to debug // - qDebug( "%d/%d pixels mismatched (%d allowed)", mMismatchCount, mMatchTarget, theMismatchCount ); + qDebug( "%d/%d pixels mismatched (%d allowed)", mMismatchCount, mMatchTarget, mismatchCount ); // // Send match result to report // mReport += QStringLiteral( "%1/%2 pixels mismatched (allowed threshold: %3, allowed color component tolerance: %4)" ) - .arg( mMismatchCount ).arg( mMatchTarget ).arg( theMismatchCount ).arg( mColorTolerance ); + .arg( mMismatchCount ).arg( mMatchTarget ).arg( mismatchCount ).arg( mColorTolerance ); // // And send it to CDash // emitDashMessage( QStringLiteral( "Mismatch Count" ), QgsDartMeasurement::Integer, QStringLiteral( "%1/%2" ).arg( mMismatchCount ).arg( mMatchTarget ) ); - if ( mMismatchCount <= theMismatchCount ) + if ( mMismatchCount <= mismatchCount ) { mReport += QLatin1String( "\n" ); - mReport += "Test image and result image for " + theTestName + " are matched
"; + mReport += "Test image and result image for " + testName + " are matched
"; mReport += QLatin1String( "" ); if ( mElapsedTimeTarget != 0 && mElapsedTimeTarget < mElapsedTime ) { @@ -512,7 +512,7 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, "scripts/generate_test_mask_image.py '" + mExpectedImageFile + "' '" + mRenderedImageFile + "'\n" ); mReport += QLatin1String( "\n" ); - mReport += "Test image and result image for " + theTestName + " are mismatched
"; + mReport += "Test image and result image for " + testName + " are mismatched
"; mReport += QLatin1String( "" ); mReport += myImagesString; return false; diff --git a/src/core/qgsrenderchecker.h b/src/core/qgsrenderchecker.h index c650a862a38..54a7c7c4e45 100644 --- a/src/core/qgsrenderchecker.h +++ b/src/core/qgsrenderchecker.h @@ -53,25 +53,25 @@ class CORE_EXPORT QgsRenderChecker unsigned int matchTarget() { return mMatchTarget; } //only records time for actual render part int elapsedTime() { return mElapsedTime; } - void setElapsedTimeTarget( int theTarget ) { mElapsedTimeTarget = theTarget; } + void setElapsedTimeTarget( int target ) { mElapsedTimeTarget = target; } /** Base directory name for the control image (with control image path * suffixed) the path to the image will be constructed like this: * controlImagePath + '/' + mControlName + '/' + mControlName + '.png' */ - void setControlName( const QString &theName ); + void setControlName( const QString &name ); /** Prefix where the control images are kept. * This will be appended to controlImagePath */ - void setControlPathPrefix( const QString &theName ) { mControlPathPrefix = theName + '/'; } + void setControlPathPrefix( const QString &name ) { mControlPathPrefix = name + '/'; } - void setControlPathSuffix( const QString& theName ); + void setControlPathSuffix( const QString& name ); //! Get an md5 hash that uniquely identifies an image - QString imageToHash( const QString& theImageFile ); + QString imageToHash( const QString& imageFile ); - void setRenderedImage( const QString& theImageFileName ) { mRenderedImageFile = theImageFileName; } + void setRenderedImage( const QString& imageFileName ) { mRenderedImageFile = imageFileName; } /** * The path of the rendered image can be retrieved through that method. @@ -86,11 +86,11 @@ class CORE_EXPORT QgsRenderChecker /** Set tolerance for color components used by runTest() and compareImages(). * Default value is 0. - * @param theColorTolerance is maximum difference for each color component + * @param colorTolerance is maximum difference for each color component * including alpha to be considered correct. * @note added in 2.1 */ - void setColorTolerance( unsigned int theColorTolerance ) { mColorTolerance = theColorTolerance; } + void setColorTolerance( unsigned int colorTolerance ) { mColorTolerance = colorTolerance; } /** Sets the largest allowable difference in size between the rendered and the expected image. * @param xTolerance x tolerance in pixels @@ -101,28 +101,28 @@ class CORE_EXPORT QgsRenderChecker /** * Test using renderer to generate the image to be compared. - * @param theTestName - to be used as the basis for writing a file to + * @param testName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png - * @param theMismatchCount - defaults to 0 - the number of pixels that + * @param mismatchCount - defaults to 0 - the number of pixels that * are allowed to be different from the control image. In some cases * rendering may be non-deterministic. This parameter allows you to account * for that by providing a tolerance. * @note make sure to call setExpectedImage and setMapRenderer first */ - bool runTest( const QString& theTestName, unsigned int theMismatchCount = 0 ); + bool runTest( const QString& testName, unsigned int mismatchCount = 0 ); /** * Test using two arbitrary images (map renderer will not be used) - * @param theTestName - to be used as the basis for writing a file to + * @param testName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png - * @param theMismatchCount - defaults to 0 - the number of pixels that + * @param mismatchCount - defaults to 0 - the number of pixels that * are allowed to be different from the control image. In some cases * rendering may be non-deterministic. This parameter allows you to account * for that by providing a tolerance. - * @param theRenderedImageFile to optionally override the output filename + * @param renderedImageFile to optionally override the output filename * @note: make sure to call setExpectedImage and setRenderedImage first. */ - bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, const QString& theRenderedImageFile = "" ); + bool compareImages( const QString& testName, unsigned int mismatchCount = 0, const QString& renderedImageFile = "" ); /** Get a list of all the anomalies. An anomaly is a rendered difference * file where there is some red pixel content (indicating a render check @@ -131,7 +131,7 @@ class CORE_EXPORT QgsRenderChecker * acceptable. * @return a bool indicating if the diff matched one of the anomaly files */ - bool isKnownAnomaly( const QString& theDiffImageFile ); + bool isKnownAnomaly( const QString& diffImageFile ); /** Draws a checkboard pattern for image backgrounds, so that transparency is visible * without requiring a transparent background for the image diff --git a/src/core/qgsvectordataprovider.cpp b/src/core/qgsvectordataprovider.cpp index 102310f258a..ca26447394f 100644 --- a/src/core/qgsvectordataprovider.cpp +++ b/src/core/qgsvectordataprovider.cpp @@ -299,10 +299,10 @@ QMap QgsVectorDataProvider::fieldNameMap() const { QMap resultMap; - QgsFields theFields = fields(); - for ( int i = 0; i < theFields.count(); ++i ) + QgsFields fieldsCopy = fields(); + for ( int i = 0; i < fieldsCopy.count(); ++i ) { - resultMap.insert( theFields.at( i ).name(), i ); + resultMap.insert( fieldsCopy.at( i ).name(), i ); } return resultMap; diff --git a/src/core/qgsvectorfilewriter.cpp b/src/core/qgsvectorfilewriter.cpp index 948d55cd36f..1b650e09222 100644 --- a/src/core/qgsvectorfilewriter.cpp +++ b/src/core/qgsvectorfilewriter.cpp @@ -64,8 +64,8 @@ QVariant QgsVectorFileWriter::FieldValueConverter::convert( int /*fieldIdxInLaye } QgsVectorFileWriter::QgsVectorFileWriter( - const QString &theVectorFileName, - const QString &theFileEncoding, + const QString &vectorFileName, + const QString &fileEncoding, const QgsFields& fields, QgsWkbTypes::Type geometryType, const QgsCoordinateReferenceSystem& srs, @@ -85,7 +85,7 @@ QgsVectorFileWriter::QgsVectorFileWriter( , mSymbologyScaleDenominator( 1.0 ) , mFieldValueConverter( nullptr ) { - init( theVectorFileName, theFileEncoding, fields, geometryType , + init( vectorFileName, fileEncoding, fields, geometryType , srs, driverName, datasourceOptions, layerOptions, newFilename, nullptr, QString(), CreateOrOverwriteFile ); } @@ -2545,9 +2545,9 @@ QgsVectorFileWriter::writeAsVectorFormat( QgsVectorLayer* layer, } -bool QgsVectorFileWriter::deleteShapeFile( const QString& theFileName ) +bool QgsVectorFileWriter::deleteShapeFile( const QString& fileName ) { - QFileInfo fi( theFileName ); + QFileInfo fi( fileName ); QDir dir = fi.dir(); QStringList filter; diff --git a/src/core/qgsvectorfilewriter.h b/src/core/qgsvectorfilewriter.h index 53b0bfb0cc1..9d0577e8d00 100644 --- a/src/core/qgsvectorfilewriter.h +++ b/src/core/qgsvectorfilewriter.h @@ -466,10 +466,10 @@ class CORE_EXPORT QgsVectorFileWriter ~QgsVectorFileWriter(); /** Delete a shapefile (and its accompanying shx / dbf / prf) - * @param theFileName /path/to/file.shp + * @param fileName /path/to/file.shp * @return bool true if the file was deleted successfully */ - static bool deleteShapeFile( const QString& theFileName ); + static bool deleteShapeFile( const QString& fileName ); SymbologyExport symbologyExport() const { return mSymbologyExport; } void setSymbologyExport( SymbologyExport symExport ) { mSymbologyExport = symExport; } diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index 89d67539790..d0bb199db73 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -4376,12 +4376,12 @@ void QgsVectorLayer::saveStyleToDatabase( const QString& name, const QString& de -QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag ) +QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &resultFlag ) { - return loadNamedStyle( theURI, theResultFlag, false ); + return loadNamedStyle( theURI, resultFlag, false ); } -QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDB ) +QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &resultFlag, bool loadFromLocalDB ) { QgsDataSourceUri dsUri( theURI ); if ( !loadFromLocalDB && mDataProvider && mDataProvider->isSaveAndLoadStyleToDatabaseSupported() ) @@ -4398,14 +4398,14 @@ QString QgsVectorLayer::loadNamedStyle( const QString &theURI, bool &theResultFl { QDomDocument myDocument( QStringLiteral( "qgis" ) ); myDocument.setContent( qml ); - theResultFlag = importNamedStyle( myDocument, errorMsg ); + resultFlag = importNamedStyle( myDocument, errorMsg ); return QObject::tr( "Loaded from Provider" ); } } } } - return QgsMapLayer::loadNamedStyle( theURI, theResultFlag ); + return QgsMapLayer::loadNamedStyle( theURI, resultFlag ); } QSet QgsVectorLayer::dependencies() const diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 32a2bb38732..7712132a9e7 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -744,16 +744,16 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * Load a named style from file/local db/datasource db * @param theURI the URI of the style or the URI of the layer - * @param theResultFlag will be set to true if a named style is correctly loaded + * @param resultFlag will be set to true if a named style is correctly loaded * @param loadFromLocalDb if true forces to load from local db instead of datasource one */ - virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDb ); + virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag, bool loadFromLocalDb ); /** - * Calls loadNamedStyle( theURI, theResultFlag, false ); + * Calls loadNamedStyle( theURI, resultFlag, false ); * Retained for backward compatibility */ - virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag ) override; + virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag ) override; /** Read the symbology for the current layer from the Dom node supplied. * @param layerNode node that will contain the symbology definition for this layer. diff --git a/src/core/qgsvectorlayereditutils.cpp b/src/core/qgsvectorlayereditutils.cpp index e7de21d9606..9d7e69d19e1 100644 --- a/src/core/qgsvectorlayereditutils.cpp +++ b/src/core/qgsvectorlayereditutils.cpp @@ -579,9 +579,9 @@ int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsGeometry& geom ) case QgsWkbTypes::LineString25D: case QgsWkbTypes::LineString: { - QgsPolyline theLine = geom.asPolyline(); - QgsPolyline::const_iterator line_it = theLine.constBegin(); - for ( ; line_it != theLine.constEnd(); ++line_it ) + QgsPolyline line = geom.asPolyline(); + QgsPolyline::const_iterator line_it = line.constBegin(); + for ( ; line_it != line.constEnd(); ++line_it ) { if ( addTopologicalPoints( *line_it ) != 0 ) { @@ -595,10 +595,10 @@ int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsGeometry& geom ) case QgsWkbTypes::MultiLineString25D: case QgsWkbTypes::MultiLineString: { - QgsMultiPolyline theMultiLine = geom.asMultiPolyline(); + QgsMultiPolyline multiLine = geom.asMultiPolyline(); QgsPolyline currentPolyline; - for ( int i = 0; i < theMultiLine.size(); ++i ) + for ( int i = 0; i < multiLine.size(); ++i ) { QgsPolyline::const_iterator line_it = currentPolyline.constBegin(); for ( ; line_it != currentPolyline.constEnd(); ++line_it ) @@ -616,12 +616,12 @@ int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsGeometry& geom ) case QgsWkbTypes::Polygon25D: case QgsWkbTypes::Polygon: { - QgsPolygon thePolygon = geom.asPolygon(); + QgsPolygon polygon = geom.asPolygon(); QgsPolyline currentRing; - for ( int i = 0; i < thePolygon.size(); ++i ) + for ( int i = 0; i < polygon.size(); ++i ) { - currentRing = thePolygon.at( i ); + currentRing = polygon.at( i ); QgsPolyline::const_iterator line_it = currentRing.constBegin(); for ( ; line_it != currentRing.constEnd(); ++line_it ) { @@ -638,13 +638,13 @@ int QgsVectorLayerEditUtils::addTopologicalPoints( const QgsGeometry& geom ) case QgsWkbTypes::MultiPolygon25D: case QgsWkbTypes::MultiPolygon: { - QgsMultiPolygon theMultiPolygon = geom.asMultiPolygon(); + QgsMultiPolygon multiPolygon = geom.asMultiPolygon(); QgsPolygon currentPolygon; QgsPolyline currentRing; - for ( int i = 0; i < theMultiPolygon.size(); ++i ) + for ( int i = 0; i < multiPolygon.size(); ++i ) { - currentPolygon = theMultiPolygon.at( i ); + currentPolygon = multiPolygon.at( i ); for ( int j = 0; j < currentPolygon.size(); ++j ) { currentRing = currentPolygon.at( j ); diff --git a/src/core/raster/qgscliptominmaxenhancement.cpp b/src/core/raster/qgscliptominmaxenhancement.cpp index 7f0f781a5df..abb57f8b943 100644 --- a/src/core/raster/qgscliptominmaxenhancement.cpp +++ b/src/core/raster/qgscliptominmaxenhancement.cpp @@ -19,30 +19,30 @@ email : ersts@amnh.org #include "qgscliptominmaxenhancement.h" #include "qgscontrastenhancement.h" -QgsClipToMinMaxEnhancement::QgsClipToMinMaxEnhancement( Qgis::DataType theQgsRasterDataType, double theMinimumValue, double theMaximumValue ) : QgsContrastEnhancementFunction( theQgsRasterDataType, theMinimumValue, theMaximumValue ) +QgsClipToMinMaxEnhancement::QgsClipToMinMaxEnhancement( Qgis::DataType qgsRasterDataType, double minimumValue, double maximumValue ) : QgsContrastEnhancementFunction( qgsRasterDataType, minimumValue, maximumValue ) { } -int QgsClipToMinMaxEnhancement::enhance( double theValue ) +int QgsClipToMinMaxEnhancement::enhance( double value ) { - if ( theValue < mMinimumValue || theValue > mMaximumValue ) + if ( value < mMinimumValue || value > mMaximumValue ) { return -1; } if ( mQgsRasterDataType == Qgis::Byte ) { - return static_cast( theValue ); + return static_cast( value ); } else { - return static_cast(((( theValue - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) / ( QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) )*255.0 ) ); + return static_cast(((( value - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) / ( QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) )*255.0 ) ); } } -bool QgsClipToMinMaxEnhancement::isValueInDisplayableRange( double theValue ) +bool QgsClipToMinMaxEnhancement::isValueInDisplayableRange( double value ) { - if ( theValue < mMinimumValue || theValue > mMaximumValue ) + if ( value < mMinimumValue || value > mMaximumValue ) { return false; } diff --git a/src/core/raster/qgscolorrampshader.cpp b/src/core/raster/qgscolorrampshader.cpp index 9ce28309938..e41c3baae99 100644 --- a/src/core/raster/qgscolorrampshader.cpp +++ b/src/core/raster/qgscolorrampshader.cpp @@ -30,10 +30,10 @@ originally part of the larger QgsRasterLayer class #include "qgsrasterminmaxorigin.h" #include -QgsColorRampShader::QgsColorRampShader( double theMinimumValue, double theMaximumValue, QgsColorRamp* theColorRamp, Type theType, ClassificationMode theClassificationMode ) - : QgsRasterShaderFunction( theMinimumValue, theMaximumValue ) - , mColorRampType( theType ) - , mClassificationMode( theClassificationMode ) +QgsColorRampShader::QgsColorRampShader( double minimumValue, double maximumValue, QgsColorRamp* colorRamp, Type type, ClassificationMode classificationMode ) + : QgsRasterShaderFunction( minimumValue, maximumValue ) + , mColorRampType( type ) + , mClassificationMode( classificationMode ) , mLUTOffset( 0.0 ) , mLUTFactor( 1.0 ) , mLUTInitialized( false ) @@ -41,7 +41,7 @@ QgsColorRampShader::QgsColorRampShader( double theMinimumValue, double theMaximu { QgsDebugMsgLevel( "called.", 4 ); - setSourceColorRamp( theColorRamp ); + setSourceColorRamp( colorRamp ); } QgsColorRampShader::QgsColorRampShader( const QgsColorRampShader& other ) @@ -84,26 +84,26 @@ QString QgsColorRampShader::colorRampTypeAsQString() return QStringLiteral( "Unknown" ); } -void QgsColorRampShader::setColorRampItemList( const QList& theList ) +void QgsColorRampShader::setColorRampItemList( const QList& list ) { - mColorRampItemList = theList.toVector(); + mColorRampItemList = list.toVector(); // Reset the look up table when the color ramp is changed mLUTInitialized = false; mLUT.clear(); } -void QgsColorRampShader::setColorRampType( QgsColorRampShader::Type theColorRampType ) +void QgsColorRampShader::setColorRampType( QgsColorRampShader::Type colorRampType ) { - mColorRampType = theColorRampType; + mColorRampType = colorRampType; } -void QgsColorRampShader::setColorRampType( const QString& theType ) +void QgsColorRampShader::setColorRampType( const QString& type ) { - if ( theType == QLatin1String( "INTERPOLATED" ) ) + if ( type == QLatin1String( "INTERPOLATED" ) ) { mColorRampType = Interpolated; } - else if ( theType == QLatin1String( "DISCRETE" ) ) + else if ( type == QLatin1String( "DISCRETE" ) ) { mColorRampType = Discrete; } @@ -306,13 +306,13 @@ void QgsColorRampShader::classifyColorRamp( const int band, const QgsRectangle& classifyColorRamp( colorRampItemList().count(), band, extent, input ); } -bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int *theReturnAlphaValue ) +bool QgsColorRampShader::shade( double value, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int *returnAlphaValue ) { if ( mColorRampItemList.isEmpty() ) { return false; } - if ( qIsNaN( theValue ) || qIsInf( theValue ) ) + if ( qIsNaN( value ) || qIsInf( value ) ) return false; int colorRampItemListCount = mColorRampItemList.count(); @@ -349,20 +349,20 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th mLUTInitialized = true; } - // overflow indicates that theValue > maximum value + DOUBLE_DIFF_THRESHOLD + // overflow indicates that value > maximum value + DOUBLE_DIFF_THRESHOLD // that way idx can point to the last valid item bool overflow = false; // find index of the first ColorRampItem that is equal or higher to theValue - int lutIndex = ( theValue - mLUTOffset ) * mLUTFactor; - if ( theValue < mLUTOffset ) + int lutIndex = ( value - mLUTOffset ) * mLUTFactor; + if ( value < mLUTOffset ) { idx = 0; } else if ( lutIndex >= mLUT.count() ) { idx = colorRampItemListCount - 1; - if ( mColorRampItemList.at( idx ).value + DOUBLE_DIFF_THRESHOLD < theValue ) + if ( mColorRampItemList.at( idx ).value + DOUBLE_DIFF_THRESHOLD < value ) { overflow = true; } @@ -374,7 +374,7 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th // check if it's correct and if not increase until correct // the LUT is made in such a way the index is always correct or too low, never too high - while ( idx < colorRampItemListCount && mColorRampItemList.at( idx ).value + DOUBLE_DIFF_THRESHOLD < theValue ) + while ( idx < colorRampItemListCount && mColorRampItemList.at( idx ).value + DOUBLE_DIFF_THRESHOLD < value ) { idx++; } @@ -389,30 +389,30 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th if ( colorRampType() == Interpolated ) { // Interpolate the color between two class breaks linearly. - if ( idx < 1 || overflow || currentColorRampItem.value - DOUBLE_DIFF_THRESHOLD <= theValue ) + if ( idx < 1 || overflow || currentColorRampItem.value - DOUBLE_DIFF_THRESHOLD <= value ) { if ( mClip && ( overflow - || currentColorRampItem.value - DOUBLE_DIFF_THRESHOLD > theValue ) ) + || currentColorRampItem.value - DOUBLE_DIFF_THRESHOLD > value ) ) { return false; } - *theReturnRedValue = currentColorRampItem.color.red(); - *theReturnGreenValue = currentColorRampItem.color.green(); - *theReturnBlueValue = currentColorRampItem.color.blue(); - *theReturnAlphaValue = currentColorRampItem.color.alpha(); + *returnRedValue = currentColorRampItem.color.red(); + *returnGreenValue = currentColorRampItem.color.green(); + *returnBlueValue = currentColorRampItem.color.blue(); + *returnAlphaValue = currentColorRampItem.color.alpha(); return true; } const QgsColorRampShader::ColorRampItem& previousColorRampItem = mColorRampItemList.at( idx - 1 ); double currentRampRange = currentColorRampItem.value - previousColorRampItem.value; - double offsetInRange = theValue - previousColorRampItem.value; + double offsetInRange = value - previousColorRampItem.value; double scale = offsetInRange / currentRampRange; - *theReturnRedValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.red() ) + ( static_cast< double >( currentColorRampItem.color.red() - previousColorRampItem.color.red() ) * scale ) ); - *theReturnGreenValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.green() ) + ( static_cast< double >( currentColorRampItem.color.green() - previousColorRampItem.color.green() ) * scale ) ); - *theReturnBlueValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.blue() ) + ( static_cast< double >( currentColorRampItem.color.blue() - previousColorRampItem.color.blue() ) * scale ) ); - *theReturnAlphaValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.alpha() ) + ( static_cast< double >( currentColorRampItem.color.alpha() - previousColorRampItem.color.alpha() ) * scale ) ); + *returnRedValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.red() ) + ( static_cast< double >( currentColorRampItem.color.red() - previousColorRampItem.color.red() ) * scale ) ); + *returnGreenValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.green() ) + ( static_cast< double >( currentColorRampItem.color.green() - previousColorRampItem.color.green() ) * scale ) ); + *returnBlueValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.blue() ) + ( static_cast< double >( currentColorRampItem.color.blue() - previousColorRampItem.color.blue() ) * scale ) ); + *returnAlphaValue = static_cast< int >( static_cast< double >( previousColorRampItem.color.alpha() ) + ( static_cast< double >( currentColorRampItem.color.alpha() - previousColorRampItem.color.alpha() ) * scale ) ); return true; } else if ( colorRampType() == Discrete ) @@ -423,20 +423,20 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th { return false; } - *theReturnRedValue = currentColorRampItem.color.red(); - *theReturnGreenValue = currentColorRampItem.color.green(); - *theReturnBlueValue = currentColorRampItem.color.blue(); - *theReturnAlphaValue = currentColorRampItem.color.alpha(); + *returnRedValue = currentColorRampItem.color.red(); + *returnGreenValue = currentColorRampItem.color.green(); + *returnBlueValue = currentColorRampItem.color.blue(); + *returnAlphaValue = currentColorRampItem.color.alpha(); return true; } else // EXACT { // Assign the color of the exact matching value in the color ramp item list - if ( !overflow && currentColorRampItem.value - DOUBLE_DIFF_THRESHOLD <= theValue ) + if ( !overflow && currentColorRampItem.value - DOUBLE_DIFF_THRESHOLD <= value ) { - *theReturnRedValue = currentColorRampItem.color.red(); - *theReturnGreenValue = currentColorRampItem.color.green(); - *theReturnBlueValue = currentColorRampItem.color.blue(); - *theReturnAlphaValue = currentColorRampItem.color.alpha(); + *returnRedValue = currentColorRampItem.color.red(); + *returnGreenValue = currentColorRampItem.color.green(); + *returnBlueValue = currentColorRampItem.color.blue(); + *returnAlphaValue = currentColorRampItem.color.alpha(); return true; } else @@ -446,20 +446,20 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th } } -bool QgsColorRampShader::shade( double theRedValue, double theGreenValue, - double theBlueValue, double theAlphaValue, - int* theReturnRedValue, int* theReturnGreenValue, - int* theReturnBlueValue, int* theReturnAlphaValue ) +bool QgsColorRampShader::shade( double redValue, double greenValue, + double blueValue, double alphaValue, + int* returnRedValue, int* returnGreenValue, + int* returnBlueValue, int* returnAlphaValue ) { - Q_UNUSED( theRedValue ); - Q_UNUSED( theGreenValue ); - Q_UNUSED( theBlueValue ); - Q_UNUSED( theAlphaValue ); + Q_UNUSED( redValue ); + Q_UNUSED( greenValue ); + Q_UNUSED( blueValue ); + Q_UNUSED( alphaValue ); - *theReturnRedValue = 0; - *theReturnGreenValue = 0; - *theReturnBlueValue = 0; - *theReturnAlphaValue = 0; + *returnRedValue = 0; + *returnGreenValue = 0; + *returnBlueValue = 0; + *returnAlphaValue = 0; return false; } diff --git a/src/core/raster/qgscolorrampshader.h b/src/core/raster/qgscolorrampshader.h index e39e8007dcc..0dafecfbc2e 100644 --- a/src/core/raster/qgscolorrampshader.h +++ b/src/core/raster/qgscolorrampshader.h @@ -56,14 +56,14 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction }; /** Creates a new color ramp shader. - * @param theMinimumValue minimum value for the raster shader - * @param theMaximumValue maximum value for the raster shader - * @param theType interpolation type used - * @param theClassificationMode method used to classify the color ramp shader - * @param theColorRamp vector color ramp used to classify the color ramp shader + * @param minimumValue minimum value for the raster shader + * @param maximumValue maximum value for the raster shader + * @param type interpolation type used + * @param classificationMode method used to classify the color ramp shader + * @param colorRamp vector color ramp used to classify the color ramp shader * @returns new QgsColorRampShader */ - QgsColorRampShader( double theMinimumValue = 0.0, double theMaximumValue = 255.0, QgsColorRamp* theColorRamp = nullptr, Type theType = Interpolated, ClassificationMode theClassificationMode = Continuous ); + QgsColorRampShader( double minimumValue = 0.0, double maximumValue = 255.0, QgsColorRamp* colorRamp = nullptr, Type type = Interpolated, ClassificationMode classificationMode = Continuous ); /** Copy constructor */ @@ -106,10 +106,10 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction QString colorRampTypeAsQString(); //! \brief Set custom colormap - void setColorRampItemList( const QList& theList ); //TODO: sort on set + void setColorRampItemList( const QList& list ); //TODO: sort on set //! \brief Set the color ramp type - void setColorRampType( QgsColorRampShader::Type theColorRampType ); + void setColorRampType( QgsColorRampShader::Type colorRampType ); /** Get the source color ramp * @note added in QGIS 3.0 @@ -124,7 +124,7 @@ class CORE_EXPORT QgsColorRampShader : public QgsRasterShaderFunction void setSourceColorRamp( QgsColorRamp* colorramp ); //! \brief Set the color ramp type - void setColorRampType( const QString& theType ); + void setColorRampType( const QString& type ); /** Classify color ramp shader * @param classes number of classes diff --git a/src/core/raster/qgscontrastenhancement.cpp b/src/core/raster/qgscontrastenhancement.cpp index ee4790bb800..581ed9fe496 100644 --- a/src/core/raster/qgscontrastenhancement.cpp +++ b/src/core/raster/qgscontrastenhancement.cpp @@ -29,12 +29,12 @@ class originally created circa 2004 by T.Sutton, Gary E.Sherman, Steve Halasz #include #include -QgsContrastEnhancement::QgsContrastEnhancement( Qgis::DataType theDataType ) +QgsContrastEnhancement::QgsContrastEnhancement( Qgis::DataType dataType ) : mContrastEnhancementAlgorithm( NoEnhancement ) , mContrastEnhancementFunction( nullptr ) , mEnhancementDirty( false ) , mLookupTable( nullptr ) - , mRasterDataType( theDataType ) + , mRasterDataType( dataType ) { mMinimumValue = minimumValuePossible( mRasterDataType ); mMaximumValue = maximumValuePossible( mRasterDataType ); @@ -87,9 +87,9 @@ QgsContrastEnhancement::~QgsContrastEnhancement() /** Simple function to compute the maximum possible value for a data types. */ -double QgsContrastEnhancement::maximumValuePossible( Qgis::DataType theDataType ) +double QgsContrastEnhancement::maximumValuePossible( Qgis::DataType dataType ) { - switch ( theDataType ) + switch ( dataType ) { case Qgis::Byte: return std::numeric_limits::max(); @@ -126,9 +126,9 @@ double QgsContrastEnhancement::maximumValuePossible( Qgis::DataType theDataType /** Simple function to compute the minimum possible value for a data type. */ -double QgsContrastEnhancement::minimumValuePossible( Qgis::DataType theDataType ) +double QgsContrastEnhancement::minimumValuePossible( Qgis::DataType dataType ) { - switch ( theDataType ) + switch ( dataType ) { case Qgis::Byte: return std::numeric_limits::min(); @@ -171,9 +171,9 @@ double QgsContrastEnhancement::minimumValuePossible( Qgis::DataType theDataType /** Public function to generate the enhanced for enhanceContrasted value for a given input. - @param theValue The pixel value to enhance + @param value The pixel value to enhance */ -int QgsContrastEnhancement::enhanceContrast( double theValue ) +int QgsContrastEnhancement::enhanceContrast( double value ) { if ( mEnhancementDirty ) { @@ -182,14 +182,14 @@ int QgsContrastEnhancement::enhanceContrast( double theValue ) if ( mLookupTable && NoEnhancement != mContrastEnhancementAlgorithm ) { - return mLookupTable[static_cast ( theValue + mLookupTableOffset )]; + return mLookupTable[static_cast ( value + mLookupTableOffset )]; } else { // Even if the contrast enhancement algorithms is set to NoEnhancement // The input values will still have to be scaled for all data types // greater than 1 byte. - return mContrastEnhancementFunction->enhance( theValue ); + return mContrastEnhancementFunction->enhance( value ); } } @@ -226,13 +226,13 @@ bool QgsContrastEnhancement::generateLookupTable() /** Determine if a pixel is within in the displayable range. - @param theValue The pixel value to examine + @param value The pixel value to examine */ -bool QgsContrastEnhancement::isValueInDisplayableRange( double theValue ) +bool QgsContrastEnhancement::isValueInDisplayableRange( double value ) { if ( mContrastEnhancementFunction ) { - return mContrastEnhancementFunction->isValueInDisplayableRange( theValue ); + return mContrastEnhancementFunction->isValueInDisplayableRange( value ); } return false; @@ -241,12 +241,12 @@ bool QgsContrastEnhancement::isValueInDisplayableRange( double theValue ) /** Set the contrast enhancement algorithm. The second parameter is optional and is for performance improvements. If you know you are immediately going to set the Minimum or Maximum value, you can elect to not generate the lookup tale. By default it will be generated. - @param theAlgorithm The new contrast enhancement algorithm + @param algorithm The new contrast enhancement algorithm @param generateTable Flag to override automatic look up table generation */ -void QgsContrastEnhancement::setContrastEnhancementAlgorithm( ContrastEnhancementAlgorithm theAlgorithm, bool generateTable ) +void QgsContrastEnhancement::setContrastEnhancementAlgorithm( ContrastEnhancementAlgorithm algorithm, bool generateTable ) { - switch ( theAlgorithm ) + switch ( algorithm ) { case StretchToMinimumMaximum : delete mContrastEnhancementFunction; @@ -270,7 +270,7 @@ void QgsContrastEnhancement::setContrastEnhancementAlgorithm( ContrastEnhancemen } mEnhancementDirty = true; - mContrastEnhancementAlgorithm = theAlgorithm; + mContrastEnhancementAlgorithm = algorithm; if ( generateTable ) { @@ -281,16 +281,16 @@ void QgsContrastEnhancement::setContrastEnhancementAlgorithm( ContrastEnhancemen /** A public function that allows the user to set their own custom contrast enhancement function. - @param theFunction The new contrast enhancement function + @param function The new contrast enhancement function */ -void QgsContrastEnhancement::setContrastEnhancementFunction( QgsContrastEnhancementFunction* theFunction ) +void QgsContrastEnhancement::setContrastEnhancementFunction( QgsContrastEnhancementFunction* function ) { QgsDebugMsgLevel( "called", 4 ); - if ( theFunction ) + if ( function ) { delete mContrastEnhancementFunction; - mContrastEnhancementFunction = theFunction; + mContrastEnhancementFunction = function; mContrastEnhancementAlgorithm = UserDefinedEnhancement; generateLookupTable(); } @@ -299,25 +299,25 @@ void QgsContrastEnhancement::setContrastEnhancementFunction( QgsContrastEnhancem /** Set the maximum value for the contrast enhancement. The second parameter is option an is for performance improvements. If you know you are immediately going to set the Minimum value or the contrast enhancement algorithm, you can elect to not generate the lookup tale. By default it will be generated. - @param theValue The new maximum value for the band + @param value The new maximum value for the band @param generateTable Flag to override automatic look up table generation */ -void QgsContrastEnhancement::setMaximumValue( double theValue, bool generateTable ) +void QgsContrastEnhancement::setMaximumValue( double value, bool generateTable ) { - QgsDebugMsgLevel( "called value: " + QString::number( theValue ) + " generate lookup table: " + QString::number( static_cast< int >( generateTable ) ), 4 ); + QgsDebugMsgLevel( "called value: " + QString::number( value ) + " generate lookup table: " + QString::number( static_cast< int >( generateTable ) ), 4 ); - if ( theValue > maximumValuePossible( mRasterDataType ) ) + if ( value > maximumValuePossible( mRasterDataType ) ) { mMaximumValue = maximumValuePossible( mRasterDataType ); } else { - mMaximumValue = theValue; + mMaximumValue = value; } if ( mContrastEnhancementFunction ) { - mContrastEnhancementFunction->setMaximumValue( theValue ); + mContrastEnhancementFunction->setMaximumValue( value ); } mEnhancementDirty = true; @@ -331,25 +331,25 @@ void QgsContrastEnhancement::setMaximumValue( double theValue, bool generateTabl /** Set the maximum value for the contrast enhancement. The second parameter is option an is for performance improvements. If you know you are immediately going to set the Maximum value or the contrast enhancement algorithm, you can elect to not generate the lookup tale. By default it will be generated. - @param theValue The new minimum value for the band + @param value The new minimum value for the band @param generateTable Flag to override automatic look up table generation */ -void QgsContrastEnhancement::setMinimumValue( double theValue, bool generateTable ) +void QgsContrastEnhancement::setMinimumValue( double value, bool generateTable ) { - QgsDebugMsgLevel( "called value: " + QString::number( theValue ) + " generate lookup table: " + QString::number( static_cast< int >( generateTable ) ), 4 ); + QgsDebugMsgLevel( "called value: " + QString::number( value ) + " generate lookup table: " + QString::number( static_cast< int >( generateTable ) ), 4 ); - if ( theValue < minimumValuePossible( mRasterDataType ) ) + if ( value < minimumValuePossible( mRasterDataType ) ) { mMinimumValue = minimumValuePossible( mRasterDataType ); } else { - mMinimumValue = theValue; + mMinimumValue = value; } if ( mContrastEnhancementFunction ) { - mContrastEnhancementFunction->setMinimumValue( theValue ); + mContrastEnhancementFunction->setMinimumValue( value ); } mEnhancementDirty = true; diff --git a/src/core/raster/qgscontrastenhancement.h b/src/core/raster/qgscontrastenhancement.h index bd3bada0d00..7f287a82f9a 100644 --- a/src/core/raster/qgscontrastenhancement.h +++ b/src/core/raster/qgscontrastenhancement.h @@ -52,7 +52,7 @@ class CORE_EXPORT QgsContrastEnhancement UserDefinedEnhancement }; - QgsContrastEnhancement( Qgis::DataType theDatatype = Qgis::Byte ); + QgsContrastEnhancement( Qgis::DataType datatype = Qgis::Byte ); QgsContrastEnhancement( const QgsContrastEnhancement& ce ); ~QgsContrastEnhancement(); diff --git a/src/core/raster/qgscontrastenhancementfunction.cpp b/src/core/raster/qgscontrastenhancementfunction.cpp index 0b1bf6a9217..87627b32d00 100644 --- a/src/core/raster/qgscontrastenhancementfunction.cpp +++ b/src/core/raster/qgscontrastenhancementfunction.cpp @@ -19,11 +19,11 @@ email : ersts@amnh.org #include "qgscontrastenhancementfunction.h" #include "qgscontrastenhancement.h" -QgsContrastEnhancementFunction::QgsContrastEnhancementFunction( Qgis::DataType theDataType, double theMinimumValue, double theMaximumValue ) +QgsContrastEnhancementFunction::QgsContrastEnhancementFunction( Qgis::DataType dataType, double minimumValue, double maximumValue ) { - mQgsRasterDataType = theDataType; - mMaximumValue = theMaximumValue; - mMinimumValue = theMinimumValue; + mQgsRasterDataType = dataType; + mMaximumValue = maximumValue; + mMinimumValue = minimumValue; mMinimumMaximumRange = mMaximumValue - mMinimumValue; } @@ -35,22 +35,22 @@ QgsContrastEnhancementFunction::QgsContrastEnhancementFunction( const QgsContras mMinimumMaximumRange = f.mMinimumMaximumRange; } -int QgsContrastEnhancementFunction::enhance( double theValue ) +int QgsContrastEnhancementFunction::enhance( double value ) { if ( mQgsRasterDataType == Qgis::Byte ) { - return static_cast( theValue ); + return static_cast( value ); } else { - return static_cast(((( theValue - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) / ( QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) )*255.0 ) ); + return static_cast(((( value - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) / ( QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) - QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) ) )*255.0 ) ); } } -bool QgsContrastEnhancementFunction::isValueInDisplayableRange( double theValue ) +bool QgsContrastEnhancementFunction::isValueInDisplayableRange( double value ) { //A default check is to see if the provided value is with the range for the data type - if ( theValue < QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) || theValue > QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) ) + if ( value < QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) || value > QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) ) { return false; } @@ -58,30 +58,30 @@ bool QgsContrastEnhancementFunction::isValueInDisplayableRange( double theValue return true; } -void QgsContrastEnhancementFunction::setMaximumValue( double theValue ) +void QgsContrastEnhancementFunction::setMaximumValue( double value ) { - if ( QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) < theValue ) + if ( QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ) < value ) { mMaximumValue = QgsContrastEnhancement::maximumValuePossible( mQgsRasterDataType ); } else { - mMaximumValue = theValue; + mMaximumValue = value; } mMinimumMaximumRange = mMaximumValue - mMinimumValue; } -void QgsContrastEnhancementFunction::setMinimumValue( double theValue ) +void QgsContrastEnhancementFunction::setMinimumValue( double value ) { - if ( QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) > theValue ) + if ( QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ) > value ) { mMinimumValue = QgsContrastEnhancement::minimumValuePossible( mQgsRasterDataType ); } else { - mMinimumValue = theValue; + mMinimumValue = value; } mMinimumMaximumRange = mMaximumValue - mMinimumValue; diff --git a/src/core/raster/qgslinearminmaxenhancement.cpp b/src/core/raster/qgslinearminmaxenhancement.cpp index dee68be9dc0..d37aa9974d8 100644 --- a/src/core/raster/qgslinearminmaxenhancement.cpp +++ b/src/core/raster/qgslinearminmaxenhancement.cpp @@ -18,13 +18,13 @@ email : ersts@amnh.org #include "qgslinearminmaxenhancement.h" -QgsLinearMinMaxEnhancement::QgsLinearMinMaxEnhancement( Qgis::DataType theQgsRasterDataType, double theMinimumValue, double theMaximumValue ) : QgsContrastEnhancementFunction( theQgsRasterDataType, theMinimumValue, theMaximumValue ) +QgsLinearMinMaxEnhancement::QgsLinearMinMaxEnhancement( Qgis::DataType qgsRasterDataType, double minimumValue, double maximumValue ) : QgsContrastEnhancementFunction( qgsRasterDataType, minimumValue, maximumValue ) { } -int QgsLinearMinMaxEnhancement::enhance( double theValue ) +int QgsLinearMinMaxEnhancement::enhance( double value ) { - int myStretchedValue = static_cast((( theValue - mMinimumValue ) / ( mMinimumMaximumRange ) ) * 255.0 ); + int myStretchedValue = static_cast((( value - mMinimumValue ) / ( mMinimumMaximumRange ) ) * 255.0 ); if ( myStretchedValue < 0 ) { return 0; diff --git a/src/core/raster/qgslinearminmaxenhancementwithclip.cpp b/src/core/raster/qgslinearminmaxenhancementwithclip.cpp index a2ea90b4e93..f1a2f273bdc 100644 --- a/src/core/raster/qgslinearminmaxenhancementwithclip.cpp +++ b/src/core/raster/qgslinearminmaxenhancementwithclip.cpp @@ -18,18 +18,18 @@ email : ersts@amnh.org #include "qgslinearminmaxenhancementwithclip.h" -QgsLinearMinMaxEnhancementWithClip::QgsLinearMinMaxEnhancementWithClip( Qgis::DataType theQgsRasterDataType, double theMinimumValue, double theMaximumValue ) : QgsContrastEnhancementFunction( theQgsRasterDataType, theMinimumValue, theMaximumValue ) +QgsLinearMinMaxEnhancementWithClip::QgsLinearMinMaxEnhancementWithClip( Qgis::DataType qgsRasterDataType, double minimumValue, double maximumValue ) : QgsContrastEnhancementFunction( qgsRasterDataType, minimumValue, maximumValue ) { } -int QgsLinearMinMaxEnhancementWithClip::enhance( double theValue ) +int QgsLinearMinMaxEnhancementWithClip::enhance( double value ) { - if ( theValue < mMinimumValue || theValue > mMaximumValue ) + if ( value < mMinimumValue || value > mMaximumValue ) { return -1; } - int myStretchedValue = static_cast((( theValue - mMinimumValue ) / ( mMinimumMaximumRange ) ) * 255.0 ); + int myStretchedValue = static_cast((( value - mMinimumValue ) / ( mMinimumMaximumRange ) ) * 255.0 ); if ( myStretchedValue < 0 ) { return 0; @@ -42,9 +42,9 @@ int QgsLinearMinMaxEnhancementWithClip::enhance( double theValue ) return myStretchedValue; } -bool QgsLinearMinMaxEnhancementWithClip::isValueInDisplayableRange( double theValue ) +bool QgsLinearMinMaxEnhancementWithClip::isValueInDisplayableRange( double value ) { - if ( theValue < mMinimumValue || theValue > mMaximumValue ) + if ( value < mMinimumValue || value > mMaximumValue ) { return false; } diff --git a/src/core/raster/qgsrasterblock.cpp b/src/core/raster/qgsrasterblock.cpp index 116b36bcf2d..67f16b1e0eb 100644 --- a/src/core/raster/qgsrasterblock.cpp +++ b/src/core/raster/qgsrasterblock.cpp @@ -43,12 +43,12 @@ QgsRasterBlock::QgsRasterBlock() { } -QgsRasterBlock::QgsRasterBlock( Qgis::DataType theDataType, int theWidth, int theHeight ) +QgsRasterBlock::QgsRasterBlock( Qgis::DataType dataType, int width, int height ) : mValid( true ) - , mDataType( theDataType ) + , mDataType( dataType ) , mTypeSize( 0 ) - , mWidth( theWidth ) - , mHeight( theHeight ) + , mWidth( width ) + , mHeight( height ) , mHasNoDataValue( false ) , mNoDataValue( std::numeric_limits::quiet_NaN() ) , mData( nullptr ) @@ -68,9 +68,9 @@ QgsRasterBlock::~QgsRasterBlock() qgsFree( mNoDataBitmap ); } -bool QgsRasterBlock::reset( Qgis::DataType theDataType, int theWidth, int theHeight ) +bool QgsRasterBlock::reset( Qgis::DataType dataType, int width, int height ) { - QgsDebugMsgLevel( QString( "theWidth= %1 theHeight = %2 theDataType = %3" ).arg( theWidth ).arg( theHeight ).arg( theDataType ), 4 ); + QgsDebugMsgLevel( QString( "theWidth= %1 height = %2 dataType = %3" ).arg( width ).arg( height ).arg( dataType ), 4 ); qgsFree( mData ); mData = nullptr; @@ -86,23 +86,23 @@ bool QgsRasterBlock::reset( Qgis::DataType theDataType, int theWidth, int theHei mNoDataValue = std::numeric_limits::quiet_NaN(); mValid = false; - if ( typeIsNumeric( theDataType ) ) + if ( typeIsNumeric( dataType ) ) { QgsDebugMsgLevel( "Numeric type", 4 ); - qgssize tSize = typeSize( theDataType ); - QgsDebugMsgLevel( QString( "allocate %1 bytes" ).arg( tSize * theWidth * theHeight ), 4 ); - mData = qgsMalloc( tSize * theWidth * theHeight ); + qgssize tSize = typeSize( dataType ); + QgsDebugMsgLevel( QString( "allocate %1 bytes" ).arg( tSize * width * height ), 4 ); + mData = qgsMalloc( tSize * width * height ); if ( !mData ) { - QgsDebugMsg( QString( "Couldn't allocate data memory of %1 bytes" ).arg( tSize * theWidth * theHeight ) ); + QgsDebugMsg( QString( "Couldn't allocate data memory of %1 bytes" ).arg( tSize * width * height ) ); return false; } } - else if ( typeIsColor( theDataType ) ) + else if ( typeIsColor( dataType ) ) { QgsDebugMsgLevel( "Color type", 4 ); - QImage::Format format = imageFormat( theDataType ); - mImage = new QImage( theWidth, theHeight, format ); + QImage::Format format = imageFormat( dataType ); + mImage = new QImage( width, height, format ); } else { @@ -111,35 +111,35 @@ bool QgsRasterBlock::reset( Qgis::DataType theDataType, int theWidth, int theHei } mValid = true; - mDataType = theDataType; + mDataType = dataType; mTypeSize = QgsRasterBlock::typeSize( mDataType ); - mWidth = theWidth; - mHeight = theHeight; + mWidth = width; + mHeight = height; QgsDebugMsgLevel( QString( "mWidth= %1 mHeight = %2 mDataType = %3 mData = %4 mImage = %5" ).arg( mWidth ).arg( mHeight ).arg( mDataType ) .arg( reinterpret_cast< quint64 >( mData ) ).arg( reinterpret_cast< quint64 >( mImage ) ), 4 ); return true; } -QImage::Format QgsRasterBlock::imageFormat( Qgis::DataType theDataType ) +QImage::Format QgsRasterBlock::imageFormat( Qgis::DataType dataType ) { - if ( theDataType == Qgis::ARGB32 ) + if ( dataType == Qgis::ARGB32 ) { return QImage::Format_ARGB32; } - else if ( theDataType == Qgis::ARGB32_Premultiplied ) + else if ( dataType == Qgis::ARGB32_Premultiplied ) { return QImage::Format_ARGB32_Premultiplied; } return QImage::Format_Invalid; } -Qgis::DataType QgsRasterBlock::dataType( QImage::Format theFormat ) +Qgis::DataType QgsRasterBlock::dataType( QImage::Format format ) { - if ( theFormat == QImage::Format_ARGB32 ) + if ( format == QImage::Format_ARGB32 ) { return Qgis::ARGB32; } - else if ( theFormat == QImage::Format_ARGB32_Premultiplied ) + else if ( format == QImage::Format_ARGB32_Premultiplied ) { return Qgis::ARGB32_Premultiplied; } @@ -456,12 +456,12 @@ bool QgsRasterBlock::setIsNoData() } } -bool QgsRasterBlock::setIsNoDataExcept( QRect theExceptRect ) +bool QgsRasterBlock::setIsNoDataExcept( QRect exceptRect ) { - int top = theExceptRect.top(); - int bottom = theExceptRect.bottom(); - int left = theExceptRect.left(); - int right = theExceptRect.right(); + int top = exceptRect.top(); + int bottom = exceptRect.bottom(); + int left = exceptRect.left(); + int right = exceptRect.right(); top = qMin( qMax( top, 0 ), mHeight - 1 ); left = qMin( qMax( left, 0 ), mWidth - 1 ); bottom = qMax( 0, qMin( bottom, mHeight - 1 ) ); @@ -874,9 +874,9 @@ void * QgsRasterBlock::convert( void *srcData, Qgis::DataType srcDataType, Qgis: return destData; } -QByteArray QgsRasterBlock::valueBytes( Qgis::DataType theDataType, double theValue ) +QByteArray QgsRasterBlock::valueBytes( Qgis::DataType dataType, double value ) { - qgssize size = QgsRasterBlock::typeSize( theDataType ); + qgssize size = QgsRasterBlock::typeSize( dataType ); QByteArray ba; ba.resize( static_cast< int >( size ) ); char * data = ba.data(); @@ -887,34 +887,34 @@ QByteArray QgsRasterBlock::valueBytes( Qgis::DataType theDataType, double theVal qint32 i; float f; double d; - switch ( theDataType ) + switch ( dataType ) { case Qgis::Byte: - uc = static_cast< quint8 >( theValue ); + uc = static_cast< quint8 >( value ); memcpy( data, &uc, size ); break; case Qgis::UInt16: - us = static_cast< quint16 >( theValue ); + us = static_cast< quint16 >( value ); memcpy( data, &us, size ); break; case Qgis::Int16: - s = static_cast< qint16 >( theValue ); + s = static_cast< qint16 >( value ); memcpy( data, &s, size ); break; case Qgis::UInt32: - ui = static_cast< quint32 >( theValue ); + ui = static_cast< quint32 >( value ); memcpy( data, &ui, size ); break; case Qgis::Int32: - i = static_cast< qint32 >( theValue ); + i = static_cast< qint32 >( value ); memcpy( data, &i, size ); break; case Qgis::Float32: - f = static_cast< float >( theValue ); + f = static_cast< float >( value ); memcpy( data, &f, size ); break; case Qgis::Float64: - d = static_cast< double >( theValue ); + d = static_cast< double >( value ); memcpy( data, &d, size ); break; default: @@ -944,36 +944,36 @@ QString QgsRasterBlock::toString() const .arg( mDataType ).arg( mWidth ).arg( mHeight ); } -QRect QgsRasterBlock::subRect( const QgsRectangle & theExtent, int theWidth, int theHeight, const QgsRectangle & theSubExtent ) +QRect QgsRasterBlock::subRect( const QgsRectangle & extent, int width, int height, const QgsRectangle & subExtent ) { - QgsDebugMsgLevel( "theExtent = " + theExtent.toString(), 4 ); - QgsDebugMsgLevel( "theSubExtent = " + theSubExtent.toString(), 4 ); - double xRes = theExtent.width() / theWidth; - double yRes = theExtent.height() / theHeight; + QgsDebugMsgLevel( "theExtent = " + extent.toString(), 4 ); + QgsDebugMsgLevel( "theSubExtent = " + subExtent.toString(), 4 ); + double xRes = extent.width() / width; + double yRes = extent.height() / height; - QgsDebugMsgLevel( QString( "theWidth = %1 theHeight = %2 xRes = %3 yRes = %4" ).arg( theWidth ).arg( theHeight ).arg( xRes ).arg( yRes ), 4 ); + QgsDebugMsgLevel( QString( "theWidth = %1 height = %2 xRes = %3 yRes = %4" ).arg( width ).arg( height ).arg( xRes ).arg( yRes ), 4 ); int top = 0; - int bottom = theHeight - 1; + int bottom = height - 1; int left = 0; - int right = theWidth - 1; + int right = width - 1; - if ( theSubExtent.yMaximum() < theExtent.yMaximum() ) + if ( subExtent.yMaximum() < extent.yMaximum() ) { - top = qRound(( theExtent.yMaximum() - theSubExtent.yMaximum() ) / yRes ); + top = qRound(( extent.yMaximum() - subExtent.yMaximum() ) / yRes ); } - if ( theSubExtent.yMinimum() > theExtent.yMinimum() ) + if ( subExtent.yMinimum() > extent.yMinimum() ) { - bottom = qRound(( theExtent.yMaximum() - theSubExtent.yMinimum() ) / yRes ) - 1; + bottom = qRound(( extent.yMaximum() - subExtent.yMinimum() ) / yRes ) - 1; } - if ( theSubExtent.xMinimum() > theExtent.xMinimum() ) + if ( subExtent.xMinimum() > extent.xMinimum() ) { - left = qRound(( theSubExtent.xMinimum() - theExtent.xMinimum() ) / xRes ); + left = qRound(( subExtent.xMinimum() - extent.xMinimum() ) / xRes ); } - if ( theSubExtent.xMaximum() < theExtent.xMaximum() ) + if ( subExtent.xMaximum() < extent.xMaximum() ) { - right = qRound(( theSubExtent.xMaximum() - theExtent.xMinimum() ) / xRes ) - 1; + right = qRound(( subExtent.xMaximum() - extent.xMinimum() ) / xRes ) - 1; } QRect subRect = QRect( left, top, right - left + 1, bottom - top + 1 ); QgsDebugMsgLevel( QString( "subRect: %1 %2 %3 %4" ).arg( subRect.x() ).arg( subRect.y() ).arg( subRect.width() ).arg( subRect.height() ), 4 ); diff --git a/src/core/raster/qgsrasterblock.h b/src/core/raster/qgsrasterblock.h index 986cac13804..a497c3cb359 100644 --- a/src/core/raster/qgsrasterblock.h +++ b/src/core/raster/qgsrasterblock.h @@ -37,21 +37,21 @@ class CORE_EXPORT QgsRasterBlock QgsRasterBlock(); /** \brief Constructor which allocates data block in memory - * @param theDataType raster data type - * @param theWidth width of data matrix - * @param theHeight height of data matrix + * @param dataType raster data type + * @param width width of data matrix + * @param height height of data matrix */ - QgsRasterBlock( Qgis::DataType theDataType, int theWidth, int theHeight ); + QgsRasterBlock( Qgis::DataType dataType, int width, int height ); virtual ~QgsRasterBlock(); /** \brief Reset block - * @param theDataType raster data type - * @param theWidth width of data matrix - * @param theHeight height of data matrix + * @param dataType raster data type + * @param width width of data matrix + * @param height height of data matrix * @return true on success */ - bool reset( Qgis::DataType theDataType, int theWidth, int theHeight ); + bool reset( Qgis::DataType dataType, int width, int height ); // TODO: consider if use isValid() at all, isEmpty() should be sufficient // and works also if block is valid but empty - difference between valid and empty? @@ -158,10 +158,10 @@ class CORE_EXPORT QgsRasterBlock double noDataValue() const { return mNoDataValue; } /** Get byte array representing a value. - * @param theDataType data type - * @param theValue value + * @param dataType data type + * @param value value * @return byte array representing the value */ - static QByteArray valueBytes( Qgis::DataType theDataType, double theValue ); + static QByteArray valueBytes( Qgis::DataType dataType, double value ); /** \brief Read a single value if type of block is numeric. If type is color, * returned value is undefined. @@ -241,7 +241,7 @@ class CORE_EXPORT QgsRasterBlock /** \brief Set the whole block to no data except specified rectangle * @return true on success */ - bool setIsNoDataExcept( QRect theExceptRect ); + bool setIsNoDataExcept( QRect exceptRect ); /** \brief Remove no data flag on pixel. If the raster block does not have an explicit * no data value set then an internal map of no data pixels is maintained for the block. @@ -346,20 +346,20 @@ class CORE_EXPORT QgsRasterBlock QgsError error() const { return mError; } //! \brief Set error - void setError( const QgsError & theError ) { mError = theError;} + void setError( const QgsError & error ) { mError = error;} QString toString() const; - /** \brief For theExtent and theWidth, theHeight find rectangle covered by subextent. + /** \brief For extent and width, height find rectangle covered by subextent. * The output rect has x oriented from left to right and y from top to bottom * (upper-left to lower-right orientation). - * @param theExtent extent, usually the larger - * @param theWidth numbers of columns in theExtent - * @param theHeight numbers of rows in theExtent - * @param theSubExtent extent, usually smaller than theExtent + * @param extent extent, usually the larger + * @param width numbers of columns in theExtent + * @param height numbers of rows in theExtent + * @param subExtent extent, usually smaller than theExtent * @return the rectangle covered by sub extent */ - static QRect subRect( const QgsRectangle &theExtent, int theWidth, int theHeight, const QgsRectangle &theSubExtent ); + static QRect subRect( const QgsRectangle &extent, int width, int height, const QgsRectangle &subExtent ); /** Returns the width (number of columns) of the raster block. * @see height @@ -374,8 +374,8 @@ class CORE_EXPORT QgsRasterBlock int height() const { return mHeight; } private: - static QImage::Format imageFormat( Qgis::DataType theDataType ); - static Qgis::DataType dataType( QImage::Format theFormat ); + static QImage::Format imageFormat( Qgis::DataType dataType ); + static Qgis::DataType dataType( QImage::Format format ); /** Test if value is nodata comparing to noDataValue * @param value tested value diff --git a/src/core/raster/qgsrasterchecker.cpp b/src/core/raster/qgsrasterchecker.cpp index 91267730fa3..57cc04b1ba1 100644 --- a/src/core/raster/qgsrasterchecker.cpp +++ b/src/core/raster/qgsrasterchecker.cpp @@ -38,32 +38,32 @@ QgsRasterChecker::QgsRasterChecker() mErrMsgStyle = QStringLiteral( "color: #ff0000;" ); } -bool QgsRasterChecker::runTest( const QString& theVerifiedKey, QString theVerifiedUri, - const QString& theExpectedKey, QString theExpectedUri ) +bool QgsRasterChecker::runTest( const QString& verifiedKey, QString verifiedUri, + const QString& expectedKey, QString expectedUri ) { bool ok = true; mReport += QLatin1String( "\n\n" ); - //QgsRasterDataProvider* verifiedProvider = QgsRasterLayer::loadProvider( theVerifiedKey, theVerifiedUri ); - QgsRasterDataProvider* verifiedProvider = dynamic_cast< QgsRasterDataProvider* >( QgsProviderRegistry::instance()->provider( theVerifiedKey, theVerifiedUri ) ); + //QgsRasterDataProvider* verifiedProvider = QgsRasterLayer::loadProvider( verifiedKey, verifiedUri ); + QgsRasterDataProvider* verifiedProvider = dynamic_cast< QgsRasterDataProvider* >( QgsProviderRegistry::instance()->provider( verifiedKey, verifiedUri ) ); if ( !verifiedProvider || !verifiedProvider->isValid() ) { - error( QStringLiteral( "Cannot load provider %1 with URI: %2" ).arg( theVerifiedKey, theVerifiedUri ), mReport ); + error( QStringLiteral( "Cannot load provider %1 with URI: %2" ).arg( verifiedKey, verifiedUri ), mReport ); ok = false; } - //QgsRasterDataProvider* expectedProvider = QgsRasterLayer::loadProvider( theExpectedKey, theExpectedUri ); - QgsRasterDataProvider* expectedProvider = dynamic_cast< QgsRasterDataProvider* >( QgsProviderRegistry::instance()->provider( theExpectedKey, theExpectedUri ) ); + //QgsRasterDataProvider* expectedProvider = QgsRasterLayer::loadProvider( expectedKey, expectedUri ); + QgsRasterDataProvider* expectedProvider = dynamic_cast< QgsRasterDataProvider* >( QgsProviderRegistry::instance()->provider( expectedKey, expectedUri ) ); if ( !expectedProvider || !expectedProvider->isValid() ) { - error( QStringLiteral( "Cannot load provider %1 with URI: %2" ).arg( theExpectedKey, theExpectedUri ), mReport ); + error( QStringLiteral( "Cannot load provider %1 with URI: %2" ).arg( expectedKey, expectedUri ), mReport ); ok = false; } if ( !ok ) return false; - mReport += QStringLiteral( "Verified URI: %1
" ).arg( theVerifiedUri.replace( '&', QLatin1String( "&" ) ) ); - mReport += QStringLiteral( "Expected URI: %1
" ).arg( theExpectedUri.replace( '&', QLatin1String( "&" ) ) ); + mReport += QStringLiteral( "Verified URI: %1
" ).arg( verifiedUri.replace( '&', QLatin1String( "&" ) ) ); + mReport += QStringLiteral( "Expected URI: %1
" ).arg( expectedUri.replace( '&', QLatin1String( "&" ) ) ); mReport += QLatin1String( "
" ); mReport += QStringLiteral( "\n" ).arg( mTabStyle ); @@ -192,11 +192,11 @@ bool QgsRasterChecker::runTest( const QString& theVerifiedKey, QString theVerifi return allOk; } -void QgsRasterChecker::error( const QString& theMessage, QString &theReport ) +void QgsRasterChecker::error( const QString& message, QString &report ) { - theReport += QStringLiteral( "Error: " ).arg( mErrMsgStyle ); - theReport += theMessage; - theReport += QLatin1String( "" ); + report += QStringLiteral( "Error: " ).arg( mErrMsgStyle ); + report += message; + report += QLatin1String( "" ); } double QgsRasterChecker::tolerance( double val, int places ) @@ -213,31 +213,33 @@ QString QgsRasterChecker::compareHead() return html; } -void QgsRasterChecker::compare( const QString& theParamName, int verifiedVal, int expectedVal, QString &theReport, bool &theOk ) +void QgsRasterChecker::compare( const QString& paramName, int verifiedVal, int expectedVal, QString &report, bool &ok ) { - bool ok = verifiedVal == expectedVal; - compareRow( theParamName, QString::number( verifiedVal ), QString::number( expectedVal ), theReport, ok, QString::number( verifiedVal - expectedVal ) ); - if ( !ok ) theOk = false; + bool isEqual = verifiedVal == expectedVal; + compareRow( paramName, QString::number( verifiedVal ), QString::number( expectedVal ), report, isEqual, QString::number( verifiedVal - expectedVal ) ); + if ( !isEqual ) + ok = false; } -bool QgsRasterChecker::compare( double verifiedVal, double expectedVal, double theTolerance ) +bool QgsRasterChecker::compare( double verifiedVal, double expectedVal, double tolerance ) { // values may be nan - return ( qIsNaN( verifiedVal ) && qIsNaN( expectedVal ) ) || ( qAbs( verifiedVal - expectedVal ) <= theTolerance ); + return ( qIsNaN( verifiedVal ) && qIsNaN( expectedVal ) ) || ( qAbs( verifiedVal - expectedVal ) <= tolerance ); } -void QgsRasterChecker::compare( const QString& theParamName, double verifiedVal, double expectedVal, QString &theReport, bool &theOk, double theTolerance ) +void QgsRasterChecker::compare( const QString& paramName, double verifiedVal, double expectedVal, QString &report, bool &ok, double tolerance ) { - bool ok = compare( verifiedVal, expectedVal, theTolerance ); - compareRow( theParamName, QString::number( verifiedVal ), QString::number( expectedVal ), theReport, ok, QString::number( verifiedVal - expectedVal ), QString::number( theTolerance ) ); - if ( !ok ) theOk = false; + bool isNearEqual = compare( verifiedVal, expectedVal, tolerance ); + compareRow( paramName, QString::number( verifiedVal ), QString::number( expectedVal ), report, isNearEqual, QString::number( verifiedVal - expectedVal ), QString::number( tolerance ) ); + if ( !isNearEqual ) + ok = false; } -void QgsRasterChecker::compareRow( const QString& theParamName, const QString& verifiedVal, const QString& expectedVal, QString &theReport, bool theOk, const QString& theDifference, const QString& theTolerance ) +void QgsRasterChecker::compareRow( const QString& paramName, const QString& verifiedVal, const QString& expectedVal, QString &report, bool ok, const QString& difference, const QString& tolerance ) { - theReport += QLatin1String( "\n" ); - theReport += QStringLiteral( "\n" ).arg( mCellStyle, theParamName, theOk ? mOkStyle : mErrStyle, verifiedVal, expectedVal ); - theReport += QStringLiteral( "\n" ).arg( mCellStyle, theDifference ); - theReport += QStringLiteral( "\n" ).arg( mCellStyle, theTolerance ); - theReport += QLatin1String( "" ); + report += QLatin1String( "\n" ); + report += QStringLiteral( "\n" ).arg( mCellStyle, paramName, ok ? mOkStyle : mErrStyle, verifiedVal, expectedVal ); + report += QStringLiteral( "\n" ).arg( mCellStyle, difference ); + report += QStringLiteral( "\n" ).arg( mCellStyle, tolerance ); + report += QLatin1String( "" ); } diff --git a/src/core/raster/qgsrasterchecker.h b/src/core/raster/qgsrasterchecker.h index 3412c241eaa..39ba3457378 100644 --- a/src/core/raster/qgsrasterchecker.h +++ b/src/core/raster/qgsrasterchecker.h @@ -36,13 +36,13 @@ class CORE_EXPORT QgsRasterChecker /** * Test using renderer to generate the image to be compared. - * @param theVerifiedKey verified provider key - * @param theVerifiedUri URI of the raster to be verified - * @param theExpectedKey expected provider key - * @param theExpectedUri URI of the expected (control) raster + * @param verifiedKey verified provider key + * @param verifiedUri URI of the raster to be verified + * @param expectedKey expected provider key + * @param expectedUri URI of the expected (control) raster */ - bool runTest( const QString& theVerifiedKey, QString theVerifiedUri, - const QString& theExpectedKey, QString theExpectedUri ); + bool runTest( const QString& verifiedKey, QString verifiedUri, + const QString& expectedKey, QString expectedUri ); private: QString mReport; QString mExpectedUri; @@ -54,13 +54,13 @@ class CORE_EXPORT QgsRasterChecker QString mErrMsgStyle; // Log error in html - void error( const QString& theMessage, QString &theReport ); + void error( const QString& message, QString &report ); // compare values and add table row in html report, set ok to false if not equal QString compareHead(); - bool compare( double verifiedVal, double expectedVal, double theTolerance ); - void compare( const QString& theParamName, int verifiedVal, int expectedVal, QString &theReport, bool &theOk ); - void compare( const QString& theParamName, double verifiedVal, double expectedVal, QString &theReport, bool &theOk, double theTolerance = 0 ); - void compareRow( const QString& theParamName, const QString& verifiedVal, const QString& expectedVal, QString &theReport, bool theOk, const QString& theDifference = "", const QString& theTolerance = "" ); + bool compare( double verifiedVal, double expectedVal, double tolerance ); + void compare( const QString& paramName, int verifiedVal, int expectedVal, QString &report, bool &ok ); + void compare( const QString& paramName, double verifiedVal, double expectedVal, QString &report, bool &ok, double tolerance = 0 ); + void compareRow( const QString& paramName, const QString& verifiedVal, const QString& expectedVal, QString &report, bool ok, const QString& difference = "", const QString& tolerance = "" ); double tolerance( double val, int places = 6 ); }; // class QgsRasterChecker diff --git a/src/core/raster/qgsrasterdataprovider.cpp b/src/core/raster/qgsrasterdataprovider.cpp index 2d087a36615..f783f9faca1 100644 --- a/src/core/raster/qgsrasterdataprovider.cpp +++ b/src/core/raster/qgsrasterdataprovider.cpp @@ -43,15 +43,15 @@ void QgsRasterDataProvider::setUseSourceNoDataValue( int bandNo, bool use ) mUseSrcNoDataValue[bandNo-1] = use; } -QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle const & theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback ) +QgsRasterBlock * QgsRasterDataProvider::block( int bandNo, QgsRectangle const & boundingBox, int width, int height, QgsRasterBlockFeedback* feedback ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theWidth = %2 theHeight = %3" ).arg( theBandNo ).arg( theWidth ).arg( theHeight ), 4 ); - QgsDebugMsgLevel( QString( "theExtent = %1" ).arg( theExtent.toString() ), 4 ); + QgsDebugMsgLevel( QString( "bandNo = %1 width = %2 height = %3" ).arg( bandNo ).arg( width ).arg( height ), 4 ); + QgsDebugMsgLevel( QString( "boundingBox = %1" ).arg( boundingBox.toString() ), 4 ); - QgsRasterBlock *block = new QgsRasterBlock( dataType( theBandNo ), theWidth, theHeight ); - if ( sourceHasNoDataValue( theBandNo ) && useSourceNoDataValue( theBandNo ) ) + QgsRasterBlock *block = new QgsRasterBlock( dataType( bandNo ), width, height ); + if ( sourceHasNoDataValue( bandNo ) && useSourceNoDataValue( bandNo ) ) { - block->setNoDataValue( sourceNoDataValue( theBandNo ) ); + block->setNoDataValue( sourceNoDataValue( bandNo ) ); } if ( block->isEmpty() ) @@ -61,7 +61,7 @@ QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle cons } // Read necessary extent only - QgsRectangle tmpExtent = extent().intersect( &theExtent ); + QgsRectangle tmpExtent = extent().intersect( &boundingBox ); if ( tmpExtent.isEmpty() ) { @@ -70,8 +70,8 @@ QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle cons return block; } - double xRes = theExtent.width() / theWidth; - double yRes = theExtent.height() / theHeight; + double xRes = boundingBox.width() / width; + double yRes = boundingBox.height() / height; double tmpXRes, tmpYRes; double providerXRes = 0; double providerYRes = 0; @@ -90,27 +90,27 @@ QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle cons tmpYRes = yRes; } - if ( tmpExtent != theExtent || + if ( tmpExtent != boundingBox || tmpXRes > xRes || tmpYRes > yRes ) { // Read smaller extent or lower resolution - if ( !extent().contains( theExtent ) ) + if ( !extent().contains( boundingBox ) ) { - QRect subRect = QgsRasterBlock::subRect( theExtent, theWidth, theHeight, extent() ); + QRect subRect = QgsRasterBlock::subRect( boundingBox, width, height, extent() ); block->setIsNoDataExcept( subRect ); } // Calculate row/col limits (before tmpExtent is aligned) - int fromRow = qRound(( theExtent.yMaximum() - tmpExtent.yMaximum() ) / yRes ); - int toRow = qRound(( theExtent.yMaximum() - tmpExtent.yMinimum() ) / yRes ) - 1; - int fromCol = qRound(( tmpExtent.xMinimum() - theExtent.xMinimum() ) / xRes ); - int toCol = qRound(( tmpExtent.xMaximum() - theExtent.xMinimum() ) / xRes ) - 1; + int fromRow = qRound(( boundingBox.yMaximum() - tmpExtent.yMaximum() ) / yRes ); + int toRow = qRound(( boundingBox.yMaximum() - tmpExtent.yMinimum() ) / yRes ) - 1; + int fromCol = qRound(( tmpExtent.xMinimum() - boundingBox.xMinimum() ) / xRes ); + int toCol = qRound(( tmpExtent.xMaximum() - boundingBox.xMinimum() ) / xRes ) - 1; QgsDebugMsgLevel( QString( "fromRow = %1 toRow = %2 fromCol = %3 toCol = %4" ).arg( fromRow ).arg( toRow ).arg( fromCol ).arg( toCol ), 4 ); - if ( fromRow < 0 || fromRow >= theHeight || toRow < 0 || toRow >= theHeight || - fromCol < 0 || fromCol >= theWidth || toCol < 0 || toCol >= theWidth ) + if ( fromRow < 0 || fromRow >= height || toRow < 0 || toRow >= height || + fromCol < 0 || fromCol >= width || toCol < 0 || toCol >= width ) { // Should not happen QgsDebugMsg( "Row or column limits out of range" ); @@ -138,21 +138,21 @@ QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle cons tmpXRes = tmpExtent.width() / tmpWidth; tmpYRes = tmpExtent.height() / tmpHeight; - QgsDebugMsgLevel( QString( "Reading smaller block tmpWidth = %1 theHeight = %2" ).arg( tmpWidth ).arg( tmpHeight ), 4 ); + QgsDebugMsgLevel( QString( "Reading smaller block tmpWidth = %1 height = %2" ).arg( tmpWidth ).arg( tmpHeight ), 4 ); QgsDebugMsgLevel( QString( "tmpExtent = %1" ).arg( tmpExtent.toString() ), 4 ); - QgsRasterBlock *tmpBlock = new QgsRasterBlock( dataType( theBandNo ), tmpWidth, tmpHeight ); - if ( sourceHasNoDataValue( theBandNo ) && useSourceNoDataValue( theBandNo ) ) + QgsRasterBlock *tmpBlock = new QgsRasterBlock( dataType( bandNo ), tmpWidth, tmpHeight ); + if ( sourceHasNoDataValue( bandNo ) && useSourceNoDataValue( bandNo ) ) { - tmpBlock->setNoDataValue( sourceNoDataValue( theBandNo ) ); + tmpBlock->setNoDataValue( sourceNoDataValue( bandNo ) ); } - readBlock( theBandNo, tmpExtent, tmpWidth, tmpHeight, tmpBlock->bits(), feedback ); + readBlock( bandNo, tmpExtent, tmpWidth, tmpHeight, tmpBlock->bits(), feedback ); - int pixelSize = dataTypeSize( theBandNo ); + int pixelSize = dataTypeSize( bandNo ); - double xMin = theExtent.xMinimum(); - double yMax = theExtent.yMaximum(); + double xMin = boundingBox.xMinimum(); + double yMax = boundingBox.yMaximum(); double tmpXMin = tmpExtent.xMinimum(); double tmpYMax = tmpExtent.yMaximum(); @@ -175,7 +175,7 @@ QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle cons } qgssize tmpIndex = static_cast< qgssize >( tmpRow ) * static_cast< qgssize >( tmpWidth ) + tmpCol; - qgssize index = row * static_cast< qgssize >( theWidth ) + col; + qgssize index = row * static_cast< qgssize >( width ) + col; char *tmpBits = tmpBlock->bits( tmpIndex ); char *bits = block->bits( index ); @@ -197,13 +197,13 @@ QgsRasterBlock * QgsRasterDataProvider::block( int theBandNo, QgsRectangle cons } else { - readBlock( theBandNo, theExtent, theWidth, theHeight, block->bits(), feedback ); + readBlock( bandNo, boundingBox, width, height, block->bits(), feedback ); } // apply scale and offset - block->applyScaleOffset( bandScale( theBandNo ), bandOffset( theBandNo ) ); + block->applyScaleOffset( bandScale( bandNo ), bandOffset( bandNo ) ); // apply user no data values - block->applyNoDataValues( userNoDataValues( theBandNo ) ); + block->applyNoDataValues( userNoDataValues( bandNo ) ); return block; } @@ -269,18 +269,18 @@ QString QgsRasterDataProvider::metadata() } // Default implementation for values -QgsRasterIdentifyResult QgsRasterDataProvider::identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight , int /*theDpi*/ ) +QgsRasterIdentifyResult QgsRasterDataProvider::identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox, int width, int height , int /*dpi*/ ) { QgsDebugMsgLevel( "Entered", 4 ); QMap results; - if ( theFormat != QgsRaster::IdentifyFormatValue || !( capabilities() & IdentifyValue ) ) + if ( format != QgsRaster::IdentifyFormatValue || !( capabilities() & IdentifyValue ) ) { QgsDebugMsg( "Format not supported" ); return QgsRasterIdentifyResult( ERR( tr( "Format not supported" ) ) ); } - if ( !extent().contains( thePoint ) ) + if ( !extent().contains( point ) ) { // Outside the raster for ( int bandNo = 1; bandNo <= bandCount(); bandNo++ ) @@ -290,28 +290,29 @@ QgsRasterIdentifyResult QgsRasterDataProvider::identify( const QgsPoint & thePoi return QgsRasterIdentifyResult( QgsRaster::IdentifyFormatValue, results ); } - QgsRectangle myExtent = theExtent; - if ( myExtent.isEmpty() ) myExtent = extent(); + QgsRectangle finalExtent = boundingBox; + if ( finalExtent.isEmpty() ) + finalExtent = extent(); - if ( theWidth == 0 ) + if ( width == 0 ) { - theWidth = capabilities() & Size ? xSize() : 1000; + width = capabilities() & Size ? xSize() : 1000; } - if ( theHeight == 0 ) + if ( height == 0 ) { - theHeight = capabilities() & Size ? ySize() : 1000; + height = capabilities() & Size ? ySize() : 1000; } // Calculate the row / column where the point falls - double xres = ( myExtent.width() ) / theWidth; - double yres = ( myExtent.height() ) / theHeight; + double xres = ( finalExtent.width() ) / width; + double yres = ( finalExtent.height() ) / height; - int col = static_cast< int >( floor(( thePoint.x() - myExtent.xMinimum() ) / xres ) ); - int row = static_cast< int >( floor(( myExtent.yMaximum() - thePoint.y() ) / yres ) ); + int col = static_cast< int >( floor(( point.x() - finalExtent.xMinimum() ) / xres ) ); + int row = static_cast< int >( floor(( finalExtent.yMaximum() - point.y() ) / yres ) ); - double xMin = myExtent.xMinimum() + col * xres; + double xMin = finalExtent.xMinimum() + col * xres; double xMax = xMin + xres; - double yMax = myExtent.yMaximum() - row * yres; + double yMax = finalExtent.yMaximum() - row * yres; double yMin = yMax - yres; QgsRectangle pixelExtent( xMin, yMin, xMax, yMax ); diff --git a/src/core/raster/qgsrasterdataprovider.h b/src/core/raster/qgsrasterdataprovider.h index 14db90875d5..fb04e643b69 100644 --- a/src/core/raster/qgsrasterdataprovider.h +++ b/src/core/raster/qgsrasterdataprovider.h @@ -103,9 +103,9 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast virtual Qgis::DataType sourceDataType( int bandNo ) const override = 0; //! Returns data type for the band specified by number - virtual int colorInterpretation( int theBandNo ) const + virtual int colorInterpretation( int bandNo ) const { - Q_UNUSED( theBandNo ); + Q_UNUSED( bandNo ); return QgsRaster::UndefinedColorInterpretation; } @@ -172,9 +172,9 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast //! Reload data (data could change) virtual bool reload() { return true; } - virtual QString colorInterpretationName( int theBandNo ) const + virtual QString colorInterpretationName( int bandNo ) const { - return colorName( colorInterpretation( theBandNo ) ); + return colorName( colorInterpretation( bandNo ) ); } /** Read band scale for raster value @@ -190,7 +190,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast // TODO: remove or make protected all readBlock working with void* //! Read block of data using given extent and size. - virtual QgsRasterBlock *block( int theBandNo, const QgsRectangle &theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback = nullptr ) override; + virtual QgsRasterBlock *block( int bandNo, const QgsRectangle &boundingBox, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) override; //! Return true if source band has no data value virtual bool sourceHasNoDataValue( int bandNo ) const { return mSrcHasNoDataValue.value( bandNo -1 ); } @@ -258,15 +258,15 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast } //! \brief Create pyramid overviews - virtual QString buildPyramids( const QList & thePyramidList, - const QString & theResamplingMethod = "NEAREST", - QgsRaster::RasterPyramidsFormat theFormat = QgsRaster::PyramidsGTiff, - const QStringList & theConfigOptions = QStringList() ) + virtual QString buildPyramids( const QList & pyramidList, + const QString & resamplingMethod = "NEAREST", + QgsRaster::RasterPyramidsFormat format = QgsRaster::PyramidsGTiff, + const QStringList & configOptions = QStringList() ) { - Q_UNUSED( thePyramidList ); - Q_UNUSED( theResamplingMethod ); - Q_UNUSED( theFormat ); - Q_UNUSED( theConfigOptions ); + Q_UNUSED( pyramidList ); + Q_UNUSED( resamplingMethod ); + Q_UNUSED( format ); + Q_UNUSED( configOptions ); return QStringLiteral( "FAILED_NOT_SUPPORTED" ); } @@ -290,7 +290,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast virtual QString metadata() = 0; /** \brief Identify raster value(s) found on the point position. The context - * parameters theExtent, theWidth and theHeight are important to identify + * parameters extent, width and height are important to identify * on the same zoom level as a displayed map and to do effective * caching (WCS). If context params are not specified the highest * resolution is used. capabilities() may be used to test if format @@ -299,12 +299,12 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast * * \note The arbitraryness of the returned document is enforced by WMS standards * up to at least v1.3.0 - * @param thePoint coordinates in data source CRS - * @param theFormat result format - * @param theExtent context extent - * @param theWidth context width - * @param theHeight context height - * @param theDpi context dpi + * @param point coordinates in data source CRS + * @param format result format + * @param boundingBox context bounding box + * @param width context width + * @param height context height + * @param dpi context dpi * @return QgsRaster::IdentifyFormatValue: map of values for each band, keys are band numbers * (from 1). * QgsRaster::IdentifyFormatFeature: map of QgsRasterFeatureList for each sublayer @@ -312,8 +312,8 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast * QgsRaster::IdentifyFormatHtml: map of HTML strings for each sublayer (WMS). * Empty if failed or there are no results (TODO: better error reporting). */ - //virtual QMap identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0 ); - virtual QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ); + //virtual QMap identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &extent = QgsRectangle(), int width = 0, int height = 0 ); + virtual QgsRasterIdentifyResult identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ); /** * \brief Returns the caption error text for the last error in this provider @@ -434,8 +434,8 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast * @note used by GDAL provider only */ virtual QString validatePyramidsConfigOptions( QgsRaster::RasterPyramidsFormat pyramidsFormat, - const QStringList & theConfigOptions, const QString & fileFormat ) - { Q_UNUSED( pyramidsFormat ); Q_UNUSED( theConfigOptions ); Q_UNUSED( fileFormat ); return QString(); } + const QStringList & configOptions, const QString & fileFormat ) + { Q_UNUSED( pyramidsFormat ); Q_UNUSED( configOptions ); Q_UNUSED( fileFormat ); return QString(); } static QString identifyFormatName( QgsRaster::IdentifyFormat format ); static QgsRaster::IdentifyFormat identifyFormatFromName( const QString& formatName ); @@ -459,9 +459,9 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast signals: /** Emit a signal to notify of the progress event. - * Emitted theProgress is in percents (0.0-100.0) */ - void progress( int theType, double theProgress, const QString& theMessage ); - void progressUpdate( int theProgress ); + * Emitted progress is in percents (0.0-100.0) */ + void progress( int type, double progress, const QString& message ); + void progressUpdate( int progress ); /** Emit a message to be displayed on status bar, usually used by network providers (WMS,WCS) * @note added in 2.14 @@ -500,7 +500,7 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast /** Source no data value is available and is set to be used or internal no data * is available. Used internally only */ - //bool hasNoDataValue ( int theBandNo ); + //bool hasNoDataValue ( int bandNo ); //! \brief Cell value representing original source no data. e.g. -9999, indexed from 0 QList mSrcNoDataValue; diff --git a/src/core/raster/qgsrasterdrawer.cpp b/src/core/raster/qgsrasterdrawer.cpp index e47cc210a9e..14aadd77208 100644 --- a/src/core/raster/qgsrasterdrawer.cpp +++ b/src/core/raster/qgsrasterdrawer.cpp @@ -31,10 +31,10 @@ QgsRasterDrawer::QgsRasterDrawer( QgsRasterIterator* iterator ): mIterator( iter { } -void QgsRasterDrawer::draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel, QgsRasterBlockFeedback* feedback ) +void QgsRasterDrawer::draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* qgsMapToPixel, QgsRasterBlockFeedback* feedback ) { QgsDebugMsgLevel( "Entered", 4 ); - if ( !p || !mIterator || !viewPort || !theQgsMapToPixel ) + if ( !p || !mIterator || !viewPort || !qgsMapToPixel ) { return; } @@ -98,7 +98,7 @@ void QgsRasterDrawer::draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsM p->setCompositionMode( QPainter::CompositionMode_Source ); } - drawImage( p, viewPort, img, topLeftCol, topLeftRow, theQgsMapToPixel ); + drawImage( p, viewPort, img, topLeftCol, topLeftRow, qgsMapToPixel ); delete block; @@ -111,7 +111,7 @@ void QgsRasterDrawer::draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsM } } -void QgsRasterDrawer::drawImage( QPainter* p, QgsRasterViewPort* viewPort, const QImage& img, int topLeftCol, int topLeftRow, const QgsMapToPixel* theQgsMapToPixel ) const +void QgsRasterDrawer::drawImage( QPainter* p, QgsRasterViewPort* viewPort, const QImage& img, int topLeftCol, int topLeftRow, const QgsMapToPixel* qgsMapToPixel ) const { if ( !p || !viewPort ) { @@ -128,12 +128,12 @@ void QgsRasterDrawer::drawImage( QPainter* p, QgsRasterViewPort* viewPort, const // which should not harm anything p->setBrush( QBrush( QColor( Qt::white ), Qt::NoBrush ) ); - if ( theQgsMapToPixel ) + if ( qgsMapToPixel ) { - int w = theQgsMapToPixel->mapWidth(); - int h = theQgsMapToPixel->mapHeight(); + int w = qgsMapToPixel->mapWidth(); + int h = qgsMapToPixel->mapHeight(); - double rotation = theQgsMapToPixel->mapRotation(); + double rotation = qgsMapToPixel->mapRotation(); if ( rotation ) { // both viewPort and image sizes are dependent on scale diff --git a/src/core/raster/qgsrasterdrawer.h b/src/core/raster/qgsrasterdrawer.h index feabcaa6bc5..36bbfed0c63 100644 --- a/src/core/raster/qgsrasterdrawer.h +++ b/src/core/raster/qgsrasterdrawer.h @@ -40,10 +40,10 @@ class CORE_EXPORT QgsRasterDrawer /** Draws raster data. * @param p destination QPainter * @param viewPort viewport to render - * @param theQgsMapToPixel map to pixel converter + * @param qgsMapToPixel map to pixel converter * @param feedback optional raster feedback object for cancelation/preview. Added in QGIS 3.0. */ - void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* theQgsMapToPixel, QgsRasterBlockFeedback* feedback = nullptr ); + void draw( QPainter* p, QgsRasterViewPort* viewPort, const QgsMapToPixel* qgsMapToPixel, QgsRasterBlockFeedback* feedback = nullptr ); protected: diff --git a/src/core/raster/qgsrasteridentifyresult.cpp b/src/core/raster/qgsrasteridentifyresult.cpp index a78187dff16..6759f90b520 100644 --- a/src/core/raster/qgsrasteridentifyresult.cpp +++ b/src/core/raster/qgsrasteridentifyresult.cpp @@ -28,17 +28,17 @@ QgsRasterIdentifyResult::QgsRasterIdentifyResult() { } -QgsRasterIdentifyResult::QgsRasterIdentifyResult( QgsRaster::IdentifyFormat theFormat, const QMap& theResults ) +QgsRasterIdentifyResult::QgsRasterIdentifyResult( QgsRaster::IdentifyFormat format, const QMap& results ) : mValid( true ) - , mFormat( theFormat ) - , mResults( theResults ) + , mFormat( format ) + , mResults( results ) { } -QgsRasterIdentifyResult::QgsRasterIdentifyResult( const QgsError& theError ) +QgsRasterIdentifyResult::QgsRasterIdentifyResult( const QgsError& error ) : mValid( false ) , mFormat( QgsRaster::IdentifyFormatUndefined ) - , mError( theError ) + , mError( error ) { } diff --git a/src/core/raster/qgsrasteridentifyresult.h b/src/core/raster/qgsrasteridentifyresult.h index a34315c506f..e39e4a12c96 100644 --- a/src/core/raster/qgsrasteridentifyresult.h +++ b/src/core/raster/qgsrasteridentifyresult.h @@ -32,15 +32,15 @@ class CORE_EXPORT QgsRasterIdentifyResult QgsRasterIdentifyResult(); /** \brief Constructor. Creates valid result. - * @param theFormat the result format - * @param theResults the results + * @param format the result format + * @param results the results */ - QgsRasterIdentifyResult( QgsRaster::IdentifyFormat theFormat, const QMap& theResults ); + QgsRasterIdentifyResult( QgsRaster::IdentifyFormat format, const QMap& results ); /** \brief Constructor. Creates invalid result with error. - * @param theError the error + * @param error the error */ - QgsRasterIdentifyResult( const QgsError& theError ); + QgsRasterIdentifyResult( const QgsError& error ); virtual ~QgsRasterIdentifyResult() = default; @@ -58,7 +58,7 @@ class CORE_EXPORT QgsRasterIdentifyResult QMap results() const { return mResults; } //! Set map of optional parameters - void setParams( const QMap & theParams ) { mParams = theParams; } + void setParams( const QMap & params ) { mParams = params; } //! Get map of optional parameters QMap params() const { return mParams; } @@ -67,7 +67,7 @@ class CORE_EXPORT QgsRasterIdentifyResult QgsError error() const { return mError; } //! \brief Set error - void setError( const QgsError & theError ) { mError = theError;} + void setError( const QgsError & error ) { mError = error;} private: //! \brief Is valid diff --git a/src/core/raster/qgsrasterinterface.cpp b/src/core/raster/qgsrasterinterface.cpp index 7beb7d2c885..9e72e8050d1 100644 --- a/src/core/raster/qgsrasterinterface.cpp +++ b/src/core/raster/qgsrasterinterface.cpp @@ -36,33 +36,33 @@ QgsRasterInterface::QgsRasterInterface( QgsRasterInterface * input ) { } -void QgsRasterInterface::initStatistics( QgsRasterBandStats &theStatistics, - int theBandNo, - int theStats, - const QgsRectangle & theExtent, - int theSampleSize ) +void QgsRasterInterface::initStatistics( QgsRasterBandStats &statistics, + int bandNo, + int stats, + const QgsRectangle & boundingBox, + int sampleSize ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theSampleSize = %2" ).arg( theBandNo ).arg( theSampleSize ), 4 ); + QgsDebugMsgLevel( QString( "theBandNo = %1 sampleSize = %2" ).arg( bandNo ).arg( sampleSize ), 4 ); - theStatistics.bandNumber = theBandNo; - theStatistics.statsGathered = theStats; + statistics.bandNumber = bandNo; + statistics.statsGathered = stats; - QgsRectangle myExtent; - if ( theExtent.isEmpty() ) + QgsRectangle finalExtent; + if ( boundingBox.isEmpty() ) { - myExtent = extent(); + finalExtent = extent(); } else { - myExtent = extent().intersect( &theExtent ); + finalExtent = extent().intersect( &boundingBox ); } - theStatistics.extent = myExtent; + statistics.extent = finalExtent; - if ( theSampleSize > 0 ) + if ( sampleSize > 0 ) { // Calc resolution from theSampleSize double xRes, yRes; - xRes = yRes = sqrt(( myExtent.width() * myExtent.height() ) / theSampleSize ); + xRes = yRes = sqrt(( finalExtent.width() * finalExtent.height() ) / sampleSize ); // But limit by physical resolution if ( capabilities() & Size ) @@ -74,35 +74,35 @@ void QgsRasterInterface::initStatistics( QgsRasterBandStats &theStatistics, } QgsDebugMsgLevel( QString( "xRes = %1 yRes = %2" ).arg( xRes ).arg( yRes ), 4 ); - theStatistics.width = static_cast ( myExtent.width() / xRes ); - theStatistics.height = static_cast ( myExtent.height() / yRes ); + statistics.width = static_cast ( finalExtent.width() / xRes ); + statistics.height = static_cast ( finalExtent.height() / yRes ); } else { if ( capabilities() & Size ) { - theStatistics.width = xSize(); - theStatistics.height = ySize(); + statistics.width = xSize(); + statistics.height = ySize(); } else { - theStatistics.width = 1000; - theStatistics.height = 1000; + statistics.width = 1000; + statistics.height = 1000; } } - QgsDebugMsgLevel( QString( "theStatistics.width = %1 theStatistics.height = %2" ).arg( theStatistics.width ).arg( theStatistics.height ), 4 ); + QgsDebugMsgLevel( QString( "theStatistics.width = %1 statistics.height = %2" ).arg( statistics.width ).arg( statistics.height ), 4 ); } -bool QgsRasterInterface::hasStatistics( int theBandNo, - int theStats, - const QgsRectangle & theExtent, - int theSampleSize ) +bool QgsRasterInterface::hasStatistics( int bandNo, + int stats, + const QgsRectangle & extent, + int sampleSize ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theStats = %2 theSampleSize = %3" ).arg( theBandNo ).arg( theStats ).arg( theSampleSize ), 4 ); + QgsDebugMsgLevel( QString( "theBandNo = %1 stats = %2 sampleSize = %3" ).arg( bandNo ).arg( stats ).arg( sampleSize ), 4 ); if ( mStatistics.isEmpty() ) return false; QgsRasterBandStats myRasterBandStats; - initStatistics( myRasterBandStats, theBandNo, theStats, theExtent, theSampleSize ); + initStatistics( myRasterBandStats, bandNo, stats, extent, sampleSize ); Q_FOREACH ( const QgsRasterBandStats& stats, mStatistics ) { @@ -115,17 +115,17 @@ bool QgsRasterInterface::hasStatistics( int theBandNo, return false; } -QgsRasterBandStats QgsRasterInterface::bandStatistics( int theBandNo, - int theStats, - const QgsRectangle & theExtent, - int theSampleSize ) +QgsRasterBandStats QgsRasterInterface::bandStatistics( int bandNo, + int stats, + const QgsRectangle & extent, + int sampleSize ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theStats = %2 theSampleSize = %3" ).arg( theBandNo ).arg( theStats ).arg( theSampleSize ), 4 ); + QgsDebugMsgLevel( QString( "theBandNo = %1 stats = %2 sampleSize = %3" ).arg( bandNo ).arg( stats ).arg( sampleSize ), 4 ); // TODO: null values set on raster layer!!! QgsRasterBandStats myRasterBandStats; - initStatistics( myRasterBandStats, theBandNo, theStats, theExtent, theSampleSize ); + initStatistics( myRasterBandStats, bandNo, stats, extent, sampleSize ); Q_FOREACH ( const QgsRasterBandStats& stats, mStatistics ) { @@ -140,7 +140,7 @@ QgsRasterBandStats QgsRasterInterface::bandStatistics( int theBandNo, int myWidth = myRasterBandStats.width; int myHeight = myRasterBandStats.height; - //int myDataType = dataType( theBandNo ); + //int myDataType = dataType( bandNo ); int myXBlockSize = xBlockSize(); int myYBlockSize = yBlockSize(); @@ -180,7 +180,7 @@ QgsRasterBandStats QgsRasterInterface::bandStatistics( int theBandNo, QgsRectangle myPartExtent( xmin, ymin, xmax, ymax ); - QgsRasterBlock* blk = block( theBandNo, myPartExtent, myBlockWidth, myBlockHeight ); + QgsRasterBlock* blk = block( bandNo, myPartExtent, myBlockWidth, myBlockHeight ); // Collect the histogram counts. for ( qgssize i = 0; i < ( static_cast< qgssize >( myBlockHeight ) ) * myBlockWidth; i++ ) @@ -242,67 +242,67 @@ QgsRasterBandStats QgsRasterInterface::bandStatistics( int theBandNo, return myRasterBandStats; } -void QgsRasterInterface::initHistogram( QgsRasterHistogram &theHistogram, - int theBandNo, - int theBinCount, - double theMinimum, double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ) +void QgsRasterInterface::initHistogram( QgsRasterHistogram &histogram, + int bandNo, + int binCount, + double minimum, double maximum, + const QgsRectangle & boundingBox, + int sampleSize, + bool includeOutOfRange ) { - theHistogram.bandNumber = theBandNo; - theHistogram.minimum = theMinimum; - theHistogram.maximum = theMaximum; - theHistogram.includeOutOfRange = theIncludeOutOfRange; + histogram.bandNumber = bandNo; + histogram.minimum = minimum; + histogram.maximum = maximum; + histogram.includeOutOfRange = includeOutOfRange; - int mySrcDataType = sourceDataType( theBandNo ); + int mySrcDataType = sourceDataType( bandNo ); - if ( qIsNaN( theHistogram.minimum ) ) + if ( qIsNaN( histogram.minimum ) ) { // TODO: this was OK when stats/histogram were calced in provider, // but what TODO in other interfaces? Check for mInput for now. if ( !mInput && mySrcDataType == Qgis::Byte ) { - theHistogram.minimum = 0; // see histogram() for shift for rounding + histogram.minimum = 0; // see histogram() for shift for rounding } else { // We need statistics -> avoid histogramDefaults in hasHistogram if possible // TODO: use approximated statistics if approximated histogram is requested // (theSampleSize > 0) - QgsRasterBandStats stats = bandStatistics( theBandNo, QgsRasterBandStats::Min, theExtent, theSampleSize ); - theHistogram.minimum = stats.minimumValue; + QgsRasterBandStats stats = bandStatistics( bandNo, QgsRasterBandStats::Min, boundingBox, sampleSize ); + histogram.minimum = stats.minimumValue; } } - if ( qIsNaN( theHistogram.maximum ) ) + if ( qIsNaN( histogram.maximum ) ) { if ( !mInput && mySrcDataType == Qgis::Byte ) { - theHistogram.maximum = 255; + histogram.maximum = 255; } else { - QgsRasterBandStats stats = bandStatistics( theBandNo, QgsRasterBandStats::Max, theExtent, theSampleSize ); - theHistogram.maximum = stats.maximumValue; + QgsRasterBandStats stats = bandStatistics( bandNo, QgsRasterBandStats::Max, boundingBox, sampleSize ); + histogram.maximum = stats.maximumValue; } } - QgsRectangle myExtent; - if ( theExtent.isEmpty() ) + QgsRectangle finalExtent; + if ( boundingBox.isEmpty() ) { - myExtent = extent(); + finalExtent = extent(); } else { - myExtent = extent().intersect( &theExtent ); + finalExtent = extent().intersect( &boundingBox ); } - theHistogram.extent = myExtent; + histogram.extent = finalExtent; - if ( theSampleSize > 0 ) + if ( sampleSize > 0 ) { // Calc resolution from theSampleSize double xRes, yRes; - xRes = yRes = sqrt(( myExtent.width() * myExtent.height() ) / theSampleSize ); + xRes = yRes = sqrt(( finalExtent.width() * finalExtent.height() ) / sampleSize ); // But limit by physical resolution if ( capabilities() & Size ) @@ -314,25 +314,25 @@ void QgsRasterInterface::initHistogram( QgsRasterHistogram &theHistogram, } QgsDebugMsgLevel( QString( "xRes = %1 yRes = %2" ).arg( xRes ).arg( yRes ), 4 ); - theHistogram.width = static_cast ( myExtent.width() / xRes ); - theHistogram.height = static_cast ( myExtent.height() / yRes ); + histogram.width = static_cast ( finalExtent.width() / xRes ); + histogram.height = static_cast ( finalExtent.height() / yRes ); } else { if ( capabilities() & Size ) { - theHistogram.width = xSize(); - theHistogram.height = ySize(); + histogram.width = xSize(); + histogram.height = ySize(); } else { - theHistogram.width = 1000; - theHistogram.height = 1000; + histogram.width = 1000; + histogram.height = 1000; } } - QgsDebugMsgLevel( QString( "theHistogram.width = %1 theHistogram.height = %2" ).arg( theHistogram.width ).arg( theHistogram.height ), 4 ); + QgsDebugMsgLevel( QString( "theHistogram.width = %1 histogram.height = %2" ).arg( histogram.width ).arg( histogram.height ), 4 ); - int myBinCount = theBinCount; + int myBinCount = binCount; if ( myBinCount == 0 ) { // TODO: this was OK when stats/histogram were calced in provider, @@ -344,7 +344,7 @@ void QgsRasterInterface::initHistogram( QgsRasterHistogram &theHistogram, else { // There is no best default value, to display something reasonable in histogram chart, binCount should be small, OTOH, to get precise data for cumulative cut, the number should be big. Because it is easier to define fixed lower value for the chart, we calc optimum binCount for higher resolution (to avoid calculating that where histogram() is used. In any any case, it does not make sense to use more than width*height; - myBinCount = theHistogram.width * theHistogram.height; + myBinCount = histogram.width * histogram.height; if ( myBinCount > 1000 ) myBinCount = 1000; // for Int16/Int32 make sure bin count <= actual range, because there is no sense in having @@ -353,30 +353,30 @@ void QgsRasterInterface::initHistogram( QgsRasterHistogram &theHistogram, mySrcDataType == Qgis::Int16 || mySrcDataType == Qgis::Int32 || mySrcDataType == Qgis::UInt16 || mySrcDataType == Qgis::UInt32 ) ) { - if ( myBinCount > theHistogram.maximum - theHistogram.minimum + 1 ) - myBinCount = int( ceil( theHistogram.maximum - theHistogram.minimum + 1 ) ); + if ( myBinCount > histogram.maximum - histogram.minimum + 1 ) + myBinCount = int( ceil( histogram.maximum - histogram.minimum + 1 ) ); } } } - theHistogram.binCount = myBinCount; - QgsDebugMsgLevel( QString( "theHistogram.binCount = %1" ).arg( theHistogram.binCount ), 4 ); + histogram.binCount = myBinCount; + QgsDebugMsgLevel( QString( "theHistogram.binCount = %1" ).arg( histogram.binCount ), 4 ); } -bool QgsRasterInterface::hasHistogram( int theBandNo, - int theBinCount, - double theMinimum, double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ) +bool QgsRasterInterface::hasHistogram( int bandNo, + int binCount, + double minimum, double maximum, + const QgsRectangle & extent, + int sampleSize, + bool includeOutOfRange ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theBinCount = %2 theMinimum = %3 theMaximum = %4 theSampleSize = %5" ).arg( theBandNo ).arg( theBinCount ).arg( theMinimum ).arg( theMaximum ).arg( theSampleSize ), 4 ); - // histogramDefaults() needs statistics if theMinimum or theMaximum is NaN -> + QgsDebugMsgLevel( QString( "theBandNo = %1 binCount = %2 minimum = %3 maximum = %4 sampleSize = %5" ).arg( bandNo ).arg( binCount ).arg( minimum ).arg( maximum ).arg( sampleSize ), 4 ); + // histogramDefaults() needs statistics if minimum or maximum is NaN -> // do other checks which don't need statistics before histogramDefaults() if ( mHistograms.isEmpty() ) return false; QgsRasterHistogram myHistogram; - initHistogram( myHistogram, theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ); + initHistogram( myHistogram, bandNo, binCount, minimum, maximum, extent, sampleSize, includeOutOfRange ); Q_FOREACH ( const QgsRasterHistogram& histogram, mHistograms ) { @@ -389,17 +389,17 @@ bool QgsRasterInterface::hasHistogram( int theBandNo, return false; } -QgsRasterHistogram QgsRasterInterface::histogram( int theBandNo, - int theBinCount, - double theMinimum, double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ) +QgsRasterHistogram QgsRasterInterface::histogram( int bandNo, + int binCount, + double minimum, double maximum, + const QgsRectangle & extent, + int sampleSize, + bool includeOutOfRange ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theBinCount = %2 theMinimum = %3 theMaximum = %4 theSampleSize = %5" ).arg( theBandNo ).arg( theBinCount ).arg( theMinimum ).arg( theMaximum ).arg( theSampleSize ), 4 ); + QgsDebugMsgLevel( QString( "theBandNo = %1 binCount = %2 minimum = %3 maximum = %4 sampleSize = %5" ).arg( bandNo ).arg( binCount ).arg( minimum ).arg( maximum ).arg( sampleSize ), 4 ); QgsRasterHistogram myHistogram; - initHistogram( myHistogram, theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ); + initHistogram( myHistogram, bandNo, binCount, minimum, maximum, extent, sampleSize, includeOutOfRange ); // Find cached Q_FOREACH ( const QgsRasterHistogram& histogram, mHistograms ) @@ -462,7 +462,7 @@ QgsRasterHistogram QgsRasterInterface::histogram( int theBandNo, QgsRectangle myPartExtent( xmin, ymin, xmax, ymax ); - QgsRasterBlock* blk = block( theBandNo, myPartExtent, myBlockWidth, myBlockHeight ); + QgsRasterBlock* blk = block( bandNo, myPartExtent, myBlockWidth, myBlockHeight ); // Collect the histogram counts. for ( qgssize i = 0; i < ( static_cast< qgssize >( myBlockHeight ) ) * myBlockWidth; i++ ) @@ -475,7 +475,7 @@ QgsRasterHistogram QgsRasterInterface::histogram( int theBandNo, int myBinIndex = static_cast ( qFloor(( myValue - myMinimum ) / myBinSize ) ); - if (( myBinIndex < 0 || myBinIndex > ( myBinCount - 1 ) ) && !theIncludeOutOfRange ) + if (( myBinIndex < 0 || myBinIndex > ( myBinCount - 1 ) ) && !includeOutOfRange ) { continue; } @@ -504,34 +504,34 @@ QgsRasterHistogram QgsRasterInterface::histogram( int theBandNo, return myHistogram; } -void QgsRasterInterface::cumulativeCut( int theBandNo, - double theLowerCount, double theUpperCount, - double &theLowerValue, double &theUpperValue, - const QgsRectangle & theExtent, - int theSampleSize ) +void QgsRasterInterface::cumulativeCut( int bandNo, + double lowerCount, double upperCount, + double &lowerValue, double &upperValue, + const QgsRectangle & extent, + int sampleSize ) { - QgsDebugMsgLevel( QString( "theBandNo = %1 theLowerCount = %2 theUpperCount = %3 theSampleSize = %4" ).arg( theBandNo ).arg( theLowerCount ).arg( theUpperCount ).arg( theSampleSize ), 4 ); + QgsDebugMsgLevel( QString( "theBandNo = %1 lowerCount = %2 upperCount = %3 sampleSize = %4" ).arg( bandNo ).arg( lowerCount ).arg( upperCount ).arg( sampleSize ), 4 ); - int mySrcDataType = sourceDataType( theBandNo ); + int mySrcDataType = sourceDataType( bandNo ); // Init to NaN is better than histogram min/max to catch errors - theLowerValue = std::numeric_limits::quiet_NaN(); - theUpperValue = std::numeric_limits::quiet_NaN(); + lowerValue = std::numeric_limits::quiet_NaN(); + upperValue = std::numeric_limits::quiet_NaN(); //get band stats to specify real histogram min/max (fix #9793 Byte bands) - QgsRasterBandStats stats = bandStatistics( theBandNo, QgsRasterBandStats::Min, theExtent, theSampleSize ); + QgsRasterBandStats stats = bandStatistics( bandNo, QgsRasterBandStats::Min, extent, sampleSize ); if ( stats.maximumValue < stats.minimumValue ) return; // for byte bands make sure bin count == actual range int myBinCount = ( mySrcDataType == Qgis::Byte ) ? int( ceil( stats.maximumValue - stats.minimumValue + 1 ) ) : 0; - QgsRasterHistogram myHistogram = histogram( theBandNo, myBinCount, stats.minimumValue, stats.maximumValue, theExtent, theSampleSize ); - //QgsRasterHistogram myHistogram = histogram( theBandNo, 0, std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), theExtent, theSampleSize ); + QgsRasterHistogram myHistogram = histogram( bandNo, myBinCount, stats.minimumValue, stats.maximumValue, extent, sampleSize ); + //QgsRasterHistogram myHistogram = histogram( bandNo, 0, std::numeric_limits::quiet_NaN(), std::numeric_limits::quiet_NaN(), extent, sampleSize ); double myBinXStep = ( myHistogram.maximum - myHistogram.minimum ) / myHistogram.binCount; int myCount = 0; - int myMinCount = static_cast< int >( qRound( theLowerCount * myHistogram.nonNullCount ) ); - int myMaxCount = static_cast< int >( qRound( theUpperCount * myHistogram.nonNullCount ) ); + int myMinCount = static_cast< int >( qRound( lowerCount * myHistogram.nonNullCount ) ); + int myMaxCount = static_cast< int >( qRound( upperCount * myHistogram.nonNullCount ) ); bool myLowerFound = false; QgsDebugMsgLevel( QString( "binCount = %1 minimum = %2 maximum = %3 myBinXStep = %4" ).arg( myHistogram.binCount ).arg( myHistogram.minimum ).arg( myHistogram.maximum ).arg( myBinXStep ), 4 ); QgsDebugMsgLevel( QString( "myMinCount = %1 myMaxCount = %2" ).arg( myMinCount ).arg( myMaxCount ), 4 ); @@ -542,14 +542,14 @@ void QgsRasterInterface::cumulativeCut( int theBandNo, myCount += myBinValue; if ( !myLowerFound && myCount > myMinCount ) { - theLowerValue = myHistogram.minimum + myBin * myBinXStep; + lowerValue = myHistogram.minimum + myBin * myBinXStep; myLowerFound = true; - QgsDebugMsgLevel( QString( "found lowerValue %1 at bin %2" ).arg( theLowerValue ).arg( myBin ), 4 ); + QgsDebugMsgLevel( QString( "found lowerValue %1 at bin %2" ).arg( lowerValue ).arg( myBin ), 4 ); } if ( myCount >= myMaxCount ) { - theUpperValue = myHistogram.minimum + myBin * myBinXStep; - QgsDebugMsgLevel( QString( "found upperValue %1 at bin %2" ).arg( theUpperValue ).arg( myBin ), 4 ); + upperValue = myHistogram.minimum + myBin * myBinXStep; + QgsDebugMsgLevel( QString( "found upperValue %1 at bin %2" ).arg( upperValue ).arg( myBin ), 4 ); break; } } @@ -559,10 +559,10 @@ void QgsRasterInterface::cumulativeCut( int theBandNo, mySrcDataType == Qgis::Int16 || mySrcDataType == Qgis::Int32 || mySrcDataType == Qgis::UInt16 || mySrcDataType == Qgis::UInt32 ) { - if ( theLowerValue != std::numeric_limits::quiet_NaN() ) - theLowerValue = floor( theLowerValue ); - if ( theUpperValue != std::numeric_limits::quiet_NaN() ) - theUpperValue = ceil( theUpperValue ); + if ( lowerValue != std::numeric_limits::quiet_NaN() ) + lowerValue = floor( lowerValue ); + if ( upperValue != std::numeric_limits::quiet_NaN() ) + upperValue = ceil( upperValue ); } } diff --git a/src/core/raster/qgsrasterinterface.h b/src/core/raster/qgsrasterinterface.h index e3b1469eae5..0efc2c95efe 100644 --- a/src/core/raster/qgsrasterinterface.h +++ b/src/core/raster/qgsrasterinterface.h @@ -138,9 +138,9 @@ class CORE_EXPORT QgsRasterInterface virtual int ySize() const { return mInput ? mInput->ySize() : 0; } //! \brief helper function to create zero padded band names - virtual QString generateBandName( int theBandNumber ) const + virtual QString generateBandName( int bandNumber ) const { - return tr( "Band" ) + QStringLiteral( " %1" ) .arg( theBandNumber, 1 + static_cast< int >( log10( static_cast< double >( bandCount() ) ) ), 10, QChar( '0' ) ); + return tr( "Band" ) + QStringLiteral( " %1" ) .arg( bandNumber, 1 + static_cast< int >( log10( static_cast< double >( bandCount() ) ) ), 10, QChar( '0' ) ); } /** Read block of data using given extent and size. @@ -188,71 +188,71 @@ class CORE_EXPORT QgsRasterInterface } /** \brief Get band statistics. - * @param theBandNo The band (number). - * @param theStats Requested statistics - * @param theExtent Extent used to calc statistics, if empty, whole raster extent is used. - * @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. + * @param bandNo The band (number). + * @param stats Requested statistics + * @param extent Extent used to calc statistics, if empty, whole raster extent is used. + * @param sampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. * @return Band statistics. */ - virtual QgsRasterBandStats bandStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ); + virtual QgsRasterBandStats bandStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0 ); /** \brief Returns true if histogram is available (cached, already calculated). * The parameters are the same as in bandStatistics() * @return true if statistics are available (ready to use) */ - virtual bool hasStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ); + virtual bool hasStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0 ); /** \brief Get histogram. Histograms are cached in providers. - * @param theBandNo The band (number). - * @param theBinCount Number of bins (intervals,buckets). If 0, the number of bins is decided automatically according to data type, raster size etc. - * @param theMinimum Minimum value, if NaN, raster minimum value will be used. - * @param theMaximum Maximum value, if NaN, raster minimum value will be used. - * @param theExtent Extent used to calc histogram, if empty, whole raster extent is used. - * @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. - * @param theIncludeOutOfRange include out of range values + * @param bandNo The band (number). + * @param binCount Number of bins (intervals,buckets). If 0, the number of bins is decided automatically according to data type, raster size etc. + * @param minimum Minimum value, if NaN, raster minimum value will be used. + * @param maximum Maximum value, if NaN, raster minimum value will be used. + * @param extent Extent used to calc histogram, if empty, whole raster extent is used. + * @param sampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. + * @param includeOutOfRange include out of range values * @return Vector of non NULL cell counts for each bin. - * @note theBinCount, theMinimum and theMaximum not optional in python bindings + * @note binCount, minimum and maximum not optional in python bindings */ - virtual QgsRasterHistogram histogram( int theBandNo, - int theBinCount = 0, - double theMinimum = std::numeric_limits::quiet_NaN(), - double theMaximum = std::numeric_limits::quiet_NaN(), - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0, - bool theIncludeOutOfRange = false ); + virtual QgsRasterHistogram histogram( int bandNo, + int binCount = 0, + double minimum = std::numeric_limits::quiet_NaN(), + double maximum = std::numeric_limits::quiet_NaN(), + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0, + bool includeOutOfRange = false ); /** \brief Returns true if histogram is available (cached, already calculated), the parameters are the same as in histogram() - * @note theBinCount, theMinimum and theMaximum not optional in python bindings + * @note binCount, minimum and maximum not optional in python bindings */ - virtual bool hasHistogram( int theBandNo, - int theBinCount, - double theMinimum = std::numeric_limits::quiet_NaN(), - double theMaximum = std::numeric_limits::quiet_NaN(), - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0, - bool theIncludeOutOfRange = false ); + virtual bool hasHistogram( int bandNo, + int binCount, + double minimum = std::numeric_limits::quiet_NaN(), + double maximum = std::numeric_limits::quiet_NaN(), + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0, + bool includeOutOfRange = false ); /** \brief Find values for cumulative pixel count cut. - * @param theBandNo The band (number). - * @param theLowerCount The lower count as fraction of 1, e.g. 0.02 = 2% - * @param theUpperCount The upper count as fraction of 1, e.g. 0.98 = 98% - * @param theLowerValue Location into which the lower value will be set. - * @param theUpperValue Location into which the upper value will be set. - * @param theExtent Extent used to calc histogram, if empty, whole raster extent is used. - * @param theSampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. + * @param bandNo The band (number). + * @param lowerCount The lower count as fraction of 1, e.g. 0.02 = 2% + * @param upperCount The upper count as fraction of 1, e.g. 0.98 = 98% + * @param lowerValue Location into which the lower value will be set. + * @param upperValue Location into which the upper value will be set. + * @param extent Extent used to calc histogram, if empty, whole raster extent is used. + * @param sampleSize Approximate number of cells in sample. If 0, all cells (whole raster will be used). If raster does not have exact size (WCS without exact size for example), provider decides size of sample. */ - virtual void cumulativeCut( int theBandNo, - double theLowerCount, - double theUpperCount, - double &theLowerValue, - double &theUpperValue, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ); + virtual void cumulativeCut( int bandNo, + double lowerCount, + double upperCount, + double &lowerValue, + double &upperValue, + const QgsRectangle & extent = QgsRectangle(), + int sampleSize = 0 ); //! Write base class members to xml. virtual void writeXml( QDomDocument& doc, QDomElement& parentElem ) const { Q_UNUSED( doc ); Q_UNUSED( parentElem ); } @@ -273,21 +273,21 @@ class CORE_EXPORT QgsRasterInterface bool mOn; /** Fill in histogram defaults if not specified - * @note theBinCount, theMinimum and theMaximum not optional in python bindings + * @note binCount, minimum and maximum not optional in python bindings */ - void initHistogram( QgsRasterHistogram &theHistogram, int theBandNo, - int theBinCount = 0, - double theMinimum = std::numeric_limits::quiet_NaN(), - double theMaximum = std::numeric_limits::quiet_NaN(), - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0, - bool theIncludeOutOfRange = false ); + void initHistogram( QgsRasterHistogram &histogram, int bandNo, + int binCount = 0, + double minimum = std::numeric_limits::quiet_NaN(), + double maximum = std::numeric_limits::quiet_NaN(), + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0, + bool includeOutOfRange = false ); //! Fill in statistics defaults if not specified - void initStatistics( QgsRasterBandStats &theStatistics, int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theBinCount = 0 ); + void initStatistics( QgsRasterBandStats &statistics, int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & boundingBox = QgsRectangle(), + int binCount = 0 ); private: Q_DISABLE_COPY( QgsRasterInterface ) // there is clone() for copying diff --git a/src/core/raster/qgsrasterlayer.cpp b/src/core/raster/qgsrasterlayer.cpp index 43b3b005c53..92a4b7f632a 100644 --- a/src/core/raster/qgsrasterlayer.cpp +++ b/src/core/raster/qgsrasterlayer.cpp @@ -74,7 +74,7 @@ email : tim at linfiniti.com #include // typedefs for provider plugin functions of interest -typedef bool isvalidrasterfilename_t( QString const & theFileNameQString, QString & retErrMsg ); +typedef bool isvalidrasterfilename_t( QString const & fileNameQString, QString & retErrMsg ); #define ERR(message) QGS_ERROR_MESSAGE(message,"Raster layer") @@ -153,7 +153,7 @@ QgsRasterLayer::~QgsRasterLayer() /** * This helper checks to see whether the file name appears to be a valid raster file name */ -bool QgsRasterLayer::isValidRasterFileName( const QString& theFileNameQString, QString& retErrMsg ) +bool QgsRasterLayer::isValidRasterFileName( const QString& fileNameQString, QString& retErrMsg ) { isvalidrasterfilename_t *pValid = reinterpret_cast< isvalidrasterfilename_t * >( cast_to_fptr( QgsProviderRegistry::instance()->function( "gdal", "isValidRasterFileName" ) ) ); if ( ! pValid ) @@ -162,14 +162,14 @@ bool QgsRasterLayer::isValidRasterFileName( const QString& theFileNameQString, Q return false; } - bool myIsValid = pValid( theFileNameQString, retErrMsg ); + bool myIsValid = pValid( fileNameQString, retErrMsg ); return myIsValid; } -bool QgsRasterLayer::isValidRasterFileName( QString const & theFileNameQString ) +bool QgsRasterLayer::isValidRasterFileName( QString const & fileNameQString ) { QString retErrMsg; - return isValidRasterFileName( theFileNameQString, retErrMsg ); + return isValidRasterFileName( fileNameQString, retErrMsg ); } QDateTime QgsRasterLayer::lastModified( QString const & name ) @@ -205,14 +205,14 @@ int QgsRasterLayer::bandCount() const return mDataProvider->bandCount(); } -QString QgsRasterLayer::bandName( int theBandNo ) const +QString QgsRasterLayer::bandName( int bandNo ) const { - return dataProvider()->generateBandName( theBandNo ); + return dataProvider()->generateBandName( bandNo ); } -void QgsRasterLayer::setRendererForDrawingStyle( QgsRaster::DrawingStyle theDrawingStyle ) +void QgsRasterLayer::setRendererForDrawingStyle( QgsRaster::DrawingStyle drawingStyle ) { - setRenderer( QgsApplication::rasterRendererRegistry()->defaultRendererForDrawingStyle( theDrawingStyle, mDataProvider ) ); + setRenderer( QgsApplication::rasterRendererRegistry()->defaultRendererForDrawingStyle( drawingStyle, mDataProvider ) ); } /** @@ -246,8 +246,8 @@ QgsMapLayerRenderer *QgsRasterLayer::createMapRenderer( QgsRenderContext& render void QgsRasterLayer::draw( QPainter * theQPainter, - QgsRasterViewPort * theRasterViewPort, - const QgsMapToPixel* theQgsMapToPixel ) + QgsRasterViewPort * rasterViewPort, + const QgsMapToPixel* qgsMapToPixel ) { QgsDebugMsgLevel( " 3 arguments", 4 ); QTime time; @@ -265,13 +265,13 @@ void QgsRasterLayer::draw( QPainter * theQPainter, // params in QgsRasterProjector if ( projector ) { - projector->setCrs( theRasterViewPort->mSrcCRS, theRasterViewPort->mDestCRS, theRasterViewPort->mSrcDatumTransform, theRasterViewPort->mDestDatumTransform ); + projector->setCrs( rasterViewPort->mSrcCRS, rasterViewPort->mDestCRS, rasterViewPort->mSrcDatumTransform, rasterViewPort->mDestDatumTransform ); } // Drawer to pipe? QgsRasterIterator iterator( mPipe.last() ); QgsRasterDrawer drawer( &iterator ); - drawer.draw( theQPainter, theRasterViewPort, theQgsMapToPixel ); + drawer.draw( theQPainter, rasterViewPort, qgsMapToPixel ); QgsDebugMsgLevel( QString( "total raster draw time (ms): %1" ).arg( time.elapsed(), 5 ), 4 ); } //end of draw method @@ -501,21 +501,21 @@ QString QgsRasterLayer::metadata() const } /** - * @param theBandNumber the number of the band to use for generating a pixmap of the associated palette + * @param bandNumber the number of the band to use for generating a pixmap of the associated palette * @return a 100x100 pixel QPixmap of the bands palette */ -QPixmap QgsRasterLayer::paletteAsPixmap( int theBandNumber ) +QPixmap QgsRasterLayer::paletteAsPixmap( int bandNumber ) { //TODO: This function should take dimensions QgsDebugMsgLevel( "entered.", 4 ); // Only do this for the GDAL provider? // Maybe WMS can do this differently using QImage::numColors and QImage::color() - if ( mDataProvider->colorInterpretation( theBandNumber ) == QgsRaster::PaletteIndex ) + if ( mDataProvider->colorInterpretation( bandNumber ) == QgsRaster::PaletteIndex ) { QgsDebugMsgLevel( "....found paletted image", 4 ); QgsColorRampShader myShader; - QList myColorRampItemList = mDataProvider->colorTable( theBandNumber ); + QList myColorRampItemList = mDataProvider->colorTable( bandNumber ); if ( !myColorRampItemList.isEmpty() ) { QgsDebugMsgLevel( "....got color ramp item list", 4 ); @@ -852,24 +852,24 @@ void QgsRasterLayer::computeMinMax( int band, } -void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, QgsRasterMinMaxOrigin::Limits theLimits, const QgsRectangle& theExtent, int theSampleSize, bool theGenerateLookupTableFlag ) +void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, QgsRasterMinMaxOrigin::Limits limits, const QgsRectangle& extent, int sampleSize, bool generateLookupTableFlag ) { - setContrastEnhancement( theAlgorithm, - theLimits, - theExtent, - theSampleSize, - theGenerateLookupTableFlag, + setContrastEnhancement( algorithm, + limits, + extent, + sampleSize, + generateLookupTableFlag, mPipe.renderer() ); } -void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, - QgsRasterMinMaxOrigin::Limits theLimits, - const QgsRectangle& theExtent, - int theSampleSize, - bool theGenerateLookupTableFlag, +void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, + QgsRasterMinMaxOrigin::Limits limits, + const QgsRectangle& extent, + int sampleSize, + bool generateLookupTableFlag, QgsRasterRenderer* rasterRenderer ) { - QgsDebugMsgLevel( QString( "theAlgorithm = %1 theLimits = %2 theExtent.isEmpty() = %3" ).arg( theAlgorithm ).arg( theLimits ).arg( theExtent.isEmpty() ), 4 ); + QgsDebugMsgLevel( QString( "theAlgorithm = %1 limits = %2 extent.isEmpty() = %3" ).arg( algorithm ).arg( limits ).arg( extent.isEmpty() ), 4 ); if ( !rasterRenderer || !mDataProvider ) { return; @@ -927,11 +927,11 @@ void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnh { Qgis::DataType myType = static_cast< Qgis::DataType >( mDataProvider->dataType( myBand ) ); std::unique_ptr myEnhancement( new QgsContrastEnhancement( static_cast< Qgis::DataType >( myType ) ) ); - myEnhancement->setContrastEnhancementAlgorithm( theAlgorithm, theGenerateLookupTableFlag ); + myEnhancement->setContrastEnhancementAlgorithm( algorithm, generateLookupTableFlag ); double min; double max; - computeMinMax( myBand, myMinMaxOrigin, theLimits, theExtent, theSampleSize, min, max ); + computeMinMax( myBand, myMinMaxOrigin, limits, extent, sampleSize, min, max ); if ( rendererType == QLatin1String( "singlebandpseudocolor" ) ) { @@ -942,7 +942,7 @@ void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnh QgsColorRampShader* colorRampShader = dynamic_cast( myPseudoColorRenderer->shader()->rasterShaderFunction() ); if ( colorRampShader ) { - colorRampShader->classifyColorRamp( myPseudoColorRenderer->band(), theExtent, myPseudoColorRenderer->input() ); + colorRampShader->classifyColorRamp( myPseudoColorRenderer->band(), extent, myPseudoColorRenderer->input() ); } } } @@ -973,8 +973,8 @@ void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnh //delete all remaining unused enhancements qDeleteAll( myEnhancements ); - myMinMaxOrigin.setLimits( theLimits ); - if ( theExtent != QgsRectangle() && + myMinMaxOrigin.setLimits( limits ); + if ( extent != QgsRectangle() && myMinMaxOrigin.extent() == QgsRasterMinMaxOrigin::WholeRaster ) { myMinMaxOrigin.setExtent( QgsRasterMinMaxOrigin::CurrentCanvas ); @@ -992,7 +992,7 @@ void QgsRasterLayer::setContrastEnhancement( QgsContrastEnhancement::ContrastEnh } } -void QgsRasterLayer::refreshContrastEnhancement( const QgsRectangle& theExtent ) +void QgsRasterLayer::refreshContrastEnhancement( const QgsRectangle& extent ) { QgsSingleBandGrayRenderer* singleBandRenderer = nullptr; QgsMultiBandColorRenderer* multiBandRenderer = nullptr; @@ -1012,7 +1012,7 @@ void QgsRasterLayer::refreshContrastEnhancement( const QgsRectangle& theExtent ) QgsContrastEnhancement::StretchToMinimumMaximum : ce->contrastEnhancementAlgorithm(), renderer()->minMaxOrigin().limits() == QgsRasterMinMaxOrigin::None ? QgsRasterMinMaxOrigin::MinMax : renderer()->minMaxOrigin().limits(), - theExtent, + extent, SAMPLE_SIZE, true, renderer() ); @@ -1025,7 +1025,7 @@ void QgsRasterLayer::refreshContrastEnhancement( const QgsRectangle& theExtent ) { setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, myLimits, - theExtent, + extent, SAMPLE_SIZE, true, renderer() ); @@ -1034,10 +1034,10 @@ void QgsRasterLayer::refreshContrastEnhancement( const QgsRectangle& theExtent ) } void QgsRasterLayer::refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, - const QgsRectangle& theExtent ) + const QgsRectangle& extent ) { if ( !( mDataProvider && - mLastRectangleUsedByRefreshContrastEnhancementIfNeeded != theExtent && + mLastRectangleUsedByRefreshContrastEnhancementIfNeeded != extent && rasterRenderer->minMaxOrigin().limits() != QgsRasterMinMaxOrigin::None && rasterRenderer->minMaxOrigin().extent() == QgsRasterMinMaxOrigin::UpdatedCanvas ) ) return; @@ -1056,12 +1056,12 @@ void QgsRasterLayer::refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, } else if (( sbpcr = dynamic_cast( rasterRenderer ) ) ) { - mLastRectangleUsedByRefreshContrastEnhancementIfNeeded = theExtent; + mLastRectangleUsedByRefreshContrastEnhancementIfNeeded = extent; double min; double max; computeMinMax( sbpcr->band(), rasterRenderer->minMaxOrigin(), - rasterRenderer->minMaxOrigin().limits(), theExtent, + rasterRenderer->minMaxOrigin().limits(), extent, SAMPLE_SIZE, min, max ); sbpcr->setClassificationMin( min ); sbpcr->setClassificationMax( max ); @@ -1071,7 +1071,7 @@ void QgsRasterLayer::refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, QgsColorRampShader* colorRampShader = dynamic_cast( sbpcr->shader()->rasterShaderFunction() ); if ( colorRampShader ) { - colorRampShader->classifyColorRamp( sbpcr->band(), theExtent, rasterRenderer->input() ); + colorRampShader->classifyColorRamp( sbpcr->band(), extent, rasterRenderer->input() ); } } @@ -1084,7 +1084,7 @@ void QgsRasterLayer::refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, QgsColorRampShader* colorRampShader = dynamic_cast( r->shader()->rasterShaderFunction() ); if ( colorRampShader ) { - colorRampShader->classifyColorRamp( sbpcr->band(), theExtent, rasterRenderer->input() ); + colorRampShader->classifyColorRamp( sbpcr->band(), extent, rasterRenderer->input() ); } } @@ -1097,11 +1097,11 @@ void QgsRasterLayer::refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, if ( ce && ce->contrastEnhancementAlgorithm() != QgsContrastEnhancement::NoEnhancement ) { - mLastRectangleUsedByRefreshContrastEnhancementIfNeeded = theExtent; + mLastRectangleUsedByRefreshContrastEnhancementIfNeeded = extent; setContrastEnhancement( ce->contrastEnhancementAlgorithm(), rasterRenderer->minMaxOrigin().limits(), - theExtent, + extent, SAMPLE_SIZE, true, rasterRenderer ); @@ -1229,32 +1229,32 @@ QDateTime QgsRasterLayer::timestamp() const return mDataProvider->timestamp(); } -void QgsRasterLayer::setRenderer( QgsRasterRenderer* theRenderer ) +void QgsRasterLayer::setRenderer( QgsRasterRenderer* renderer ) { QgsDebugMsgLevel( "Entered", 4 ); - if ( !theRenderer ) + if ( !renderer ) { return; } - mPipe.set( theRenderer ); + mPipe.set( renderer ); emit rendererChanged(); emit styleChanged(); } -void QgsRasterLayer::showProgress( int theValue ) +void QgsRasterLayer::showProgress( int value ) { - emit progressUpdate( theValue ); + emit progressUpdate( value ); } -void QgsRasterLayer::showStatusMessage( QString const & theMessage ) +void QgsRasterLayer::showStatusMessage( QString const & message ) { // QgsDebugMsg(QString("entered with '%1'.").arg(theMessage)); // Pass-through // TODO: See if we can connect signal-to-signal. This is a kludge according to the Qt doc. - emit statusChanged( theMessage ); + emit statusChanged( message ); } QStringList QgsRasterLayer::subLayers() const @@ -1314,12 +1314,12 @@ QImage QgsRasterLayer::previewAsImage( QSize size, const QColor& bgColor, QImage return myQImage; } -void QgsRasterLayer::onProgress( int theType, double theProgress, const QString& theMessage ) +void QgsRasterLayer::onProgress( int type, double progress, const QString& message ) { - Q_UNUSED( theType ); - Q_UNUSED( theMessage ); - QgsDebugMsgLevel( QString( "theProgress = %1" ).arg( theProgress ), 4 ); - emit progressUpdate( static_cast< int >( theProgress ) ); + Q_UNUSED( type ); + Q_UNUSED( message ); + QgsDebugMsgLevel( QString( "theProgress = %1" ).arg( progress ), 4 ); + emit progressUpdate( static_cast< int >( progress ) ); } ////////////////////////////////////////////////////////// @@ -1500,8 +1500,8 @@ bool QgsRasterLayer::readXml( const QDomNode& layer_node ) setDataProvider( mProviderKey ); if ( !mValid ) return false; - QString theError; - bool res = readSymbology( layer_node, theError ); + QString error; + bool res = readSymbology( layer_node, error ); // old wms settings we need to correct if ( res && mProviderKey == QLatin1String( "wms" ) && ( !renderer() || renderer()->type() != QLatin1String( "singlebandcolordata" ) ) ) diff --git a/src/core/raster/qgsrasterlayer.h b/src/core/raster/qgsrasterlayer.h index abfe4c24d79..be2e8448c58 100644 --- a/src/core/raster/qgsrasterlayer.h +++ b/src/core/raster/qgsrasterlayer.h @@ -210,8 +210,8 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer * but some sort of error occurs in processing the file, the error is * returned in retError. */ - static bool isValidRasterFileName( const QString & theFileNameQString, QString &retError ); - static bool isValidRasterFileName( const QString & theFileNameQString ); + static bool isValidRasterFileName( const QString & fileNameQString, QString &retError ); + static bool isValidRasterFileName( const QString & fileNameQString ); //! Return time stamp for given file name static QDateTime lastModified( const QString & name ); @@ -223,7 +223,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer LayerType rasterType() { return mRasterType; } //! Set raster renderer. Takes ownership of the renderer object - void setRenderer( QgsRasterRenderer* theRenderer ); + void setRenderer( QgsRasterRenderer* renderer ); QgsRasterRenderer* renderer() const { return mPipe.renderer(); } //! Set raster resample filter. Takes ownership of the resample filter object @@ -245,7 +245,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer int bandCount() const; //! \brief Get the name of a band given its number - QString bandName( int theBandNoInt ) const; + QString bandName( int bandNoInt ) const; //! Returns the data provider QgsRasterDataProvider* dataProvider(); @@ -266,7 +266,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer //! \brief This is an overloaded version of the draw() function that is called by both draw() and thumbnailAsPixmap void draw( QPainter * theQPainter, QgsRasterViewPort * myRasterViewPort, - const QgsMapToPixel* theQgsMapToPixel = nullptr ); + const QgsMapToPixel* qgsMapToPixel = nullptr ); //! Returns a list with classification items (Text and color) QgsLegendColorList legendSymbologyItems() const; @@ -277,7 +277,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer QString metadata() const override; //! \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned - QPixmap paletteAsPixmap( int theBandNumber = 1 ); + QPixmap paletteAsPixmap( int bandNumber = 1 ); //! \brief [ data provider interface ] Which provider is being used for this Raster Layer? QString providerType() const; @@ -287,30 +287,30 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer double rasterUnitsPerPixelY(); /** \brief Set contrast enhancement algorithm - * @param theAlgorithm Contrast enhancement algorithm - * @param theLimits Limits - * @param theExtent Extent used to calculate limits, if empty, use full layer extent - * @param theSampleSize Size of data sample to calculate limits, if 0, use full resolution - * @param theGenerateLookupTableFlag Generate lookup table. */ + * @param algorithm Contrast enhancement algorithm + * @param limits Limits + * @param extent Extent used to calculate limits, if empty, use full layer extent + * @param sampleSize Size of data sample to calculate limits, if 0, use full resolution + * @param generateLookupTableFlag Generate lookup table. */ - void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, - QgsRasterMinMaxOrigin::Limits theLimits = QgsRasterMinMaxOrigin::MinMax, - const QgsRectangle& theExtent = QgsRectangle(), - int theSampleSize = SAMPLE_SIZE, - bool theGenerateLookupTableFlag = true ); + void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, + QgsRasterMinMaxOrigin::Limits limits = QgsRasterMinMaxOrigin::MinMax, + const QgsRectangle& extent = QgsRectangle(), + int sampleSize = SAMPLE_SIZE, + bool generateLookupTableFlag = true ); /** \brief Refresh contrast enhancement with new extent. * @note not available in python bindings */ // Used by QgisApp::legendLayerStretchUsingCurrentExtent() - void refreshContrastEnhancement( const QgsRectangle& theExtent ); + void refreshContrastEnhancement( const QgsRectangle& extent ); /** \brief Refresh renderer with new extent, if needed * @note not available in python bindings */ // Used by QgsRasterLayerRenderer - void refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, const QgsRectangle& theExtent ); + void refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer, const QgsRectangle& extent ); /** \brief Return default contrast enhancemnt settings for that type of raster. * @note not available in python bindings @@ -323,7 +323,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer void setDefaultContrastEnhancement(); //! \brief [ data provider interface ] A wrapper function to emit a progress update signal - void showProgress( int theValue ); + void showProgress( int value ); //! \brief Returns the sublayers of this layer - Useful for providers that manage their own layers, such as WMS virtual QStringList subLayers() const override; @@ -350,14 +350,14 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer virtual QDateTime timestamp() const override; public slots: - void showStatusMessage( const QString & theMessage ); + void showStatusMessage( const QString & message ); //! \brief receive progress signal from provider void onProgress( int, double, const QString& ); signals: //! \brief Signal for notifying listeners of long running processes - void progressUpdate( int theValue ); + void progressUpdate( int value ); protected: //! \brief Read the symbology for the current layer from the Dom node supplied @@ -389,13 +389,13 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer bool update(); //! Sets corresponding renderer for style - void setRendererForDrawingStyle( QgsRaster::DrawingStyle theDrawingStyle ); + void setRendererForDrawingStyle( QgsRaster::DrawingStyle drawingStyle ); - void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm, - QgsRasterMinMaxOrigin::Limits theLimits, - const QgsRectangle& theExtent, - int theSampleSize, - bool theGenerateLookupTableFlag, + void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm algorithm, + QgsRasterMinMaxOrigin::Limits limits, + const QgsRectangle& extent, + int sampleSize, + bool generateLookupTableFlag, QgsRasterRenderer* rasterRenderer ); void computeMinMax( int band, diff --git a/src/core/raster/qgsrasterlayerrenderer.cpp b/src/core/raster/qgsrasterlayerrenderer.cpp index a9731bfb426..e4d28f8fdb0 100644 --- a/src/core/raster/qgsrasterlayerrenderer.cpp +++ b/src/core/raster/qgsrasterlayerrenderer.cpp @@ -32,10 +32,10 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer* layer, QgsRender , mFeedback( new Feedback( this ) ) { mPainter = rendererContext.painter(); - const QgsMapToPixel& theQgsMapToPixel = rendererContext.mapToPixel(); - mMapToPixel = &theQgsMapToPixel; + const QgsMapToPixel& qgsMapToPixel = rendererContext.mapToPixel(); + mMapToPixel = &qgsMapToPixel; - QgsMapToPixel mapToPixel = theQgsMapToPixel; + QgsMapToPixel mapToPixel = qgsMapToPixel; if ( mapToPixel.mapRotation() ) { // unset rotation for the sake of local computations. diff --git a/src/core/raster/qgsrasterminmaxorigin.cpp b/src/core/raster/qgsrasterminmaxorigin.cpp index 0ee7c4e1344..4b86e5f3186 100644 --- a/src/core/raster/qgsrasterminmaxorigin.cpp +++ b/src/core/raster/qgsrasterminmaxorigin.cpp @@ -45,9 +45,9 @@ bool QgsRasterMinMaxOrigin::operator ==( const QgsRasterMinMaxOrigin& other ) co qAbs( mStdDevFactor - other.mStdDevFactor ) < 1e-5; } -QString QgsRasterMinMaxOrigin::limitsString( Limits theLimits ) +QString QgsRasterMinMaxOrigin::limitsString( Limits limits ) { - switch ( theLimits ) + switch ( limits ) { case MinMax: return QStringLiteral( "MinMax" ); @@ -61,17 +61,17 @@ QString QgsRasterMinMaxOrigin::limitsString( Limits theLimits ) return QStringLiteral( "None" ); } -QgsRasterMinMaxOrigin::Limits QgsRasterMinMaxOrigin::limitsFromString( const QString& theLimits ) +QgsRasterMinMaxOrigin::Limits QgsRasterMinMaxOrigin::limitsFromString( const QString& limits ) { - if ( theLimits == QLatin1String( "MinMax" ) ) + if ( limits == QLatin1String( "MinMax" ) ) { return MinMax; } - else if ( theLimits == QLatin1String( "StdDev" ) ) + else if ( limits == QLatin1String( "StdDev" ) ) { return StdDev; } - else if ( theLimits == QLatin1String( "CumulativeCut" ) ) + else if ( limits == QLatin1String( "CumulativeCut" ) ) { return CumulativeCut; } @@ -92,17 +92,17 @@ QString QgsRasterMinMaxOrigin::extentString( Extent minMaxExtent ) return QStringLiteral( "WholeRaster" ); } -QgsRasterMinMaxOrigin::Extent QgsRasterMinMaxOrigin::extentFromString( const QString& theExtent ) +QgsRasterMinMaxOrigin::Extent QgsRasterMinMaxOrigin::extentFromString( const QString& extent ) { - if ( theExtent == QLatin1String( "WholeRaster" ) ) + if ( extent == QLatin1String( "WholeRaster" ) ) { return WholeRaster; } - else if ( theExtent == QLatin1String( "CurrentCanvas" ) ) + else if ( extent == QLatin1String( "CurrentCanvas" ) ) { return CurrentCanvas; } - else if ( theExtent == QLatin1String( "UpdatedCanvas" ) ) + else if ( extent == QLatin1String( "UpdatedCanvas" ) ) { return UpdatedCanvas; } @@ -112,16 +112,16 @@ QgsRasterMinMaxOrigin::Extent QgsRasterMinMaxOrigin::extentFromString( const QSt } } -QString QgsRasterMinMaxOrigin::statAccuracyString( StatAccuracy theAccuracy ) +QString QgsRasterMinMaxOrigin::statAccuracyString( StatAccuracy accuracy ) { - if ( theAccuracy == Exact ) + if ( accuracy == Exact ) return QStringLiteral( "Exact" ); return QStringLiteral( "Estimated" ); } -QgsRasterMinMaxOrigin::StatAccuracy QgsRasterMinMaxOrigin::statAccuracyFromString( const QString& theAccuracy ) +QgsRasterMinMaxOrigin::StatAccuracy QgsRasterMinMaxOrigin::statAccuracyFromString( const QString& accuracy ) { - if ( theAccuracy == QLatin1String( "Exact" ) ) + if ( accuracy == QLatin1String( "Exact" ) ) return Exact; return Estimated; } diff --git a/src/core/raster/qgsrasterminmaxorigin.h b/src/core/raster/qgsrasterminmaxorigin.h index 8c9758d9faa..89fa78b4432 100644 --- a/src/core/raster/qgsrasterminmaxorigin.h +++ b/src/core/raster/qgsrasterminmaxorigin.h @@ -103,13 +103,13 @@ class CORE_EXPORT QgsRasterMinMaxOrigin //////// Setter methods ///////////////////// //! \brief Set limits. - void setLimits( Limits theLimits ) { mLimits = theLimits; } + void setLimits( Limits limits ) { mLimits = limits; } //! \brief Set extent. - void setExtent( Extent theExtent ) { mExtent = theExtent; } + void setExtent( Extent extent ) { mExtent = extent; } //! \brief Set statistics accuracy. - void setStatAccuracy( StatAccuracy theAccuracy ) { mAccuracy = theAccuracy; } + void setStatAccuracy( StatAccuracy accuracy ) { mAccuracy = accuracy; } //! \brief Set lower bound of cumulative cut method (between 0 and 1). void setCumulativeCutLower( double val ) { mCumulativeCutLower = val; } @@ -131,22 +131,22 @@ class CORE_EXPORT QgsRasterMinMaxOrigin //////// Static methods ///////////////////// //! \brief Return a string to serialize Limits - static QString limitsString( Limits theLimits ); + static QString limitsString( Limits limits ); //! \brief Deserialize Limits - static Limits limitsFromString( const QString& theLimits ); + static Limits limitsFromString( const QString& limits ); //! \brief Return a string to serialize Extent - static QString extentString( Extent theExtent ); + static QString extentString( Extent extent ); //! \brief Deserialize Extent - static Extent extentFromString( const QString& theExtent ); + static Extent extentFromString( const QString& extent ); //! \brief Return a string to serialize StatAccuracy - static QString statAccuracyString( StatAccuracy theAccuracy ); + static QString statAccuracyString( StatAccuracy accuracy ); //! \brief Deserialize StatAccuracy - static StatAccuracy statAccuracyFromString( const QString& theAccuracy ); + static StatAccuracy statAccuracyFromString( const QString& accuracy ); private: diff --git a/src/core/raster/qgsrasterpipe.cpp b/src/core/raster/qgsrasterpipe.cpp index 3aa3d3d2eee..295320b50ad 100644 --- a/src/core/raster/qgsrasterpipe.cpp +++ b/src/core/raster/qgsrasterpipe.cpp @@ -33,11 +33,11 @@ QgsRasterPipe::QgsRasterPipe() { } -QgsRasterPipe::QgsRasterPipe( const QgsRasterPipe& thePipe ) +QgsRasterPipe::QgsRasterPipe( const QgsRasterPipe& pipe ) { - for ( int i = 0; i < thePipe.size(); i++ ) + for ( int i = 0; i < pipe.size(); i++ ) { - QgsRasterInterface* interface = thePipe.at( i ); + QgsRasterInterface* interface = pipe.at( i ); QgsRasterInterface* clone = interface->clone(); Role role = interfaceRole( clone ); @@ -62,16 +62,16 @@ QgsRasterPipe::~QgsRasterPipe() } } -bool QgsRasterPipe::connect( QVector theInterfaces ) +bool QgsRasterPipe::connect( QVector interfaces ) { QgsDebugMsgLevel( "Entered", 4 ); - for ( int i = 1; i < theInterfaces.size(); i++ ) + for ( int i = 1; i < interfaces.size(); i++ ) { - if ( ! theInterfaces[i]->setInput( theInterfaces[i-1] ) ) + if ( ! interfaces[i]->setInput( interfaces[i-1] ) ) { #ifdef QGISDEBUG - const QgsRasterInterface &a = *theInterfaces[i]; - const QgsRasterInterface &b = *theInterfaces[i-1]; + const QgsRasterInterface &a = *interfaces[i]; + const QgsRasterInterface &b = *interfaces[i-1]; QgsDebugMsg( QString( "cannot connect %1 to %2" ).arg( typeid( a ).name(), typeid( b ).name() ) ); #endif return false; @@ -80,9 +80,9 @@ bool QgsRasterPipe::connect( QVector theInterfaces ) return true; } -bool QgsRasterPipe::insert( int idx, QgsRasterInterface* theInterface ) +bool QgsRasterPipe::insert( int idx, QgsRasterInterface* interface ) { - QgsDebugMsgLevel( QString( "insert %1 at %2" ).arg( typeid( *theInterface ).name() ).arg( idx ), 4 ); + QgsDebugMsgLevel( QString( "insert %1 at %2" ).arg( typeid( *interface ).name() ).arg( idx ), 4 ); if ( idx > mInterfaces.size() ) { idx = mInterfaces.size(); @@ -91,13 +91,13 @@ bool QgsRasterPipe::insert( int idx, QgsRasterInterface* theInterface ) // of the whole pipe, because the types and band numbers may change QVector interfaces = mInterfaces; - interfaces.insert( idx, theInterface ); + interfaces.insert( idx, interface ); bool success = false; if ( connect( interfaces ) ) { success = true; - mInterfaces.insert( idx, theInterface ); - setRole( theInterface, idx ); + mInterfaces.insert( idx, interface ); + setRole( interface, idx ); QgsDebugMsgLevel( "inserted ok", 4 ); } @@ -106,25 +106,25 @@ bool QgsRasterPipe::insert( int idx, QgsRasterInterface* theInterface ) return success; } -bool QgsRasterPipe::replace( int idx, QgsRasterInterface* theInterface ) +bool QgsRasterPipe::replace( int idx, QgsRasterInterface* interface ) { - if ( !theInterface ) return false; + if ( !interface ) return false; - QgsDebugMsgLevel( QString( "replace by %1 at %2" ).arg( typeid( *theInterface ).name() ).arg( idx ), 4 ); + QgsDebugMsgLevel( QString( "replace by %1 at %2" ).arg( typeid( *interface ).name() ).arg( idx ), 4 ); if ( !checkBounds( idx ) ) return false; // make a copy of pipe to test connection, we test the connections // of the whole pipe, because the types and band numbers may change QVector interfaces = mInterfaces; - interfaces[idx] = theInterface; + interfaces[idx] = interface; bool success = false; if ( connect( interfaces ) ) { success = true; delete mInterfaces.at( idx ); - mInterfaces[idx] = theInterface; - setRole( theInterface, idx ); + mInterfaces[idx] = interface; + setRole( interface, idx ); QgsDebugMsgLevel( "replaced ok", 4 ); } @@ -148,26 +148,26 @@ QgsRasterPipe::Role QgsRasterPipe::interfaceRole( QgsRasterInterface * interface return role; } -void QgsRasterPipe::setRole( QgsRasterInterface * theInterface, int idx ) +void QgsRasterPipe::setRole( QgsRasterInterface * interface, int idx ) { - Role role = interfaceRole( theInterface ); + Role role = interfaceRole( interface ); if ( role == UnknownRole ) return; mRoleMap.insert( role, idx ); } -void QgsRasterPipe::unsetRole( QgsRasterInterface * theInterface ) +void QgsRasterPipe::unsetRole( QgsRasterInterface * interface ) { - Role role = interfaceRole( theInterface ); + Role role = interfaceRole( interface ); if ( role == UnknownRole ) return; mRoleMap.remove( role ); } -bool QgsRasterPipe::set( QgsRasterInterface* theInterface ) +bool QgsRasterPipe::set( QgsRasterInterface* interface ) { - if ( !theInterface ) return false; + if ( !interface ) return false; - QgsDebugMsgLevel( QString( "%1" ).arg( typeid( *theInterface ).name() ), 4 ); - Role role = interfaceRole( theInterface ); + QgsDebugMsgLevel( QString( "%1" ).arg( typeid( *interface ).name() ), 4 ); + Role role = interfaceRole( interface ); // We don't know where to place unknown interface if ( role == UnknownRole ) return false; @@ -177,7 +177,7 @@ bool QgsRasterPipe::set( QgsRasterInterface* theInterface ) { // An old interface of the same role exists -> replace // replace may still fail and return false - return replace( mRoleMap.value( role ), theInterface ); + return replace( mRoleMap.value( role ), interface ); } int idx = 0; @@ -219,7 +219,7 @@ bool QgsRasterPipe::set( QgsRasterInterface* theInterface ) idx = qMax( qMax( qMax( qMax( providerIdx, rendererIdx ), brightnessIdx ), hueSaturationIdx ), resamplerIdx ) + 1; } - return insert( idx, theInterface ); // insert may still fail and return false + return insert( idx, interface ); // insert may still fail and return false } QgsRasterInterface * QgsRasterPipe::interface( Role role ) const @@ -293,11 +293,11 @@ bool QgsRasterPipe::remove( int idx ) return success; } -bool QgsRasterPipe::remove( QgsRasterInterface * theInterface ) +bool QgsRasterPipe::remove( QgsRasterInterface * interface ) { - if ( !theInterface ) return false; + if ( !interface ) return false; - return remove( mInterfaces.indexOf( theInterface ) ); + return remove( mInterfaces.indexOf( interface ) ); } bool QgsRasterPipe::canSetOn( int idx, bool on ) diff --git a/src/core/raster/qgsrasterpipe.h b/src/core/raster/qgsrasterpipe.h index 3d2280d322b..5a4eb79041a 100644 --- a/src/core/raster/qgsrasterpipe.h +++ b/src/core/raster/qgsrasterpipe.h @@ -58,7 +58,7 @@ class CORE_EXPORT QgsRasterPipe }; QgsRasterPipe(); - QgsRasterPipe( const QgsRasterPipe& thePipe ); + QgsRasterPipe( const QgsRasterPipe& pipe ); ~QgsRasterPipe(); @@ -66,11 +66,11 @@ class CORE_EXPORT QgsRasterPipe /** Try to insert interface at specified index and connect * if connection would fail, the interface is not inserted and false is returned */ - bool insert( int idx, QgsRasterInterface* theInterface ); + bool insert( int idx, QgsRasterInterface* interface ); /** Try to replace interface at specified index and connect * if connection would fail, the interface is not inserted and false is returned */ - bool replace( int idx, QgsRasterInterface* theInterface ); + bool replace( int idx, QgsRasterInterface* interface ); /** Insert a new known interface in default place or replace interface of the same * role if it already exists. Known interfaces are: QgsRasterDataProvider, @@ -78,13 +78,13 @@ class CORE_EXPORT QgsRasterPipe * subclasses. For unknown interfaces it mus be explicitly specified position * where it should be inserted using insert() method. */ - bool set( QgsRasterInterface * theInterface ); + bool set( QgsRasterInterface * interface ); //! Remove and delete interface at given index if possible bool remove( int idx ); //! Remove and delete interface from pipe if possible - bool remove( QgsRasterInterface * theInterface ); + bool remove( QgsRasterInterface * interface ); int size() const { return mInterfaces.size(); } QgsRasterInterface * at( int idx ) const { return mInterfaces.at( idx ); } @@ -116,10 +116,10 @@ class CORE_EXPORT QgsRasterPipe QMap mRoleMap; // Set role in mRoleMap - void setRole( QgsRasterInterface * theInterface, int idx ); + void setRole( QgsRasterInterface * interface, int idx ); // Unset role in mRoleMap - void unsetRole( QgsRasterInterface * theInterface ); + void unsetRole( QgsRasterInterface * interface ); // Check if index is in bounds bool checkBounds( int idx ) const; @@ -129,7 +129,7 @@ class CORE_EXPORT QgsRasterPipe /** \brief Try to connect interfaces in pipe and to the provider at beginning. Returns true if connected or false if connection failed */ - bool connect( QVector theInterfaces ); + bool connect( QVector interfaces ); }; diff --git a/src/core/raster/qgsrasterprojector.cpp b/src/core/raster/qgsrasterprojector.cpp index 26c412560fa..f8d0c29dddf 100644 --- a/src/core/raster/qgsrasterprojector.cpp +++ b/src/core/raster/qgsrasterprojector.cpp @@ -64,10 +64,10 @@ Qgis::DataType QgsRasterProjector::dataType( int bandNo ) const /// @cond PRIVATE -void QgsRasterProjector::setCrs( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS, int srcDatumTransform, int destDatumTransform ) +void QgsRasterProjector::setCrs( const QgsCoordinateReferenceSystem & srcCRS, const QgsCoordinateReferenceSystem & destCRS, int srcDatumTransform, int destDatumTransform ) { - mSrcCRS = theSrcCRS; - mDestCRS = theDestCRS; + mSrcCRS = srcCRS; + mDestCRS = destCRS; mSrcDatumTransform = srcDatumTransform; mDestDatumTransform = destDatumTransform; } @@ -377,22 +377,22 @@ void ProjectorData::calcSrcRowsCols() } -inline void ProjectorData::destPointOnCPMatrix( int theRow, int theCol, double *theX, double *theY ) +inline void ProjectorData::destPointOnCPMatrix( int row, int col, double *theX, double *theY ) { - *theX = mDestExtent.xMinimum() + theCol * mDestExtent.width() / ( mCPCols - 1 ); - *theY = mDestExtent.yMaximum() - theRow * mDestExtent.height() / ( mCPRows - 1 ); + *theX = mDestExtent.xMinimum() + col * mDestExtent.width() / ( mCPCols - 1 ); + *theY = mDestExtent.yMaximum() - row * mDestExtent.height() / ( mCPRows - 1 ); } -inline int ProjectorData::matrixRow( int theDestRow ) +inline int ProjectorData::matrixRow( int destRow ) { - return static_cast< int >( floor(( theDestRow + 0.5 ) / mDestRowsPerMatrixRow ) ); + return static_cast< int >( floor(( destRow + 0.5 ) / mDestRowsPerMatrixRow ) ); } -inline int ProjectorData::matrixCol( int theDestCol ) +inline int ProjectorData::matrixCol( int destCol ) { - return static_cast< int >( floor(( theDestCol + 0.5 ) / mDestColsPerMatrixCol ) ); + return static_cast< int >( floor(( destCol + 0.5 ) / mDestColsPerMatrixCol ) ); } -void ProjectorData::calcHelper( int theMatrixRow, QgsPoint *thePoints ) +void ProjectorData::calcHelper( int matrixRow, QgsPoint *points ) { // TODO?: should we also precalc dest cell center coordinates for x and y? for ( int myDestCol = 0; myDestCol < mDestCols; myDestCol++ ) @@ -403,18 +403,18 @@ void ProjectorData::calcHelper( int theMatrixRow, QgsPoint *thePoints ) double myDestXMin, myDestYMin, myDestXMax, myDestYMax; - destPointOnCPMatrix( theMatrixRow, myMatrixCol, &myDestXMin, &myDestYMin ); - destPointOnCPMatrix( theMatrixRow, myMatrixCol + 1, &myDestXMax, &myDestYMax ); + destPointOnCPMatrix( matrixRow, myMatrixCol, &myDestXMin, &myDestYMin ); + destPointOnCPMatrix( matrixRow, myMatrixCol + 1, &myDestXMax, &myDestYMax ); double xfrac = ( myDestX - myDestXMin ) / ( myDestXMax - myDestXMin ); - QgsPoint &mySrcPoint0 = mCPMatrix[theMatrixRow][myMatrixCol]; - QgsPoint &mySrcPoint1 = mCPMatrix[theMatrixRow][myMatrixCol+1]; + QgsPoint &mySrcPoint0 = mCPMatrix[matrixRow][myMatrixCol]; + QgsPoint &mySrcPoint1 = mCPMatrix[matrixRow][myMatrixCol+1]; double s = mySrcPoint0.x() + ( mySrcPoint1.x() - mySrcPoint0.x() ) * xfrac; double t = mySrcPoint0.y() + ( mySrcPoint1.y() - mySrcPoint0.y() ) * xfrac; - thePoints[myDestCol].setX( s ); - thePoints[myDestCol].setY( t ); + points[myDestCol].setX( s ); + points[myDestCol].setY( t ); } } @@ -429,28 +429,28 @@ void ProjectorData::nextHelper() mHelperTopRow++; } -bool ProjectorData::srcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol ) +bool ProjectorData::srcRowCol( int destRow, int destCol, int *srcRow, int *srcCol ) { if ( mApproximate ) { - return approximateSrcRowCol( theDestRow, theDestCol, theSrcRow, theSrcCol ); + return approximateSrcRowCol( destRow, destCol, srcRow, srcCol ); } else { - return preciseSrcRowCol( theDestRow, theDestCol, theSrcRow, theSrcCol ); + return preciseSrcRowCol( destRow, destCol, srcRow, srcCol ); } } -bool ProjectorData::preciseSrcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol ) +bool ProjectorData::preciseSrcRowCol( int destRow, int destCol, int *srcRow, int *srcCol ) { #ifdef QGISDEBUG - QgsDebugMsgLevel( QString( "theDestRow = %1" ).arg( theDestRow ), 5 ); - QgsDebugMsgLevel( QString( "theDestRow = %1 mDestExtent.yMaximum() = %2 mDestYRes = %3" ).arg( theDestRow ).arg( mDestExtent.yMaximum() ).arg( mDestYRes ), 5 ); + QgsDebugMsgLevel( QString( "theDestRow = %1" ).arg( destRow ), 5 ); + QgsDebugMsgLevel( QString( "theDestRow = %1 mDestExtent.yMaximum() = %2 mDestYRes = %3" ).arg( destRow ).arg( mDestExtent.yMaximum() ).arg( mDestYRes ), 5 ); #endif // Get coordinate of center of destination cell - double x = mDestExtent.xMinimum() + ( theDestCol + 0.5 ) * mDestXRes; - double y = mDestExtent.yMaximum() - ( theDestRow + 0.5 ) * mDestYRes; + double x = mDestExtent.xMinimum() + ( destCol + 0.5 ) * mDestXRes; + double y = mDestExtent.yMaximum() - ( destRow + 0.5 ) * mDestYRes; double z = 0; #ifdef QGISDEBUG @@ -471,29 +471,29 @@ bool ProjectorData::preciseSrcRowCol( int theDestRow, int theDestCol, int *theSr return false; } // Get source row col - *theSrcRow = static_cast< int >( floor(( mSrcExtent.yMaximum() - y ) / mSrcYRes ) ); - *theSrcCol = static_cast< int >( floor(( x - mSrcExtent.xMinimum() ) / mSrcXRes ) ); + *srcRow = static_cast< int >( floor(( mSrcExtent.yMaximum() - y ) / mSrcYRes ) ); + *srcCol = static_cast< int >( floor(( x - mSrcExtent.xMinimum() ) / mSrcXRes ) ); #ifdef QGISDEBUG QgsDebugMsgLevel( QString( "mSrcExtent.yMinimum() = %1 mSrcExtent.yMaximum() = %2 mSrcYRes = %3" ).arg( mSrcExtent.yMinimum() ).arg( mSrcExtent.yMaximum() ).arg( mSrcYRes ), 5 ); - QgsDebugMsgLevel( QString( "theSrcRow = %1 theSrcCol = %2" ).arg( *theSrcRow ).arg( *theSrcCol ), 5 ); + QgsDebugMsgLevel( QString( "theSrcRow = %1 srcCol = %2" ).arg( *srcRow ).arg( *srcCol ), 5 ); #endif - // With epsg 32661 (Polar Stereographic) it was happening that *theSrcCol == mSrcCols + // With epsg 32661 (Polar Stereographic) it was happening that *srcCol == mSrcCols // For now silently correct limits to avoid crashes // TODO: review // should not happen - if ( *theSrcRow >= mSrcRows ) return false; - if ( *theSrcRow < 0 ) return false; - if ( *theSrcCol >= mSrcCols ) return false; - if ( *theSrcCol < 0 ) return false; + if ( *srcRow >= mSrcRows ) return false; + if ( *srcRow < 0 ) return false; + if ( *srcCol >= mSrcCols ) return false; + if ( *srcCol < 0 ) return false; return true; } -bool ProjectorData::approximateSrcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol ) +bool ProjectorData::approximateSrcRowCol( int destRow, int destCol, int *srcRow, int *srcCol ) { - int myMatrixRow = matrixRow( theDestRow ); - int myMatrixCol = matrixCol( theDestCol ); + int myMatrixRow = matrixRow( destRow ); + int myMatrixCol = matrixCol( destCol ); if ( myMatrixRow > mHelperTopRow ) { @@ -501,7 +501,7 @@ bool ProjectorData::approximateSrcRowCol( int theDestRow, int theDestCol, int *t nextHelper(); } - double myDestY = mDestExtent.yMaximum() - ( theDestRow + 0.5 ) * mDestYRes; + double myDestY = mDestExtent.yMaximum() - ( destRow + 0.5 ) * mDestYRes; // See the schema in javax.media.jai.WarpGrid doc (but up side down) // TODO: use some kind of cache of values which can be reused @@ -512,8 +512,8 @@ bool ProjectorData::approximateSrcRowCol( int theDestRow, int theDestCol, int *t double yfrac = ( myDestY - myDestYMin ) / ( myDestYMax - myDestYMin ); - QgsPoint &myTop = pHelperTop[theDestCol]; - QgsPoint &myBot = pHelperBottom[theDestCol]; + QgsPoint &myTop = pHelperTop[destCol]; + QgsPoint &myBot = pHelperBottom[destCol]; // Warning: this is very SLOW compared to the following code!: //double mySrcX = myBot.x() + (myTop.x() - myBot.x()) * yfrac; @@ -533,16 +533,16 @@ bool ProjectorData::approximateSrcRowCol( int theDestRow, int theDestCol, int *t // TODO: check again cell selection (coor is in the middle) - *theSrcRow = static_cast< int >( floor(( mSrcExtent.yMaximum() - mySrcY ) / mSrcYRes ) ); - *theSrcCol = static_cast< int >( floor(( mySrcX - mSrcExtent.xMinimum() ) / mSrcXRes ) ); + *srcRow = static_cast< int >( floor(( mSrcExtent.yMaximum() - mySrcY ) / mSrcYRes ) ); + *srcCol = static_cast< int >( floor(( mySrcX - mSrcExtent.xMinimum() ) / mSrcXRes ) ); // For now silently correct limits to avoid crashes // TODO: review // should not happen - if ( *theSrcRow >= mSrcRows ) return false; - if ( *theSrcRow < 0 ) return false; - if ( *theSrcCol >= mSrcCols ) return false; - if ( *theSrcCol < 0 ) return false; + if ( *srcRow >= mSrcRows ) return false; + if ( *srcRow < 0 ) return false; + if ( *srcCol >= mSrcCols ) return false; + if ( *srcCol < 0 ) return false; return true; } @@ -589,48 +589,48 @@ void ProjectorData::insertCols( const QgsCoordinateTransform& ct ) } -void ProjectorData::calcCP( int theRow, int theCol, const QgsCoordinateTransform& ct ) +void ProjectorData::calcCP( int row, int col, const QgsCoordinateTransform& ct ) { double myDestX, myDestY; - destPointOnCPMatrix( theRow, theCol, &myDestX, &myDestY ); + destPointOnCPMatrix( row, col, &myDestX, &myDestY ); QgsPoint myDestPoint( myDestX, myDestY ); try { if ( ct.isValid() ) { - mCPMatrix[theRow][theCol] = ct.transform( myDestPoint ); - mCPLegalMatrix[theRow][theCol] = true; + mCPMatrix[row][col] = ct.transform( myDestPoint ); + mCPLegalMatrix[row][col] = true; } else { - mCPLegalMatrix[theRow][theCol] = false; + mCPLegalMatrix[row][col] = false; } } catch ( QgsCsException &e ) { Q_UNUSED( e ); // Caught an error in transform - mCPLegalMatrix[theRow][theCol] = false; + mCPLegalMatrix[row][col] = false; } } -bool ProjectorData::calcRow( int theRow, const QgsCoordinateTransform& ct ) +bool ProjectorData::calcRow( int row, const QgsCoordinateTransform& ct ) { - QgsDebugMsgLevel( QString( "theRow = %1" ).arg( theRow ), 3 ); + QgsDebugMsgLevel( QString( "theRow = %1" ).arg( row ), 3 ); for ( int i = 0; i < mCPCols; i++ ) { - calcCP( theRow, i, ct ); + calcCP( row, i, ct ); } return true; } -bool ProjectorData::calcCol( int theCol, const QgsCoordinateTransform& ct ) +bool ProjectorData::calcCol( int col, const QgsCoordinateTransform& ct ) { - QgsDebugMsgLevel( QString( "theCol = %1" ).arg( theCol ), 3 ); + QgsDebugMsgLevel( QString( "theCol = %1" ).arg( col ), 3 ); for ( int i = 0; i < mCPRows; i++ ) { - calcCP( i, theCol, ct ); + calcCP( i, col, ct ); } return true; @@ -850,44 +850,44 @@ QgsRasterBlock * QgsRasterProjector::block( int bandNo, QgsRectangle const & ex return outputBlock; } -bool QgsRasterProjector::destExtentSize( const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize, - QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize ) +bool QgsRasterProjector::destExtentSize( const QgsRectangle& srcExtent, int srcXSize, int srcYSize, + QgsRectangle& destExtent, int& destXSize, int& destYSize ) { - if ( theSrcExtent.isEmpty() || theSrcXSize <= 0 || theSrcYSize <= 0 ) + if ( srcExtent.isEmpty() || srcXSize <= 0 || srcYSize <= 0 ) { return false; } QgsCoordinateTransform ct = QgsCoordinateTransformCache::instance()->transform( mSrcCRS.authid(), mDestCRS.authid(), mSrcDatumTransform, mDestDatumTransform ); - return extentSize( ct, theSrcExtent, theSrcXSize, theSrcYSize, theDestExtent, theDestXSize, theDestYSize ); + return extentSize( ct, srcExtent, srcXSize, srcYSize, destExtent, destXSize, destYSize ); } bool QgsRasterProjector::extentSize( const QgsCoordinateTransform& ct, - const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize, - QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize ) + const QgsRectangle& srcExtent, int srcXSize, int srcYSize, + QgsRectangle& destExtent, int& destXSize, int& destYSize ) { - if ( theSrcExtent.isEmpty() || theSrcXSize <= 0 || theSrcYSize <= 0 ) + if ( srcExtent.isEmpty() || srcXSize <= 0 || srcYSize <= 0 ) { return false; } - theDestExtent = ct.transformBoundingBox( theSrcExtent ); + destExtent = ct.transformBoundingBox( srcExtent ); // We reproject pixel rectangle from 9 points matrix of source extent, of course, it gives // bigger xRes,yRes than reprojected edges (envelope) - double srcXStep = theSrcExtent.width() / 3; - double srcYStep = theSrcExtent.height() / 3; - double srcXRes = theSrcExtent.width() / theSrcXSize; - double srcYRes = theSrcExtent.height() / theSrcYSize; + double srcXStep = srcExtent.width() / 3; + double srcYStep = srcExtent.height() / 3; + double srcXRes = srcExtent.width() / srcXSize; + double srcYRes = srcExtent.height() / srcYSize; double destXRes = std::numeric_limits::max(); double destYRes = std::numeric_limits::max(); for ( int i = 0; i < 3; i++ ) { - double x = theSrcExtent.xMinimum() + i * srcXStep; + double x = srcExtent.xMinimum() + i * srcXStep; for ( int j = 0; j < 3; j++ ) { - double y = theSrcExtent.yMinimum() + j * srcYStep; + double y = srcExtent.yMinimum() + j * srcYStep; QgsRectangle srcRectangle( x - srcXRes / 2, y - srcYRes / 2, x + srcXRes / 2, y + srcYRes / 2 ); QgsRectangle destRectangle = ct.transformBoundingBox( srcRectangle ); if ( destRectangle.width() > 0 ) @@ -900,8 +900,8 @@ bool QgsRasterProjector::extentSize( const QgsCoordinateTransform& ct, } } } - theDestXSize = std::max( 1, static_cast< int >( theDestExtent.width() / destYRes ) ); - theDestYSize = std::max( 1, static_cast< int >( theDestExtent.height() / destYRes ) ); + destXSize = std::max( 1, static_cast< int >( destExtent.width() / destYRes ) ); + destYSize = std::max( 1, static_cast< int >( destExtent.height() / destYRes ) ); return true; } diff --git a/src/core/raster/qgsrasterprojector.h b/src/core/raster/qgsrasterprojector.h index 365d4553a28..46e602081b3 100644 --- a/src/core/raster/qgsrasterprojector.h +++ b/src/core/raster/qgsrasterprojector.h @@ -64,7 +64,7 @@ class CORE_EXPORT QgsRasterProjector : public QgsRasterInterface Qgis::DataType dataType( int bandNo ) const override; //! \brief set source and destination CRS - void setCrs( const QgsCoordinateReferenceSystem & theSrcCRS, const QgsCoordinateReferenceSystem & theDestCRS, + void setCrs( const QgsCoordinateReferenceSystem & srcCRS, const QgsCoordinateReferenceSystem & destCRS, int srcDatumTransform = -1, int destDatumTransform = -1 ); //! \brief Get source CRS @@ -81,13 +81,13 @@ class CORE_EXPORT QgsRasterProjector : public QgsRasterInterface QgsRasterBlock *block( int bandNo, const QgsRectangle & extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) override; //! Calculate destination extent and size from source extent and size - bool destExtentSize( const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize, - QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize ); + bool destExtentSize( const QgsRectangle& srcExtent, int srcXSize, int srcYSize, + QgsRectangle& destExtent, int& destXSize, int& destYSize ); //! Calculate destination extent and size from source extent and size static bool extentSize( const QgsCoordinateTransform& ct, - const QgsRectangle& theSrcExtent, int theSrcXSize, int theSrcYSize, - QgsRectangle& theDestExtent, int& theDestXSize, int& theDestYSize ); + const QgsRectangle& srcExtent, int srcXSize, int srcYSize, + QgsRectangle& destExtent, int& destXSize, int& destYSize ); private: @@ -126,10 +126,10 @@ class ProjectorData ProjectorData& operator=( const ProjectorData& other ) = delete; /** \brief Get source row and column indexes for current source extent and resolution - If source pixel is outside source extent theSrcRow and theSrcCol are left unchanged. + If source pixel is outside source extent srcRow and srcCol are left unchanged. @return true if inside source */ - bool srcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol ); + bool srcRowCol( int destRow, int destCol, int *srcRow, int *srcCol ); QgsRectangle srcExtent() const { return mSrcExtent; } int srcRows() const { return mSrcRows; } @@ -138,17 +138,17 @@ class ProjectorData private: //! \brief get destination point for _current_ destination position - void destPointOnCPMatrix( int theRow, int theCol, double *theX, double *theY ); + void destPointOnCPMatrix( int row, int col, double *theX, double *theY ); //! \brief Get matrix upper left row/col indexes for destination row/col - int matrixRow( int theDestRow ); - int matrixCol( int theDestCol ); + int matrixRow( int destRow ); + int matrixCol( int destCol ); //! \brief Get precise source row and column indexes for current source extent and resolution - inline bool preciseSrcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol ); + inline bool preciseSrcRowCol( int destRow, int destCol, int *srcRow, int *srcCol ); //! \brief Get approximate source row and column indexes for current source extent and resolution - inline bool approximateSrcRowCol( int theDestRow, int theDestCol, int *theSrcRow, int *theSrcCol ); + inline bool approximateSrcRowCol( int destRow, int destCol, int *srcRow, int *srcCol ); //! \brief insert rows to matrix void insertRows( const QgsCoordinateTransform& ct ); @@ -157,13 +157,13 @@ class ProjectorData void insertCols( const QgsCoordinateTransform& ct ); //! Calculate single control point in current matrix - void calcCP( int theRow, int theCol, const QgsCoordinateTransform& ct ); + void calcCP( int row, int col, const QgsCoordinateTransform& ct ); //! \brief calculate matrix row - bool calcRow( int theRow, const QgsCoordinateTransform& ct ); + bool calcRow( int row, const QgsCoordinateTransform& ct ); //! \brief calculate matrix column - bool calcCol( int theCol, const QgsCoordinateTransform& ct ); + bool calcCol( int col, const QgsCoordinateTransform& ct ); //! \brief calculate source extent void calcSrcExtent(); @@ -180,7 +180,7 @@ class ProjectorData bool checkRows( const QgsCoordinateTransform& ct ); //! Calculate array of src helper points - void calcHelper( int theMatrixRow, QgsPoint *thePoints ); + void calcHelper( int matrixRow, QgsPoint *points ); //! Calc / switch helper void nextHelper(); diff --git a/src/core/raster/qgsrasterrange.cpp b/src/core/raster/qgsrasterrange.cpp index 13b11189fd8..5419f4d8390 100644 --- a/src/core/raster/qgsrasterrange.cpp +++ b/src/core/raster/qgsrasterrange.cpp @@ -25,9 +25,9 @@ QgsRasterRange::QgsRasterRange() { } -QgsRasterRange::QgsRasterRange( double theMin, double theMax ) - : mMin( theMin ) - , mMax( theMax ) +QgsRasterRange::QgsRasterRange( double min, double max ) + : mMin( min ) + , mMax( max ) { } diff --git a/src/core/raster/qgsrasterrange.h b/src/core/raster/qgsrasterrange.h index fb1ce908a7f..5b924f79775 100644 --- a/src/core/raster/qgsrasterrange.h +++ b/src/core/raster/qgsrasterrange.h @@ -38,16 +38,16 @@ class CORE_EXPORT QgsRasterRange QgsRasterRange(); /** \brief Constructor - * @param theMin minimum value - * @param theMax max value + * @param min minimum value + * @param max max value */ - QgsRasterRange( double theMin, double theMax ); + QgsRasterRange( double min, double max ); double min() const { return mMin; } double max() const { return mMax; } - double setMin( double theMin ) { return mMin = theMin; } - double setMax( double theMax ) { return mMax = theMax; } + double setMin( double min ) { return mMin = min; } + double setMax( double max ) { return mMax = max; } inline bool operator==( QgsRasterRange o ) const { diff --git a/src/core/raster/qgsrasterrenderer.h b/src/core/raster/qgsrasterrenderer.h index c7d7afd2f66..4d8de1b76dd 100644 --- a/src/core/raster/qgsrasterrenderer.h +++ b/src/core/raster/qgsrasterrenderer.h @@ -90,7 +90,7 @@ class CORE_EXPORT QgsRasterRenderer : public QgsRasterInterface const QgsRasterMinMaxOrigin& minMaxOrigin() const { return mMinMaxOrigin; } //! Sets origin of min/max values - void setMinMaxOrigin( const QgsRasterMinMaxOrigin& theOrigin ) { mMinMaxOrigin = theOrigin; } + void setMinMaxOrigin( const QgsRasterMinMaxOrigin& origin ) { mMinMaxOrigin = origin; } protected: diff --git a/src/core/raster/qgsrasterrendererregistry.cpp b/src/core/raster/qgsrasterrendererregistry.cpp index 90da8d5bda1..4a19920090b 100644 --- a/src/core/raster/qgsrasterrendererregistry.cpp +++ b/src/core/raster/qgsrasterrendererregistry.cpp @@ -30,11 +30,11 @@ #include #include -QgsRasterRendererRegistryEntry::QgsRasterRendererRegistryEntry( const QString& theName, const QString& theVisibleName, +QgsRasterRendererRegistryEntry::QgsRasterRendererRegistryEntry( const QString& name, const QString& visibleName, QgsRasterRendererCreateFunc rendererFunction, QgsRasterRendererWidgetCreateFunc widgetFunction ) - : name( theName ) - , visibleName( theVisibleName ) + : name( name ) + , visibleName( visibleName ) , rendererCreateFunction( rendererFunction ) , widgetCreateFunction( widgetFunction ) { @@ -108,7 +108,7 @@ QList< QgsRasterRendererRegistryEntry > QgsRasterRendererRegistry::entries() con return result; } -QgsRasterRenderer* QgsRasterRendererRegistry::defaultRendererForDrawingStyle( QgsRaster::DrawingStyle theDrawingStyle, QgsRasterDataProvider* provider ) const +QgsRasterRenderer* QgsRasterRendererRegistry::defaultRendererForDrawingStyle( QgsRaster::DrawingStyle drawingStyle, QgsRasterDataProvider* provider ) const { if ( !provider || provider->bandCount() < 1 ) { @@ -117,7 +117,7 @@ QgsRasterRenderer* QgsRasterRendererRegistry::defaultRendererForDrawingStyle( Qg QgsRasterRenderer* renderer = nullptr; - switch ( theDrawingStyle ) + switch ( drawingStyle ) { case QgsRaster::PalettedColor: { diff --git a/src/core/raster/qgsrasterrendererregistry.h b/src/core/raster/qgsrasterrendererregistry.h index e13f9a5ac58..826123eae68 100644 --- a/src/core/raster/qgsrasterrendererregistry.h +++ b/src/core/raster/qgsrasterrendererregistry.h @@ -37,7 +37,7 @@ typedef QgsRasterRendererWidget*( *QgsRasterRendererWidgetCreateFunc )( QgsRaste */ struct CORE_EXPORT QgsRasterRendererRegistryEntry { - QgsRasterRendererRegistryEntry( const QString& theName, const QString& theVisibleName, QgsRasterRendererCreateFunc rendererFunction, + QgsRasterRendererRegistryEntry( const QString& name, const QString& visibleName, QgsRasterRendererCreateFunc rendererFunction, QgsRasterRendererWidgetCreateFunc widgetFunction ); QgsRasterRendererRegistryEntry(); QString name; @@ -69,7 +69,7 @@ class CORE_EXPORT QgsRasterRendererRegistry /** Creates a default renderer for a raster drawing style (considering user options such as default contrast enhancement). Caller takes ownership*/ - QgsRasterRenderer* defaultRendererForDrawingStyle( QgsRaster::DrawingStyle theDrawingStyle, QgsRasterDataProvider* provider ) const; + QgsRasterRenderer* defaultRendererForDrawingStyle( QgsRaster::DrawingStyle drawingStyle, QgsRasterDataProvider* provider ) const; private: QHash< QString, QgsRasterRendererRegistryEntry > mEntries; diff --git a/src/core/raster/qgsrastershader.cpp b/src/core/raster/qgsrastershader.cpp index a66886d6bd6..c6791fa64af 100644 --- a/src/core/raster/qgsrastershader.cpp +++ b/src/core/raster/qgsrastershader.cpp @@ -25,12 +25,12 @@ email : ersts@amnh.org #include #include -QgsRasterShader::QgsRasterShader( double theMinimumValue, double theMaximumValue ) +QgsRasterShader::QgsRasterShader( double minimumValue, double maximumValue ) { QgsDebugMsgLevel( "called.", 4 ); - mMinimumValue = theMinimumValue; - mMaximumValue = theMaximumValue; + mMinimumValue = minimumValue; + mMaximumValue = maximumValue; mRasterShaderFunction = new QgsRasterShaderFunction( mMinimumValue, mMaximumValue ); } @@ -42,18 +42,18 @@ QgsRasterShader::~QgsRasterShader() /** Generates and new RGBA value based on one input value - @param theValue The original value to base a new RGBA value on - @param theReturnRedValue The red component of the new RGBA value - @param theReturnGreenValue The green component of the new RGBA value - @param theReturnBlueValue The blue component of the new RGBA value - @param theReturnAlpha The alpha component of the new RGBA value + @param value The original value to base a new RGBA value on + @param returnRedValue The red component of the new RGBA value + @param returnGreenValue The green component of the new RGBA value + @param returnBlueValue The blue component of the new RGBA value + @param returnAlpha The alpha component of the new RGBA value @return True if the return values are valid otherwise false */ -bool QgsRasterShader::shade( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int *theReturnAlpha ) +bool QgsRasterShader::shade( double value, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int *returnAlpha ) { if ( mRasterShaderFunction ) { - return mRasterShaderFunction->shade( theValue, theReturnRedValue, theReturnGreenValue, theReturnBlueValue, theReturnAlpha ); + return mRasterShaderFunction->shade( value, returnRedValue, returnGreenValue, returnBlueValue, returnAlpha ); } return false; @@ -63,21 +63,21 @@ bool QgsRasterShader::shade( double theValue, int* theReturnRedValue, int* theRe Generates and new RGBA value based on an original RGBA value - @param theRedValue The red component of the original value to base a new RGBA value on - @param theGreenValue The green component of the original value to base a new RGBA value on - @param theBlueValue The blue component of the original value to base a new RGBA value on - @param theAlphaValue The alpha component of the original value to base a new RGBA value on - @param theReturnRedValue The red component of the new RGBA value - @param theReturnGreenValue The green component of the new RGBA value - @param theReturnBlueValue The blue component of the new RGBA value - @param theReturnAlphaValue The alpha component of the new RGBA value + @param redValue The red component of the original value to base a new RGBA value on + @param greenValue The green component of the original value to base a new RGBA value on + @param blueValue The blue component of the original value to base a new RGBA value on + @param alphaValue The alpha component of the original value to base a new RGBA value on + @param returnRedValue The red component of the new RGBA value + @param returnGreenValue The green component of the new RGBA value + @param returnBlueValue The blue component of the new RGBA value + @param returnAlphaValue The alpha component of the new RGBA value @return True if the return values are valid otherwise false */ -bool QgsRasterShader::shade( double theRedValue, double theGreenValue, double theBlueValue, double theAlphaValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int* theReturnAlphaValue ) +bool QgsRasterShader::shade( double redValue, double greenValue, double blueValue, double alphaValue, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int* returnAlphaValue ) { if ( mRasterShaderFunction ) { - return mRasterShaderFunction->shade( theRedValue, theGreenValue, theBlueValue, theAlphaValue, theReturnRedValue, theReturnGreenValue, theReturnBlueValue, theReturnAlphaValue ); + return mRasterShaderFunction->shade( redValue, greenValue, blueValue, alphaValue, returnRedValue, returnGreenValue, returnBlueValue, returnAlphaValue ); } return false; @@ -86,51 +86,51 @@ bool QgsRasterShader::shade( double theRedValue, double theGreenValue, double th /** A public function that allows the user to set their own custom shader function. - @param theFunction A pointer to the new raster shader function + @param function A pointer to the new raster shader function */ -void QgsRasterShader::setRasterShaderFunction( QgsRasterShaderFunction* theFunction ) +void QgsRasterShader::setRasterShaderFunction( QgsRasterShaderFunction* function ) { QgsDebugMsgLevel( "called.", 4 ); - if ( mRasterShaderFunction == theFunction ) + if ( mRasterShaderFunction == function ) return; - if ( theFunction ) + if ( function ) { delete mRasterShaderFunction; - mRasterShaderFunction = theFunction; + mRasterShaderFunction = function; } } /** Set the maximum value for the raster shader. - @param theValue The new maximum value + @param value The new maximum value */ -void QgsRasterShader::setMaximumValue( double theValue ) +void QgsRasterShader::setMaximumValue( double value ) { - QgsDebugMsgLevel( "Value = " + QString::number( theValue ), 4 ); + QgsDebugMsgLevel( "Value = " + QString::number( value ), 4 ); - mMaximumValue = theValue; + mMaximumValue = value; if ( mRasterShaderFunction ) { - mRasterShaderFunction->setMaximumValue( theValue ); + mRasterShaderFunction->setMaximumValue( value ); } } /** Set the maximum value for the raster shader - @param theValue The new minimum value + @param value The new minimum value */ -void QgsRasterShader::setMinimumValue( double theValue ) +void QgsRasterShader::setMinimumValue( double value ) { - QgsDebugMsgLevel( "Value = " + QString::number( theValue ), 4 ); + QgsDebugMsgLevel( "Value = " + QString::number( value ), 4 ); - mMinimumValue = theValue; + mMinimumValue = value; if ( mRasterShaderFunction ) { - mRasterShaderFunction->setMinimumValue( theValue ); + mRasterShaderFunction->setMinimumValue( value ); } } diff --git a/src/core/raster/qgsrastershader.h b/src/core/raster/qgsrastershader.h index 4e508851399..4906fcfe7dc 100644 --- a/src/core/raster/qgsrastershader.h +++ b/src/core/raster/qgsrastershader.h @@ -33,7 +33,7 @@ class CORE_EXPORT QgsRasterShader { public: - QgsRasterShader( double theMinimumValue = 0.0, double theMaximumValue = 255.0 ); + QgsRasterShader( double minimumValue = 0.0, double maximumValue = 255.0 ); ~QgsRasterShader(); //! QgsRasterShader cannot be copied diff --git a/src/core/raster/qgsrastershaderfunction.cpp b/src/core/raster/qgsrastershaderfunction.cpp index 9e05574e5b5..5990c1fdc50 100644 --- a/src/core/raster/qgsrastershaderfunction.cpp +++ b/src/core/raster/qgsrastershaderfunction.cpp @@ -19,59 +19,59 @@ email : ersts@amnh.org #include "qgsrastershaderfunction.h" -QgsRasterShaderFunction::QgsRasterShaderFunction( double theMinimumValue, double theMaximumValue ) +QgsRasterShaderFunction::QgsRasterShaderFunction( double minimumValue, double maximumValue ) { QgsDebugMsgLevel( "entered.", 4 ); - mMinimumValue = theMinimumValue; - mMaximumValue = theMaximumValue; + mMinimumValue = minimumValue; + mMaximumValue = maximumValue; mMinimumMaximumRange = mMaximumValue - mMinimumValue; } /** Set the maximum value for the raster shader. - @param theValue The new maximum value + @param value The new maximum value */ -void QgsRasterShaderFunction::setMaximumValue( double theValue ) +void QgsRasterShaderFunction::setMaximumValue( double value ) { - QgsDebugMsgLevel( "value = " + QString::number( theValue ), 4 ); + QgsDebugMsgLevel( "value = " + QString::number( value ), 4 ); - mMaximumValue = theValue; + mMaximumValue = value; mMinimumMaximumRange = mMaximumValue - mMinimumValue; } /** Set the maximum value for the raster shader - @param theValue The new minimum value + @param value The new minimum value */ -void QgsRasterShaderFunction::setMinimumValue( double theValue ) +void QgsRasterShaderFunction::setMinimumValue( double value ) { - QgsDebugMsgLevel( "value = " + QString::number( theValue ), 4 ); + QgsDebugMsgLevel( "value = " + QString::number( value ), 4 ); - mMinimumValue = theValue; + mMinimumValue = value; mMinimumMaximumRange = mMaximumValue - mMinimumValue; } /** Generates and new RGBA value based on one input value - @param theValue The original value to base a new RGBA value on - @param theReturnRedValue The red component of the new RGBA value - @param theReturnGreenValue The green component of the new RGBA value - @param theReturnBlueValue The blue component of the new RGBA value - @param theReturnAlphaValue The blue component of the new RGBA value + @param value The original value to base a new RGBA value on + @param returnRedValue The red component of the new RGBA value + @param returnGreenValue The green component of the new RGBA value + @param returnBlueValue The blue component of the new RGBA value + @param returnAlphaValue The blue component of the new RGBA value @return True if the return values are valid otherwise false */ -bool QgsRasterShaderFunction::shade( double theValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int* theReturnAlphaValue ) +bool QgsRasterShaderFunction::shade( double value, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int* returnAlphaValue ) { - Q_UNUSED( theValue ); + Q_UNUSED( value ); - *theReturnRedValue = 0; - *theReturnGreenValue = 0; - *theReturnBlueValue = 0; - *theReturnAlphaValue = 0; + *returnRedValue = 0; + *returnGreenValue = 0; + *returnBlueValue = 0; + *returnAlphaValue = 0; return false; } @@ -80,27 +80,27 @@ bool QgsRasterShaderFunction::shade( double theValue, int* theReturnRedValue, in Generates and new RGBA value based on an original RGBA value - @param theRedValue The red component of the original value to base a new RGBA value on - @param theGreenValue The green component of the original value to base a new RGBA value on - @param theBlueValue The blue component of the original value to base a new RGBA value on - @param theAlphaValue The alpha component of the original value to base a new RGBA value on - @param theReturnRedValue The red component of the new RGBA value - @param theReturnGreenValue The green component of the new RGBA value - @param theReturnBlueValue The blue component of the new RGBA value - @param theReturnAlphaValue The alpha component of the new RGBA value + @param redValue The red component of the original value to base a new RGBA value on + @param greenValue The green component of the original value to base a new RGBA value on + @param blueValue The blue component of the original value to base a new RGBA value on + @param alphaValue The alpha component of the original value to base a new RGBA value on + @param returnRedValue The red component of the new RGBA value + @param returnGreenValue The green component of the new RGBA value + @param returnBlueValue The blue component of the new RGBA value + @param returnAlphaValue The alpha component of the new RGBA value @return True if the return values are valid otherwise false */ -bool QgsRasterShaderFunction::shade( double theRedValue, double theGreenValue, double theBlueValue, double theAlphaValue, int* theReturnRedValue, int* theReturnGreenValue, int* theReturnBlueValue, int *theReturnAlphaValue ) +bool QgsRasterShaderFunction::shade( double redValue, double greenValue, double blueValue, double alphaValue, int* returnRedValue, int* returnGreenValue, int* returnBlueValue, int *returnAlphaValue ) { - Q_UNUSED( theRedValue ); - Q_UNUSED( theGreenValue ); - Q_UNUSED( theBlueValue ); - Q_UNUSED( theAlphaValue ); + Q_UNUSED( redValue ); + Q_UNUSED( greenValue ); + Q_UNUSED( blueValue ); + Q_UNUSED( alphaValue ); - *theReturnRedValue = 0; - *theReturnGreenValue = 0; - *theReturnBlueValue = 0; - *theReturnAlphaValue = 0; + *returnRedValue = 0; + *returnGreenValue = 0; + *returnBlueValue = 0; + *returnAlphaValue = 0; return false; } diff --git a/src/core/raster/qgsrastershaderfunction.h b/src/core/raster/qgsrastershaderfunction.h index f86b7c4a3b0..3f02e83db50 100644 --- a/src/core/raster/qgsrastershaderfunction.h +++ b/src/core/raster/qgsrastershaderfunction.h @@ -33,7 +33,7 @@ class CORE_EXPORT QgsRasterShaderFunction { public: - QgsRasterShaderFunction( double theMinimumValue = 0.0, double theMaximumValue = 255.0 ); + QgsRasterShaderFunction( double minimumValue = 0.0, double maximumValue = 255.0 ); virtual ~QgsRasterShaderFunction() = default; //! \brief Set the maximum value diff --git a/src/core/raster/qgsrastertransparency.cpp b/src/core/raster/qgsrastertransparency.cpp index 8142cf1c451..7dc8d3fefe6 100644 --- a/src/core/raster/qgsrastertransparency.cpp +++ b/src/core/raster/qgsrastertransparency.cpp @@ -48,15 +48,15 @@ QList QgsRasterTransparency:: /** Reset to the transparency list to a single value */ -void QgsRasterTransparency::initializeTransparentPixelList( double theValue ) +void QgsRasterTransparency::initializeTransparentPixelList( double value ) { //clear the existing list mTransparentSingleValuePixelList.clear(); //add the initial value TransparentSingleValuePixel myTransparentSingleValuePixel; - myTransparentSingleValuePixel.min = theValue; - myTransparentSingleValuePixel.max = theValue; + myTransparentSingleValuePixel.min = value; + myTransparentSingleValuePixel.max = value; myTransparentSingleValuePixel.percentTransparent = 100.0; mTransparentSingleValuePixelList.append( myTransparentSingleValuePixel ); } @@ -64,16 +64,16 @@ void QgsRasterTransparency::initializeTransparentPixelList( double theValue ) /** Reset to the transparency list to a single value */ -void QgsRasterTransparency::initializeTransparentPixelList( double theRedValue, double theGreenValue, double theBlueValue ) +void QgsRasterTransparency::initializeTransparentPixelList( double redValue, double greenValue, double blueValue ) { //clearn the existing list mTransparentThreeValuePixelList.clear(); //add the initial values TransparentThreeValuePixel myTransparentThreeValuePixel; - myTransparentThreeValuePixel.red = theRedValue; - myTransparentThreeValuePixel.green = theGreenValue; - myTransparentThreeValuePixel.blue = theBlueValue; + myTransparentThreeValuePixel.red = redValue; + myTransparentThreeValuePixel.green = greenValue; + myTransparentThreeValuePixel.blue = blueValue; myTransparentThreeValuePixel.percentTransparent = 100.0; mTransparentThreeValuePixelList.append( myTransparentThreeValuePixel ); } @@ -82,29 +82,29 @@ void QgsRasterTransparency::initializeTransparentPixelList( double theRedValue, /** Mutator for transparentSingleValuePixelList, replaces the whole list */ -void QgsRasterTransparency::setTransparentSingleValuePixelList( const QList& theNewList ) +void QgsRasterTransparency::setTransparentSingleValuePixelList( const QList& newList ) { - mTransparentSingleValuePixelList = theNewList; + mTransparentSingleValuePixelList = newList; } /** Mutator for transparentThreeValuePixelList, replaces the whole list */ -void QgsRasterTransparency::setTransparentThreeValuePixelList( const QList& theNewList ) +void QgsRasterTransparency::setTransparentThreeValuePixelList( const QList& newList ) { - mTransparentThreeValuePixelList = theNewList; + mTransparentThreeValuePixelList = newList; } /** Searches through the transparency list, if a match is found, the global transparency value is scaled by the stored transparency value. - @param theValue the needle to search for in the transparency hay stack - @param theGlobalTransparency the overal transparency level for the layer + @param value the needle to search for in the transparency hay stack + @param globalTransparency the overal transparency level for the layer */ -int QgsRasterTransparency::alphaValue( double theValue, int theGlobalTransparency ) const +int QgsRasterTransparency::alphaValue( double value, int globalTransparency ) const { //if NaN return 0, transparent - if ( qIsNaN( theValue ) ) + if ( qIsNaN( value ) ) { return 0; } @@ -115,9 +115,9 @@ int QgsRasterTransparency::alphaValue( double theValue, int theGlobalTransparenc for ( int myListRunner = 0; myListRunner < mTransparentSingleValuePixelList.count(); myListRunner++ ) { myTransparentPixel = mTransparentSingleValuePixelList[myListRunner]; - if (( theValue >= myTransparentPixel.min && theValue <= myTransparentPixel.max ) || - qgsDoubleNear( theValue, myTransparentPixel.min ) || - qgsDoubleNear( theValue, myTransparentPixel.max ) ) + if (( value >= myTransparentPixel.min && value <= myTransparentPixel.max ) || + qgsDoubleNear( value, myTransparentPixel.min ) || + qgsDoubleNear( value, myTransparentPixel.max ) ) { myTransparentPixelFound = true; break; @@ -127,24 +127,24 @@ int QgsRasterTransparency::alphaValue( double theValue, int theGlobalTransparenc //if a match was found use the stored transparency percentage if ( myTransparentPixelFound ) { - return static_cast< int >( static_cast< float >( theGlobalTransparency ) *( 1.0 - ( myTransparentPixel.percentTransparent / 100.0 ) ) ); + return static_cast< int >( static_cast< float >( globalTransparency ) *( 1.0 - ( myTransparentPixel.percentTransparent / 100.0 ) ) ); } - return theGlobalTransparency; + return globalTransparency; } /** Searches through the transparency list, if a match is found, the global transparency value is scaled by the stored transparency value. - @param theRedValue the red portion of the needle to search for in the transparency hay stack - @param theGreenValue the green portion of the needle to search for in the transparency hay stack - @param theBlueValue the green portion of the needle to search for in the transparency hay stack - @param theGlobalTransparency the overal transparency level for the layer + @param redValue the red portion of the needle to search for in the transparency hay stack + @param greenValue the green portion of the needle to search for in the transparency hay stack + @param blueValue the green portion of the needle to search for in the transparency hay stack + @param globalTransparency the overal transparency level for the layer */ -int QgsRasterTransparency::alphaValue( double theRedValue, double theGreenValue, double theBlueValue, int theGlobalTransparency ) const +int QgsRasterTransparency::alphaValue( double redValue, double greenValue, double blueValue, int globalTransparency ) const { //if NaN return 0, transparent - if ( qIsNaN( theRedValue ) || qIsNaN( theGreenValue ) || qIsNaN( theBlueValue ) ) + if ( qIsNaN( redValue ) || qIsNaN( greenValue ) || qIsNaN( blueValue ) ) { return 0; } @@ -155,11 +155,11 @@ int QgsRasterTransparency::alphaValue( double theRedValue, double theGreenValue, for ( int myListRunner = 0; myListRunner < mTransparentThreeValuePixelList.count(); myListRunner++ ) { myTransparentPixel = mTransparentThreeValuePixelList[myListRunner]; - if ( qgsDoubleNear( myTransparentPixel.red, theRedValue ) ) + if ( qgsDoubleNear( myTransparentPixel.red, redValue ) ) { - if ( qgsDoubleNear( myTransparentPixel.green, theGreenValue ) ) + if ( qgsDoubleNear( myTransparentPixel.green, greenValue ) ) { - if ( qgsDoubleNear( myTransparentPixel.blue, theBlueValue ) ) + if ( qgsDoubleNear( myTransparentPixel.blue, blueValue ) ) { myTransparentPixelFound = true; break; @@ -171,10 +171,10 @@ int QgsRasterTransparency::alphaValue( double theRedValue, double theGreenValue, //if a match was found use the stored transparency percentage if ( myTransparentPixelFound ) { - return static_cast< int >( static_cast< float >( theGlobalTransparency ) *( 1.0 - ( myTransparentPixel.percentTransparent / 100.0 ) ) ); + return static_cast< int >( static_cast< float >( globalTransparency ) *( 1.0 - ( myTransparentPixel.percentTransparent / 100.0 ) ) ); } - return theGlobalTransparency; + return globalTransparency; } bool QgsRasterTransparency::isEmpty() const diff --git a/src/core/raster/qgsrastertransparency.h b/src/core/raster/qgsrastertransparency.h index 832693035cf..4dd34d4e2fd 100644 --- a/src/core/raster/qgsrastertransparency.h +++ b/src/core/raster/qgsrastertransparency.h @@ -67,16 +67,16 @@ class CORE_EXPORT QgsRasterTransparency void initializeTransparentPixelList( double, double, double ); //! \brief Mutator for transparentSingleValuePixelList - void setTransparentSingleValuePixelList( const QList& theNewList ); + void setTransparentSingleValuePixelList( const QList& newList ); //! \brief Mutator for transparentThreeValuePixelList - void setTransparentThreeValuePixelList( const QList& theNewList ); + void setTransparentThreeValuePixelList( const QList& newList ); //! \brief Returns the transparency value for a single value Pixel - int alphaValue( double, int theGlobalTransparency = 255 ) const; + int alphaValue( double, int globalTransparency = 255 ) const; //! \brief Return the transparency value for a RGB Pixel - int alphaValue( double, double, double, int theGlobalTransparency = 255 ) const; + int alphaValue( double, double, double, int globalTransparency = 255 ) const; //! True if there are no entries in the pixel lists except the nodata value bool isEmpty() const; diff --git a/src/core/raster/qgssinglebandgrayrenderer.h b/src/core/raster/qgssinglebandgrayrenderer.h index 794aa50d73f..90746e0d0e0 100644 --- a/src/core/raster/qgssinglebandgrayrenderer.h +++ b/src/core/raster/qgssinglebandgrayrenderer.h @@ -56,7 +56,7 @@ class CORE_EXPORT QgsSingleBandGrayRenderer: public QgsRasterRenderer //! Takes ownership void setContrastEnhancement( QgsContrastEnhancement* ce ); - void setGradient( Gradient theGradient ) { mGradient = theGradient; } + void setGradient( Gradient gradient ) { mGradient = gradient; } Gradient gradient() const { return mGradient; } void writeXml( QDomDocument& doc, QDomElement& parentElem ) const override; diff --git a/src/core/symbology-ng/qgscptcityarchive.cpp b/src/core/symbology-ng/qgscptcityarchive.cpp index 338cf892340..11489e12a23 100644 --- a/src/core/symbology-ng/qgscptcityarchive.cpp +++ b/src/core/symbology-ng/qgscptcityarchive.cpp @@ -1088,29 +1088,29 @@ QgsCptCityDataItem* QgsCptCityDirectoryItem::dataItem( QgsCptCityDataItem* paren return nullptr; // fetch sub-dirs and ramps to know what to do with this item - QStringList theDirEntries = dirItem->dirEntries(); - QMap< QString, QStringList > theRampsMap = dirItem->rampsMap(); + QStringList dirEntries = dirItem->dirEntries(); + QMap< QString, QStringList > rampsMap = dirItem->rampsMap(); - QgsDebugMsg( QString( "item has %1 dirs and %2 ramps" ).arg( theDirEntries.count() ).arg( theRampsMap.count() ) ); + QgsDebugMsg( QString( "item has %1 dirs and %2 ramps" ).arg( dirEntries.count() ).arg( rampsMap.count() ) ); // return item if has at least one subdir - if ( !theDirEntries.isEmpty() ) + if ( !dirEntries.isEmpty() ) return dirItem; // if 0 ramps, delete item - if ( theRampsMap.isEmpty() ) + if ( rampsMap.isEmpty() ) { delete dirItem; return nullptr; } // if 1 ramp, return this child's item // so we don't have a directory with just 1 item (with many variants possibly) - else if ( theRampsMap.count() == 1 ) + else if ( rampsMap.count() == 1 ) { delete dirItem; QgsCptCityColorRampItem* rampItem = - new QgsCptCityColorRampItem( parent, theRampsMap.begin().key(), - theRampsMap.begin().key(), theRampsMap.begin().value() ); + new QgsCptCityColorRampItem( parent, rampsMap.begin().key(), + rampsMap.begin().key(), rampsMap.begin().value() ); if ( ! rampItem->isValid() ) { delete rampItem; @@ -1430,7 +1430,7 @@ int QgsCptCityBrowserModel::columnCount( const QModelIndex &parent ) const QModelIndex QgsCptCityBrowserModel::findPath( const QString& path ) { - QModelIndex theIndex; // starting from root + QModelIndex rootIndex; // starting from root bool foundParent = false, foundChild = true; QString itemPath; @@ -1439,9 +1439,9 @@ QModelIndex QgsCptCityBrowserModel::findPath( const QString& path ) // special case if searching for first item "All Ramps", do not search into tree if ( path.isEmpty() ) { - for ( int i = 0; i < rowCount( theIndex ); i++ ) + for ( int i = 0; i < rowCount( rootIndex ); i++ ) { - QModelIndex idx = index( i, 0, theIndex ); + QModelIndex idx = index( i, 0, rootIndex ); QgsCptCityDataItem *item = dataItem( idx ); if ( !item ) return QModelIndex(); // an error occurred @@ -1464,9 +1464,9 @@ QModelIndex QgsCptCityBrowserModel::findPath( const QString& path ) // if root skip first item "All Ramps" if ( itemPath.isEmpty() ) i = 1; - for ( ; i < rowCount( theIndex ); i++ ) + for ( ; i < rowCount( rootIndex ); i++ ) { - QModelIndex idx = index( i, 0, theIndex ); + QModelIndex idx = index( i, 0, rootIndex ); QgsCptCityDataItem *item = dataItem( idx ); if ( !item ) return QModelIndex(); // an error occurred @@ -1516,9 +1516,9 @@ QModelIndex QgsCptCityBrowserModel::findPath( const QString& path ) QgsDebugMsg( "found parent " + path ); // we have found a preceding item: stop searching on this level and go deeper foundChild = true; - theIndex = idx; - if ( canFetchMore( theIndex ) ) - fetchMore( theIndex ); + rootIndex = idx; + if ( canFetchMore( rootIndex ) ) + fetchMore( rootIndex ); break; } } @@ -1582,9 +1582,9 @@ QModelIndex QgsCptCityBrowserModel::findItem( QgsCptCityDataItem *item, QgsCptCi } /* Refresh item */ -void QgsCptCityBrowserModel::refresh( const QModelIndex& theIndex ) +void QgsCptCityBrowserModel::refresh( const QModelIndex& index ) { - QgsCptCityDataItem *item = dataItem( theIndex ); + QgsCptCityDataItem *item = dataItem( index ); if ( !item ) return; diff --git a/src/core/symbology-ng/qgssvgcache.h b/src/core/symbology-ng/qgssvgcache.h index b187a9733fa..ed28eb644bd 100644 --- a/src/core/symbology-ng/qgssvgcache.h +++ b/src/core/symbology-ng/qgssvgcache.h @@ -188,7 +188,7 @@ class CORE_EXPORT QgsSvgCache : public QObject signals: //! Emit a signal to be caught by qgisapp and display a msg on status bar - void statusChanged( const QString& theStatusQString ); + void statusChanged( const QString& statusQString ); protected: diff --git a/src/core/symbology-ng/qgssymbol.cpp b/src/core/symbology-ng/qgssymbol.cpp index c3eeeb3dda7..bd2ea57794c 100644 --- a/src/core/symbology-ng/qgssymbol.cpp +++ b/src/core/symbology-ng/qgssymbol.cpp @@ -1069,10 +1069,10 @@ QgsMarkerSymbol::QgsMarkerSymbol( const QgsSymbolLayerList& layers ) mLayers.append( new QgsSimpleMarkerSymbolLayer() ); } -void QgsMarkerSymbol::setAngle( double theAngle ) +void QgsMarkerSymbol::setAngle( double symbolAngle ) { double origAngle = angle(); - double angleDiff = theAngle - origAngle; + double angleDiff = symbolAngle - origAngle; Q_FOREACH ( QgsSymbolLayer* layer, mLayers ) { QgsMarkerSymbolLayer* markerLayer = dynamic_cast( layer ); diff --git a/src/core/symbology-ng/qgssymbol.h b/src/core/symbology-ng/qgssymbol.h index 56086f0592a..a9c4f4ec242 100644 --- a/src/core/symbology-ng/qgssymbol.h +++ b/src/core/symbology-ng/qgssymbol.h @@ -538,10 +538,10 @@ class CORE_EXPORT QgsMarkerSymbol : public QgsSymbol /** Sets the angle for the whole symbol. Individual symbol layer sizes * will be rotated to maintain their current relative angle to the whole symbol angle. - * @param angle new symbol angle + * @param symbolAngle new symbol angle * @see angle() */ - void setAngle( double angle ); + void setAngle( double symbolAngle ); /** Returns the marker angle for the whole symbol. Note that for symbols with * multiple symbol layers, this will correspond just to the angle of diff --git a/src/gui/attributetable/qgsfieldconditionalformatwidget.cpp b/src/gui/attributetable/qgsfieldconditionalformatwidget.cpp index 894e28b4160..22a770c8a61 100644 --- a/src/gui/attributetable/qgsfieldconditionalformatwidget.cpp +++ b/src/gui/attributetable/qgsfieldconditionalformatwidget.cpp @@ -97,10 +97,10 @@ void QgsFieldConditionalFormatWidget::presetSet( int index ) setFormattingFromStyle( style ); } -void QgsFieldConditionalFormatWidget::setLayer( QgsVectorLayer *theLayer ) +void QgsFieldConditionalFormatWidget::setLayer( QgsVectorLayer *layer ) { - mLayer = theLayer; - mFieldCombo->setLayer( theLayer ); + mLayer = layer; + mFieldCombo->setLayer( layer ); mFieldCombo->setCurrentIndex( 0 ); } diff --git a/src/gui/attributetable/qgsfieldconditionalformatwidget.h b/src/gui/attributetable/qgsfieldconditionalformatwidget.h index 6ea68803981..090d96a376f 100644 --- a/src/gui/attributetable/qgsfieldconditionalformatwidget.h +++ b/src/gui/attributetable/qgsfieldconditionalformatwidget.h @@ -48,9 +48,9 @@ class GUI_EXPORT QgsFieldConditionalFormatWidget : public QWidget, private Ui::Q void viewRules(); /** Sets the vector layer associated with the widget. - * @param theLayer vector layer + * @param layer vector layer */ - void setLayer( QgsVectorLayer* theLayer ); + void setLayer( QgsVectorLayer* layer ); /** Switches the widget to the edit style mode for the specified style. * @param index index of conditional style to edit diff --git a/src/gui/qgisgui.cpp b/src/gui/qgisgui.cpp index 2e1d30a604e..2a062fa9267 100644 --- a/src/gui/qgisgui.cpp +++ b/src/gui/qgisgui.cpp @@ -84,7 +84,7 @@ namespace QgisGui return false; } - QPair GUI_EXPORT getSaveAsImageName( QWidget *theParent, const QString& theMessage, const QString& defaultFilename ) + QPair GUI_EXPORT getSaveAsImageName( QWidget *parent, const QString& message, const QString& defaultFilename ) { // get a list of supported output image types QMap filterMap; @@ -128,7 +128,7 @@ namespace QgisGui QString outputFileName; QString ext; #if defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(Q_OS_LINUX) - outputFileName = QFileDialog::getSaveFileName( theParent, theMessage, initialPath, QStringList( filterMap.keys() ).join( QStringLiteral( ";;" ) ), &selectedFilter ); + outputFileName = QFileDialog::getSaveFileName( parent, message, initialPath, QStringList( filterMap.keys() ).join( QStringLiteral( ";;" ) ), &selectedFilter ); if ( !outputFileName.isNull() ) { @@ -140,7 +140,7 @@ namespace QgisGui #else //create a file dialog using the filter list generated above - std::unique_ptr fileDialog( new QFileDialog( theParent, theMessage, initialPath, QStringList( filterMap.keys() ).join( ";;" ) ) ); + std::unique_ptr fileDialog( new QFileDialog( parent, message, initialPath, QStringList( filterMap.keys() ).join( ";;" ) ) ); // allow for selection of more than one file fileDialog->setFileMode( QFileDialog::AnyFile ); diff --git a/src/gui/qgisgui.h b/src/gui/qgisgui.h index 0e7a0fb69ca..fed7fc1816c 100644 --- a/src/gui/qgisgui.h +++ b/src/gui/qgisgui.h @@ -94,13 +94,13 @@ namespace QgisGui /** A helper function to get an image name from the user. It will nicely * provide filters with all available writable image formats. - * @param theParent widget that should act as the parent for the file dialog - * @param theMessage the message to display to the user + * @param parent widget that should act as the parent for the file dialog + * @param message the message to display to the user * @param defaultFilename default file name (empty by default) * @return QPair where first is the file name and second is * the file type */ - QPair GUI_EXPORT getSaveAsImageName( QWidget * theParent, const QString& theMessage, const QString& defaultFilename = QString::null ); + QPair GUI_EXPORT getSaveAsImageName( QWidget * parent, const QString& message, const QString& defaultFilename = QString::null ); /** Convenience function for readily creating file filters. diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 284d65de510..749bb1d51a2 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -129,9 +129,9 @@ class GUI_EXPORT QgisInterface : public QObject virtual QgsRasterLayer* addRasterLayer( const QString& url, const QString& layerName, const QString& providerKey ) = 0; //! Add a project - virtual bool addProject( const QString& theProject ) = 0; + virtual bool addProject( const QString& project ) = 0; //! Start a blank project - virtual void newProject( bool thePromptToSaveFlag = false ) = 0; + virtual void newProject( bool promptToSaveFlag = false ) = 0; //! Get pointer to the active layer (layer selected in the legend) virtual QgsMapLayer *activeLayer() = 0; diff --git a/src/gui/qgscodeeditor.cpp b/src/gui/qgscodeeditor.cpp index 5d7ff8c5983..36c600b7566 100644 --- a/src/gui/qgscodeeditor.cpp +++ b/src/gui/qgscodeeditor.cpp @@ -146,19 +146,19 @@ void QgsCodeEditor::setFoldingVisible( bool folding ) } } -void QgsCodeEditor::insertText( const QString& theText ) +void QgsCodeEditor::insertText( const QString& text ) { // Insert the text or replace selected text if ( hasSelectedText() ) { - replaceSelectedText( theText ); + replaceSelectedText( text ); } else { int line, index; getCursorPosition( &line, &index ); - insertAt( theText, line, index ); - setCursorPosition( line, index + theText.length() ); + insertAt( text, line, index ); + setCursorPosition( line, index + text.length() ); } } diff --git a/src/gui/qgscodeeditor.h b/src/gui/qgscodeeditor.h index f7387d5187d..e472bc1bfcd 100644 --- a/src/gui/qgscodeeditor.h +++ b/src/gui/qgscodeeditor.h @@ -66,9 +66,9 @@ class GUI_EXPORT QgsCodeEditor : public QsciScintilla /** Insert text at cursor position, or replace any selected text if user has * made a selection. - * @param theText The text to be inserted + * @param text The text to be inserted */ - void insertText( const QString& theText ); + void insertText( const QString& text ); protected: diff --git a/src/gui/qgscomposerview.cpp b/src/gui/qgscomposerview.cpp index 3031ad18053..510e66b8e61 100644 --- a/src/gui/qgscomposerview.cpp +++ b/src/gui/qgscomposerview.cpp @@ -1973,10 +1973,10 @@ void QgsComposerView::wheelEvent( QWheelEvent* event ) QPointF scenePoint = mapToScene( event->pos() ); //select topmost item at position of event - QgsComposerItem* theItem = composition()->composerItemAt( scenePoint, true ); - if ( theItem ) + QgsComposerItem* item = composition()->composerItemAt( scenePoint, true ); + if ( item ) { - if ( theItem->isSelected() ) + if ( item->isSelected() ) { QSettings settings; //read zoom mode @@ -1995,10 +1995,10 @@ void QgsComposerView::wheelEvent( QWheelEvent* event ) } zoomFactor = event->delta() > 0 ? zoomFactor : 1 / zoomFactor; - QPointF itemPoint = theItem->mapFromScene( scenePoint ); - theItem->beginCommand( tr( "Zoom item content" ), QgsComposerMergeCommand::ItemZoomContent ); - theItem->zoomContent( zoomFactor, itemPoint, zoomMode ); - theItem->endCommand(); + QPointF itemPoint = item->mapFromScene( scenePoint ); + item->beginCommand( tr( "Zoom item content" ), QgsComposerMergeCommand::ItemZoomContent ); + item->zoomContent( zoomFactor, itemPoint, zoomMode ); + item->endCommand(); } } } diff --git a/src/gui/qgsdetaileditemdata.cpp b/src/gui/qgsdetaileditemdata.cpp index 7613a1f72b6..8479c862146 100644 --- a/src/gui/qgsdetaileditemdata.cpp +++ b/src/gui/qgsdetaileditemdata.cpp @@ -25,39 +25,39 @@ QgsDetailedItemData::QgsDetailedItemData() } -void QgsDetailedItemData::setTitle( const QString& theTitle ) +void QgsDetailedItemData::setTitle( const QString& title ) { - mTitle = theTitle; + mTitle = title; } -void QgsDetailedItemData::setDetail( const QString& theDetail ) +void QgsDetailedItemData::setDetail( const QString& detail ) { - mDetail = theDetail; + mDetail = detail; } -void QgsDetailedItemData::setCategory( const QString& theCategory ) +void QgsDetailedItemData::setCategory( const QString& category ) { - mCategory = theCategory; + mCategory = category; } -void QgsDetailedItemData::setIcon( const QPixmap& theIcon ) +void QgsDetailedItemData::setIcon( const QPixmap& icon ) { - mPixmap = theIcon; + mPixmap = icon; } -void QgsDetailedItemData::setCheckable( const bool theFlag ) +void QgsDetailedItemData::setCheckable( const bool flag ) { - mCheckableFlag = theFlag; + mCheckableFlag = flag; } -void QgsDetailedItemData::setChecked( const bool theFlag ) +void QgsDetailedItemData::setChecked( const bool flag ) { - mCheckedFlag = theFlag; + mCheckedFlag = flag; } -void QgsDetailedItemData::setRenderAsWidget( const bool theFlag ) +void QgsDetailedItemData::setRenderAsWidget( const bool flag ) { - mRenderAsWidgetFlag = theFlag; + mRenderAsWidgetFlag = flag; } QString QgsDetailedItemData::title() const @@ -95,9 +95,9 @@ bool QgsDetailedItemData::isRenderedAsWidget() const return mRenderAsWidgetFlag; } -void QgsDetailedItemData::setEnabled( bool theFlag ) +void QgsDetailedItemData::setEnabled( bool flag ) { - mEnabledFlag = theFlag; + mEnabledFlag = flag; } bool QgsDetailedItemData::isEnabled() const diff --git a/src/gui/qgsdetaileditemdata.h b/src/gui/qgsdetaileditemdata.h index cbe6eb9d39c..f0054c383c5 100644 --- a/src/gui/qgsdetaileditemdata.h +++ b/src/gui/qgsdetaileditemdata.h @@ -31,13 +31,13 @@ class GUI_EXPORT QgsDetailedItemData { public: QgsDetailedItemData(); - void setTitle( const QString& theTitle ); - void setDetail( const QString& theDetail ); - void setCategory( const QString& theCategory ); - void setIcon( const QPixmap& theIcon ); - void setCheckable( const bool theFlag ); - void setChecked( const bool theFlag ); - void setEnabled( bool theFlag ); + void setTitle( const QString& title ); + void setDetail( const QString& detail ); + void setCategory( const QString& category ); + void setIcon( const QPixmap& icon ); + void setCheckable( const bool flag ); + void setChecked( const bool flag ); + void setEnabled( bool flag ); /** This is a hint to the delegate to render using * a widget rather than manually painting every @@ -45,7 +45,7 @@ class GUI_EXPORT QgsDetailedItemData * @note the delegate may completely ignore this * depending on the delegate implementation. */ - void setRenderAsWidget( bool theFlag ); + void setRenderAsWidget( bool flag ); QString title() const; QString detail() const; diff --git a/src/gui/qgsdetaileditemdelegate.cpp b/src/gui/qgsdetaileditemdelegate.cpp index fb577069e69..002b04f01a2 100644 --- a/src/gui/qgsdetaileditemdelegate.cpp +++ b/src/gui/qgsdetaileditemdelegate.cpp @@ -44,22 +44,22 @@ QgsDetailedItemDelegate::~QgsDetailedItemDelegate() } void QgsDetailedItemDelegate::paint( QPainter * thepPainter, - const QStyleOptionViewItem & theOption, - const QModelIndex & theIndex ) const + const QStyleOptionViewItem & option, + const QModelIndex & index ) const { // After painting we need to restore the painter to its original state thepPainter->save(); - if ( theIndex.data( Qt::UserRole ).canConvert() ) + if ( index.data( Qt::UserRole ).canConvert() ) { QgsDetailedItemData myData = - theIndex.data( Qt::UserRole ).value(); + index.data( Qt::UserRole ).value(); if ( myData.isRenderedAsWidget() ) { - paintAsWidget( thepPainter, theOption, myData ); + paintAsWidget( thepPainter, option, myData ); } else //render by manually painting { - paintManually( thepPainter, theOption, myData ); + paintManually( thepPainter, option, myData ); } } //can convert item data thepPainter->restore(); @@ -68,13 +68,13 @@ void QgsDetailedItemDelegate::paint( QPainter * thepPainter, QSize QgsDetailedItemDelegate::sizeHint( - const QStyleOptionViewItem & theOption, - const QModelIndex & theIndex ) const + const QStyleOptionViewItem & option, + const QModelIndex & index ) const { - if ( theIndex.data( Qt::UserRole ).canConvert() ) + if ( index.data( Qt::UserRole ).canConvert() ) { QgsDetailedItemData myData = - theIndex.data( Qt::UserRole ).value(); + index.data( Qt::UserRole ).value(); if ( myData.isRenderedAsWidget() ) { return QSize( 378, mpWidget->height() ); @@ -82,7 +82,7 @@ QSize QgsDetailedItemDelegate::sizeHint( else // fall back to hand calculated & hand drawn item { //for some reason itmes are non selectable if using rect.width() on osx and win - return QSize( 50, height( theOption, myData ) ); + return QSize( 50, height( option, myData ) ); //return QSize(theOption.rect.width(), myHeight + myVerticalSpacer); } } @@ -93,15 +93,15 @@ QSize QgsDetailedItemDelegate::sizeHint( } void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, - const QStyleOptionViewItem &theOption, - const QgsDetailedItemData &theData ) const + const QStyleOptionViewItem &option, + const QgsDetailedItemData &data ) const { // // Get the strings and check box properties // - //bool myCheckState = theIndex.model()->data(theIndex, Qt::CheckStateRole).toBool(); - mpCheckBox->setChecked( theData.isChecked() ); - mpCheckBox->setEnabled( theData.isEnabled() ); + //bool myCheckState = index.model()->data(theIndex, Qt::CheckStateRole).toBool(); + mpCheckBox->setChecked( data.isChecked() ); + mpCheckBox->setEnabled( data.isEnabled() ); QPixmap myCbxPixmap( mpCheckBox->size() ); mpCheckBox->render( &myCbxPixmap ); //we will draw this onto the widget further down @@ -109,41 +109,41 @@ void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, // Calculate the widget height and other metrics // - QFontMetrics myTitleMetrics( titleFont( theOption ) ); - QFontMetrics myDetailMetrics( detailFont( theOption ) ); - int myTextStartX = theOption.rect.x() + horizontalSpacing(); - int myTextStartY = theOption.rect.y() + verticalSpacing(); + QFontMetrics myTitleMetrics( titleFont( option ) ); + QFontMetrics myDetailMetrics( detailFont( option ) ); + int myTextStartX = option.rect.x() + horizontalSpacing(); + int myTextStartY = option.rect.y() + verticalSpacing(); int myHeight = myTitleMetrics.height() + verticalSpacing(); // // Draw the item background with a gradient if its highlighted // - if ( theOption.state & QStyle::State_Selected ) + if ( option.state & QStyle::State_Selected ) { - drawHighlight( theOption, thepPainter, height( theOption, theData ) ); - thepPainter->setPen( theOption.palette.highlightedText().color() ); + drawHighlight( option, thepPainter, height( option, data ) ); + thepPainter->setPen( option.palette.highlightedText().color() ); } else { - thepPainter->setPen( theOption.palette.text().color() ); + thepPainter->setPen( option.palette.text().color() ); } // // Draw the checkbox // - if ( theData.isCheckable() ) + if ( data.isCheckable() ) { - thepPainter->drawPixmap( theOption.rect.x(), - theOption.rect.y() + mpCheckBox->height(), + thepPainter->drawPixmap( option.rect.x(), + option.rect.y() + mpCheckBox->height(), myCbxPixmap ); - myTextStartX = theOption.rect.x() + myCbxPixmap.width() + horizontalSpacing(); + myTextStartX = option.rect.x() + myCbxPixmap.width() + horizontalSpacing(); } // // Draw the decoration (pixmap) // bool myIconFlag = false; - QPixmap myDecoPixmap = theData.icon(); + QPixmap myDecoPixmap = data.icon(); if ( !myDecoPixmap.isNull() ) { myIconFlag = true; @@ -174,14 +174,14 @@ void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, // Draw the title // myTextStartY += myHeight / 2; - thepPainter->setFont( titleFont( theOption ) ); + thepPainter->setFont( titleFont( option ) ); thepPainter->drawText( myTextStartX, myTextStartY, - theData.title() ); + data.title() ); // // Draw the description with word wrapping if needed // - thepPainter->setFont( detailFont( theOption ) ); //return to original font set by client + thepPainter->setFont( detailFont( option ) ); //return to original font set by client if ( myIconFlag ) { myTextStartY += verticalSpacing(); @@ -191,7 +191,7 @@ void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, myTextStartY += myDetailMetrics.height() + verticalSpacing(); } QStringList myList = - wordWrap( theData.detail(), myDetailMetrics, theOption.rect.width() - myTextStartX ); + wordWrap( data.detail(), myDetailMetrics, option.rect.width() - myTextStartX ); QStringListIterator myLineWrapIterator( myList ); while ( myLineWrapIterator.hasNext() ) { @@ -205,10 +205,10 @@ void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, // // Draw the category. Not sure if we need word wrapping for it. // - thepPainter->setFont( categoryFont( theOption ) ); //return to original font set by client + thepPainter->setFont( categoryFont( option ) ); //return to original font set by client thepPainter->drawText( myTextStartX, myTextStartY, - theData.category() ); + data.category() ); // // Draw the category with word wrapping if needed @@ -224,7 +224,7 @@ void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, myTextStartY += myCategoryMetrics.height() + verticalSpacing(); } myList = - wordWrap( theData.category(), myCategoryMetrics, theOption.rect.width() - myTextStartX ); + wordWrap( data.category(), myCategoryMetrics, option.rect.width() - myTextStartX ); QStringListIterator myLineWrapIter( myList ); while ( myLineWrapIter.hasNext() ) { @@ -239,99 +239,99 @@ void QgsDetailedItemDelegate::paintManually( QPainter *thepPainter, void QgsDetailedItemDelegate::paintAsWidget( QPainter *thepPainter, - const QStyleOptionViewItem &theOption, - const QgsDetailedItemData &theData ) const + const QStyleOptionViewItem &option, + const QgsDetailedItemData &data ) const { - mpWidget->setChecked( theData.isChecked() ); - mpWidget->setData( theData ); - mpWidget->resize( theOption.rect.width(), mpWidget->height() ); + mpWidget->setChecked( data.isChecked() ); + mpWidget->setData( data ); + mpWidget->resize( option.rect.width(), mpWidget->height() ); mpWidget->setAutoFillBackground( true ); //mpWidget->setAttribute(Qt::WA_OpaquePaintEvent); mpWidget->repaint(); - if ( theOption.state & QStyle::State_Selected ) + if ( option.state & QStyle::State_Selected ) { - drawHighlight( theOption, thepPainter, height( theOption, theData ) ); + drawHighlight( option, thepPainter, height( option, data ) ); } QPixmap myPixmap = QPixmap::grabWidget( mpWidget ); - thepPainter->drawPixmap( theOption.rect.x(), - theOption.rect.y(), + thepPainter->drawPixmap( option.rect.x(), + option.rect.y(), myPixmap ); }//render as widget -void QgsDetailedItemDelegate::drawHighlight( const QStyleOptionViewItem &theOption, +void QgsDetailedItemDelegate::drawHighlight( const QStyleOptionViewItem &option, QPainter * thepPainter, - int theHeight ) const + int height ) const { - QColor myColor1 = theOption.palette.highlight().color(); + QColor myColor1 = option.palette.highlight().color(); QColor myColor2 = myColor1; myColor2 = myColor2.lighter( 110 ); //10% lighter - QLinearGradient myGradient( QPointF( 0, theOption.rect.y() ), - QPointF( 0, theOption.rect.y() + theHeight ) ); + QLinearGradient myGradient( QPointF( 0, option.rect.y() ), + QPointF( 0, option.rect.y() + height ) ); myGradient.setColorAt( 0, myColor1 ); myGradient.setColorAt( 0.1, myColor2 ); myGradient.setColorAt( 0.5, myColor1 ); myGradient.setColorAt( 0.9, myColor2 ); myGradient.setColorAt( 1, myColor2 ); - thepPainter->fillRect( theOption.rect, QBrush( myGradient ) ); + thepPainter->fillRect( option.rect, QBrush( myGradient ) ); } -int QgsDetailedItemDelegate::height( const QStyleOptionViewItem &theOption, - const QgsDetailedItemData &theData ) const +int QgsDetailedItemDelegate::height( const QStyleOptionViewItem &option, + const QgsDetailedItemData &data ) const { - QFontMetrics myTitleMetrics( titleFont( theOption ) ); - QFontMetrics myDetailMetrics( detailFont( theOption ) ); - QFontMetrics myCategoryMetrics( categoryFont( theOption ) ); + QFontMetrics myTitleMetrics( titleFont( option ) ); + QFontMetrics myDetailMetrics( detailFont( option ) ); + QFontMetrics myCategoryMetrics( categoryFont( option ) ); //we don't word wrap the title so its easy to measure int myHeight = myTitleMetrics.height() + verticalSpacing(); //the detail needs to be measured though - QStringList myList = wordWrap( theData.detail(), + QStringList myList = wordWrap( data.detail(), myDetailMetrics, - theOption.rect.width() - ( mpCheckBox->width() + horizontalSpacing() ) ); + option.rect.width() - ( mpCheckBox->width() + horizontalSpacing() ) ); myHeight += ( myList.count() + 1 ) * ( myDetailMetrics.height() - verticalSpacing() ); //we don't word wrap the category so its easy to measure myHeight += myCategoryMetrics.height() + verticalSpacing(); #if 0 // if category should be wrapped use this code - myList = wordWrap( theData.category(), + myList = wordWrap( data.category(), myCategoryMetrics, - theOption.rect.width() - ( mpCheckBox->width() + horizontalSpacing() ) ); + option.rect.width() - ( mpCheckBox->width() + horizontalSpacing() ) ); myHeight += ( myList.count() + 1 ) * ( myCategoryMetrics.height() - verticalSpacing() ); #endif return myHeight; } -QFont QgsDetailedItemDelegate::detailFont( const QStyleOptionViewItem &theOption ) const +QFont QgsDetailedItemDelegate::detailFont( const QStyleOptionViewItem &option ) const { - QFont myFont = theOption.font; + QFont myFont = option.font; return myFont; } -QFont QgsDetailedItemDelegate::categoryFont( const QStyleOptionViewItem &theOption ) const +QFont QgsDetailedItemDelegate::categoryFont( const QStyleOptionViewItem &option ) const { - QFont myFont = theOption.font; + QFont myFont = option.font; myFont.setBold( true ); return myFont; } -QFont QgsDetailedItemDelegate::titleFont( const QStyleOptionViewItem &theOption ) const +QFont QgsDetailedItemDelegate::titleFont( const QStyleOptionViewItem &option ) const { - QFont myTitleFont = detailFont( theOption ); + QFont myTitleFont = detailFont( option ); myTitleFont.setBold( true ); myTitleFont.setPointSize( myTitleFont.pointSize() ); return myTitleFont; } -QStringList QgsDetailedItemDelegate::wordWrap( const QString& theString, - const QFontMetrics& theMetrics, - int theWidth ) const +QStringList QgsDetailedItemDelegate::wordWrap( const QString& string, + const QFontMetrics& metrics, + int width ) const { - if ( theString.isEmpty() ) + if ( string.isEmpty() ) return QStringList(); - if ( 50 >= theWidth ) - return QStringList() << theString; + if ( 50 >= width ) + return QStringList() << string; //QString myDebug = QString("Word wrapping: %1 into %2 pixels").arg(theString).arg(theWidth); //qDebug(myDebug.toLocal8Bit()); //iterate the string @@ -339,16 +339,16 @@ QStringList QgsDetailedItemDelegate::wordWrap( const QString& theString, QString myCumulativeLine = QLatin1String( "" ); QString myStringToPreviousSpace = QLatin1String( "" ); int myPreviousSpacePos = 0; - for ( int i = 0; i < theString.count(); ++i ) + for ( int i = 0; i < string.count(); ++i ) { - QChar myChar = theString.at( i ); + QChar myChar = string.at( i ); if ( myChar == QChar( ' ' ) ) { myStringToPreviousSpace = myCumulativeLine; myPreviousSpacePos = i; } myCumulativeLine += myChar; - if ( theMetrics.width( myCumulativeLine ) >= theWidth ) + if ( metrics.width( myCumulativeLine ) >= width ) { //time to wrap //@todo deal with long strings that have no spaces @@ -380,9 +380,9 @@ int QgsDetailedItemDelegate::verticalSpacing() const } -void QgsDetailedItemDelegate::setVerticalSpacing( int theValue ) +void QgsDetailedItemDelegate::setVerticalSpacing( int value ) { - mVerticalSpacing = theValue; + mVerticalSpacing = value; } @@ -392,7 +392,7 @@ int QgsDetailedItemDelegate::horizontalSpacing() const } -void QgsDetailedItemDelegate::setHorizontalSpacing( int theValue ) +void QgsDetailedItemDelegate::setHorizontalSpacing( int value ) { - mHorizontalSpacing = theValue; + mHorizontalSpacing = value; } diff --git a/src/gui/qgsdetaileditemdelegate.h b/src/gui/qgsdetaileditemdelegate.h index 2d7962442f1..f17d1950874 100644 --- a/src/gui/qgsdetaileditemdelegate.h +++ b/src/gui/qgsdetaileditemdelegate.h @@ -39,40 +39,40 @@ class GUI_EXPORT QgsDetailedItemDelegate : public QAbstractItemDelegate QgsDetailedItemDelegate( QObject * parent = nullptr ); ~QgsDetailedItemDelegate(); //! Reimplement for parent class - void paint( QPainter * thePainter, - const QStyleOptionViewItem & theOption, - const QModelIndex & theIndex ) const override; + void paint( QPainter * painter, + const QStyleOptionViewItem & option, + const QModelIndex & index ) const override; //! Reimplement for parent class - QSize sizeHint( const QStyleOptionViewItem & theOption, - const QModelIndex & theIndex ) const override; + QSize sizeHint( const QStyleOptionViewItem & option, + const QModelIndex & index ) const override; - void setVerticalSpacing( int theValue ); + void setVerticalSpacing( int value ); int verticalSpacing() const; - void setHorizontalSpacing( int theValue ); + void setHorizontalSpacing( int value ); int horizontalSpacing() const; private: - QFont detailFont( const QStyleOptionViewItem &theOption ) const; - QFont categoryFont( const QStyleOptionViewItem &theOption ) const; - QFont titleFont( const QStyleOptionViewItem &theOption ) const; - void drawHighlight( const QStyleOptionViewItem &theOption, + QFont detailFont( const QStyleOptionViewItem &option ) const; + QFont categoryFont( const QStyleOptionViewItem &option ) const; + QFont titleFont( const QStyleOptionViewItem &option ) const; + void drawHighlight( const QStyleOptionViewItem &option, QPainter * thepPainter, - int theHeight ) const; + int height ) const; - QStringList wordWrap( const QString& theString, - const QFontMetrics& theMetrics, - int theWidth ) const; - void paintManually( QPainter *thePainter, - const QStyleOptionViewItem &theOption, - const QgsDetailedItemData &theData ) const; - void paintAsWidget( QPainter *thePainter, - const QStyleOptionViewItem &theOption, - const QgsDetailedItemData &theData ) const; - int height( const QStyleOptionViewItem &theOption, - const QgsDetailedItemData &theData ) const; + QStringList wordWrap( const QString& string, + const QFontMetrics& metrics, + int width ) const; + void paintManually( QPainter *painter, + const QStyleOptionViewItem &option, + const QgsDetailedItemData &data ) const; + void paintAsWidget( QPainter *painter, + const QStyleOptionViewItem &option, + const QgsDetailedItemData &data ) const; + int height( const QStyleOptionViewItem &option, + const QgsDetailedItemData &data ) const; QgsDetailedItemWidget * mpWidget = nullptr; QCheckBox * mpCheckBox = nullptr; int mVerticalSpacing; diff --git a/src/gui/qgsdetaileditemwidget.cpp b/src/gui/qgsdetaileditemwidget.cpp index e85de0a082e..d971f8fe60e 100644 --- a/src/gui/qgsdetaileditemwidget.cpp +++ b/src/gui/qgsdetaileditemwidget.cpp @@ -23,17 +23,17 @@ QgsDetailedItemWidget::QgsDetailedItemWidget( QWidget * parent ) setupUi( this ); } -void QgsDetailedItemWidget::setData( const QgsDetailedItemData& theData ) +void QgsDetailedItemWidget::setData( const QgsDetailedItemData& data ) { - lblTitle->setText( theData.title() ); - lblDetail->setText( theData.detail() ); - lblCategory->setText( theData.category() ); - cbx->setVisible( theData.isCheckable() ); - cbx->setChecked( theData.isChecked() ); - lblIcon->setPixmap( theData.icon() ); + lblTitle->setText( data.title() ); + lblDetail->setText( data.detail() ); + lblCategory->setText( data.category() ); + cbx->setVisible( data.isCheckable() ); + cbx->setChecked( data.isChecked() ); + lblIcon->setPixmap( data.icon() ); } -void QgsDetailedItemWidget::setChecked( bool theFlag ) +void QgsDetailedItemWidget::setChecked( bool flag ) { - cbx->setChecked( theFlag ); + cbx->setChecked( flag ); } diff --git a/src/gui/qgsdetaileditemwidget.h b/src/gui/qgsdetaileditemwidget.h index ecd72ac1de9..3c672c45425 100644 --- a/src/gui/qgsdetaileditemwidget.h +++ b/src/gui/qgsdetaileditemwidget.h @@ -31,8 +31,8 @@ class GUI_EXPORT QgsDetailedItemWidget : Q_OBJECT public: QgsDetailedItemWidget( QWidget * parent = nullptr ); - void setData( const QgsDetailedItemData& theData ); - void setChecked( bool theFlag ); + void setData( const QgsDetailedItemData& data ); + void setChecked( bool flag ); private: QgsDetailedItemData mData; }; diff --git a/src/gui/qgserrordialog.cpp b/src/gui/qgserrordialog.cpp index 0d66be95a2a..5d7a67576c0 100644 --- a/src/gui/qgserrordialog.cpp +++ b/src/gui/qgserrordialog.cpp @@ -19,14 +19,16 @@ #include #include -QgsErrorDialog::QgsErrorDialog( const QgsError & theError, const QString & theTitle, QWidget *parent, Qt::WindowFlags fl ) +QgsErrorDialog::QgsErrorDialog( const QgsError & error, const QString & title, QWidget *parent, Qt::WindowFlags fl ) : QDialog( parent, fl ) - , mError( theError ) + , mError( error ) { setupUi( this ); - QString title = theTitle; - if ( title.isEmpty() ) title = tr( "Error" ); - setWindowTitle( title ); + + if ( title.isEmpty() ) + setWindowTitle( tr( "Error" ) ); + else + setWindowTitle( title ); // QMessageBox has static standardIcon( Icon icon ), but it is marked as obsolete QMessageBox messageBox( QMessageBox::Critical, QLatin1String( "" ), QLatin1String( "" ) ); @@ -52,9 +54,9 @@ QgsErrorDialog::QgsErrorDialog( const QgsError & theError, const QString & theTi if ( state == Qt::Checked ) on_mDetailPushButton_clicked(); } -void QgsErrorDialog::show( const QgsError & theError, const QString & theTitle, QWidget *parent, Qt::WindowFlags fl ) +void QgsErrorDialog::show( const QgsError & error, const QString & title, QWidget *parent, Qt::WindowFlags fl ) { - QgsErrorDialog d( theError, theTitle, parent, fl ); + QgsErrorDialog d( error, title, parent, fl ); d.exec(); } diff --git a/src/gui/qgserrordialog.h b/src/gui/qgserrordialog.h index 09c032dc261..0487bdf2704 100644 --- a/src/gui/qgserrordialog.h +++ b/src/gui/qgserrordialog.h @@ -31,15 +31,15 @@ class GUI_EXPORT QgsErrorDialog: public QDialog, private Ui::QgsErrorDialogBase { Q_OBJECT public: - QgsErrorDialog( const QgsError & theError, const QString & theTitle, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); + QgsErrorDialog( const QgsError & error, const QString & title, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); /** Show dialog with error - * @param theError error - * @param theTitle title + * @param error error + * @param title title * @param parent parent object * @param fl widget flags */ - static void show( const QgsError & theError, const QString & theTitle, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); + static void show( const QgsError & error, const QString & title, QWidget *parent = nullptr, Qt::WindowFlags fl = QgisGui::ModalDialogFlags ); public slots: void on_mDetailPushButton_clicked(); diff --git a/src/gui/qgsfilewidget.cpp b/src/gui/qgsfilewidget.cpp index adba86ce6fd..3150b9408f9 100644 --- a/src/gui/qgsfilewidget.cpp +++ b/src/gui/qgsfilewidget.cpp @@ -201,8 +201,8 @@ void QgsFileWidget::openFileDialog() } // If there is no valid value, find a default path to use - QUrl theUrl = QUrl::fromUserInput( oldPath ); - if ( !theUrl.isValid() ) + QUrl url = QUrl::fromUserInput( oldPath ); + if ( !url.isValid() ) { QString defPath = QDir::cleanPath( QgsProject::instance()->fileInfo().absolutePath() ); if ( defPath.isEmpty() ) diff --git a/src/gui/qgsgenericprojectionselector.cpp b/src/gui/qgsgenericprojectionselector.cpp index 6877e9ea716..14e89892a9b 100644 --- a/src/gui/qgsgenericprojectionselector.cpp +++ b/src/gui/qgsgenericprojectionselector.cpp @@ -41,11 +41,11 @@ QgsGenericProjectionSelector::QgsGenericProjectionSelector( QWidget *parent, connect( projectionSelector, SIGNAL( projectionDoubleClicked() ), this, SLOT( accept() ) ); } -void QgsGenericProjectionSelector::setMessage( QString theMessage ) +void QgsGenericProjectionSelector::setMessage( QString message ) { //short term kludge to make the layer selector default to showing //a layer projection selection message. If you want the selector - if ( theMessage.isEmpty() ) + if ( message.isEmpty() ) { // Set up text edit pane QString format( QStringLiteral( "

%1

%2 %3" ) ); @@ -53,12 +53,12 @@ void QgsGenericProjectionSelector::setMessage( QString theMessage ) QString sentence1 = tr( "This layer appears to have no projection specification." ); QString sentence2 = tr( "By default, this layer will now have its projection set to that of the project, " "but you may override this by selecting a different projection below." ); - theMessage = format.arg( header, sentence1, sentence2 ); + message = format.arg( header, sentence1, sentence2 ); } QString myStyle = QgsApplication::reportStyleSheet(); - theMessage = "" + theMessage + ""; - textEdit->setHtml( theMessage ); + message = "" + message + ""; + textEdit->setHtml( message ); textEdit->show(); } @@ -68,9 +68,9 @@ QgsGenericProjectionSelector::~QgsGenericProjectionSelector() settings.setValue( QStringLiteral( "/Windows/ProjectionSelector/geometry" ), saveGeometry() ); } -void QgsGenericProjectionSelector::setSelectedCrsName( const QString& theName ) +void QgsGenericProjectionSelector::setSelectedCrsName( const QString& name ) { - projectionSelector->setSelectedCrsName( theName ); + projectionSelector->setSelectedCrsName( name ); } void QgsGenericProjectionSelector::setSelectedCrsId( long theID ) diff --git a/src/gui/qgsgenericprojectionselector.h b/src/gui/qgsgenericprojectionselector.h index 37d1a343a43..3e523f21313 100644 --- a/src/gui/qgsgenericprojectionselector.h +++ b/src/gui/qgsgenericprojectionselector.h @@ -64,11 +64,11 @@ class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui::QgsG /** If no parameter is passed, the message will be a generic * 'define the CRS for this layer'. */ - void setMessage( QString theMessage = QStringLiteral( "" ) ); + void setMessage( QString message = QStringLiteral( "" ) ); long selectedCrsId(); QString selectedAuthId(); - void setSelectedCrsName( const QString& theName ); + void setSelectedCrsName( const QString& name ); void setSelectedCrsId( long theID ); void setSelectedAuthId( const QString& authId ); diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp index 4c026e7bf0a..b62b70bc26d 100644 --- a/src/gui/qgsmapcanvas.cpp +++ b/src/gui/qgsmapcanvas.cpp @@ -244,14 +244,14 @@ double QgsMapCanvas::magnificationFactor() const return mSettings.magnificationFactor(); } -void QgsMapCanvas::enableAntiAliasing( bool theFlag ) +void QgsMapCanvas::enableAntiAliasing( bool flag ) { - mSettings.setFlag( QgsMapSettings::Antialiasing, theFlag ); + mSettings.setFlag( QgsMapSettings::Antialiasing, flag ); } // anti aliasing -void QgsMapCanvas::enableMapTileRendering( bool theFlag ) +void QgsMapCanvas::enableMapTileRendering( bool flag ) { - mSettings.setFlag( QgsMapSettings::RenderMapTile, theFlag ); + mSettings.setFlag( QgsMapSettings::RenderMapTile, flag ); } QgsMapLayer* QgsMapCanvas::layer( int index ) @@ -627,7 +627,7 @@ void QgsMapCanvas::stopRendering() } //the format defaults to "PNG" if not specified -void QgsMapCanvas::saveAsImage( const QString& theFileName, QPixmap * theQPixmap, const QString& theFormat ) +void QgsMapCanvas::saveAsImage( const QString& fileName, QPixmap * theQPixmap, const QString& format ) { QPainter painter; QImage image; @@ -678,7 +678,7 @@ void QgsMapCanvas::saveAsImage( const QString& theFileName, QPixmap * theQPixmap } painter.end(); - image.save( theFileName, theFormat.toLocal8Bit().data() ); + image.save( fileName, format.toLocal8Bit().data() ); //create a world file to go with the image... QgsRectangle myRect = mapSettings().visibleExtent(); @@ -697,7 +697,7 @@ void QgsMapCanvas::saveAsImage( const QString& theFileName, QPixmap * theQPixmap myHeader += qgsDoubleToString( myRect.xMinimum() + ( mapUnitsPerPixel() / 2 ) ) + "\r\n"; //Origin Y (center of top left cell) myHeader += qgsDoubleToString( myRect.yMaximum() - ( mapUnitsPerPixel() / 2 ) ) + "\r\n"; - QFileInfo myInfo = QFileInfo( theFileName ); + QFileInfo myInfo = QFileInfo( fileName ); // build the world file name QString outputSuffix = myInfo.suffix(); QString myWorldFileName = myInfo.absolutePath() + '/' + myInfo.baseName() + '.' @@ -1522,17 +1522,17 @@ void QgsMapCanvas::unsetMapTool( QgsMapTool* tool ) } //! Write property of QColor bgColor. -void QgsMapCanvas::setCanvasColor( const QColor & theColor ) +void QgsMapCanvas::setCanvasColor( const QColor & color ) { // background of map's pixmap - mSettings.setBackgroundColor( theColor ); + mSettings.setBackgroundColor( color ); // background of the QGraphicsView - QBrush bgBrush( theColor ); + QBrush bgBrush( color ); setBackgroundBrush( bgBrush ); #if 0 QPalette palette; - palette.setColor( backgroundRole(), theColor ); + palette.setColor( backgroundRole(), color ); setPalette( palette ); #endif @@ -1573,8 +1573,7 @@ void QgsMapCanvas::layerStateChange() void QgsMapCanvas::layerCrsChange() { // called when a layer's CRS has been changed - QObject *theSender = sender(); - QgsMapLayer *layer = qobject_cast( theSender ); + QgsMapLayer *layer = qobject_cast( sender() ); QString destAuthId = mSettings.destinationCrs().authid(); getDatumTransformInfo( layer, layer->crs().authid(), destAuthId ); @@ -1634,9 +1633,9 @@ void QgsMapCanvas::setLayerStyleOverrides( const QMap& overrid } -void QgsMapCanvas::setRenderFlag( bool theFlag ) +void QgsMapCanvas::setRenderFlag( bool flag ) { - mRenderFlag = theFlag; + mRenderFlag = flag; if ( mRenderFlag ) { diff --git a/src/gui/qgsmapcanvas.h b/src/gui/qgsmapcanvas.h index 38771797226..bc2db496581 100644 --- a/src/gui/qgsmapcanvas.h +++ b/src/gui/qgsmapcanvas.h @@ -296,13 +296,13 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView bool scaleLocked() const { return mScaleLocked;} //! used to determine if anti-aliasing is enabled or not - void enableAntiAliasing( bool theFlag ); + void enableAntiAliasing( bool flag ); //! true if antialising is enabled bool antiAliasingEnabled() const { return mSettings.testFlag( QgsMapSettings::Antialiasing ); } //! sets map tile rendering flag - void enableMapTileRendering( bool theFlag ); + void enableMapTileRendering( bool flag ); // following 2 methods should be moved elsewhere or changed to private // currently used by pan map tool @@ -405,7 +405,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView void selectionChangedSlot(); //! Save the convtents of the map canvas to disk as an image - void saveAsImage( const QString& theFileName, QPixmap * QPixmap = nullptr, const QString& = "PNG" ); + void saveAsImage( const QString& fileName, QPixmap * QPixmap = nullptr, const QString& = "PNG" ); //! This slot is connected to the visibility change of one or more layers void layerStateChange(); @@ -414,7 +414,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView void layerCrsChange(); //! Whether to suppress rendering or not - void setRenderFlag( bool theFlag ); + void setRenderFlag( bool flag ); //! State of render suppression flag bool renderFlag() {return mRenderFlag;} diff --git a/src/gui/qgsmaptip.cpp b/src/gui/qgsmaptip.cpp index de8eb1642ea..90643b87d6e 100644 --- a/src/gui/qgsmaptip.cpp +++ b/src/gui/qgsmaptip.cpp @@ -45,7 +45,7 @@ QgsMapTip::QgsMapTip() void QgsMapTip::showMapTip( QgsMapLayer *pLayer, QgsPoint & mapPosition, - QPoint & thePixelPosition, + QPoint & pixelPosition, QgsMapCanvas *pMapCanvas ) { // Do the search using the active layer and the preferred label field for the @@ -126,8 +126,8 @@ void QgsMapTip::showMapTip( QgsMapLayer *pLayer, "" "" ).arg( bodyStyle, containerStyle, tipText ); - mWidget->move( thePixelPosition.x(), - thePixelPosition.y() ); + mWidget->move( pixelPosition.x(), + pixelPosition.y() ); mWebView->setHtml( tipHtml ); lastTipText = tipText; diff --git a/src/gui/qgsmaptip.h b/src/gui/qgsmaptip.h index 2318ae08976..3faacf49406 100644 --- a/src/gui/qgsmaptip.h +++ b/src/gui/qgsmaptip.h @@ -59,15 +59,15 @@ class GUI_EXPORT QgsMapTip : public QWidget /** Show a maptip at a given point on the map canvas * @param thepLayer a qgis vector map layer pointer that will * be used to provide the attribute data for the map tip. - * @param theMapPosition a reference to the position of the cursor + * @param mapPosition a reference to the position of the cursor * in map coordinatess. - * @param thePixelPosition a reference to the position of the cursor + * @param pixelPosition a reference to the position of the cursor * in pixel coordinates. * @param mpMapCanvas a map canvas on which the tip is drawn */ void showMapTip( QgsMapLayer * thepLayer, - QgsPoint & theMapPosition, - QPoint & thePixelPosition, + QgsPoint & mapPosition, + QPoint & pixelPosition, QgsMapCanvas *mpMapCanvas ); /** Clear the current maptip if it exists @@ -78,7 +78,7 @@ class GUI_EXPORT QgsMapTip : public QWidget // Fetch the feature to use for the maptip text. // Only the first feature in the search radius is used QString fetchFeature( QgsMapLayer * thepLayer, - QgsPoint & theMapPosition, + QgsPoint & mapPosition, QgsMapCanvas *mapCanvas ); QString replaceText( diff --git a/src/gui/qgsowssourceselect.cpp b/src/gui/qgsowssourceselect.cpp index c322d4796f9..a8d3f8e89ce 100644 --- a/src/gui/qgsowssourceselect.cpp +++ b/src/gui/qgsowssourceselect.cpp @@ -544,27 +544,27 @@ void QgsOWSSourceSelect::setConnectionListPosition() QgsOwsConnection::setSelectedConnection( mService, mConnectionsComboBox->currentText() ); } -void QgsOWSSourceSelect::showStatusMessage( QString const &theMessage ) +void QgsOWSSourceSelect::showStatusMessage( QString const &message ) { - mStatusLabel->setText( theMessage ); + mStatusLabel->setText( message ); // update the display of this widget update(); } -void QgsOWSSourceSelect::showError( QString const &theTitle, QString const &theFormat, QString const &theError ) +void QgsOWSSourceSelect::showError( QString const &title, QString const &format, QString const &error ) { QgsMessageViewer * mv = new QgsMessageViewer( this ); - mv->setWindowTitle( theTitle ); + mv->setWindowTitle( title ); - if ( theFormat == QLatin1String( "text/html" ) ) + if ( format == QLatin1String( "text/html" ) ) { - mv->setMessageAsHtml( theError ); + mv->setMessageAsHtml( error ); } else { - mv->setMessageAsPlainText( tr( "Could not understand the response:\n%1" ).arg( theError ) ); + mv->setMessageAsPlainText( tr( "Could not understand the response:\n%1" ).arg( error ) ); } mv->showMessage( true ); // Is deleted when closed } diff --git a/src/gui/qgsowssourceselect.h b/src/gui/qgsowssourceselect.h index a46c7fd2fd1..82d18609bf8 100644 --- a/src/gui/qgsowssourceselect.h +++ b/src/gui/qgsowssourceselect.h @@ -92,10 +92,10 @@ class GUI_EXPORT QgsOWSSourceSelect : public QDialog, public Ui::QgsOWSSourceSel virtual void on_mLayersTreeWidget_itemSelectionChanged(); //! Set status message to theMessage - void showStatusMessage( const QString &theMessage ); + void showStatusMessage( const QString &message ); //! show whatever error is exposed. - void showError( const QString &theTitle, const QString &theFormat, const QString &theError ); + void showError( const QString &title, const QString &format, const QString &error ); //! Stores the selected datasource whenerver it is changed void on_mConnectionsComboBox_activated( int ); diff --git a/src/gui/qgsprojectionselector.cpp b/src/gui/qgsprojectionselector.cpp index ee262bf9176..8154860d728 100644 --- a/src/gui/qgsprojectionselector.cpp +++ b/src/gui/qgsprojectionselector.cpp @@ -112,18 +112,18 @@ QgsProjectionSelector::~QgsProjectionSelector() settings.setValue( QStringLiteral( "/UI/recentProjectionsAuthId" ), projectionsAuthId ); } -void QgsProjectionSelector::resizeEvent( QResizeEvent * theEvent ) +void QgsProjectionSelector::resizeEvent( QResizeEvent * event ) { - lstCoordinateSystems->header()->resizeSection( NameColumn, theEvent->size().width() - 240 ); + lstCoordinateSystems->header()->resizeSection( NameColumn, event->size().width() - 240 ); lstCoordinateSystems->header()->resizeSection( AuthidColumn, 240 ); lstCoordinateSystems->header()->resizeSection( QgisCrsIdColumn, 0 ); - lstRecent->header()->resizeSection( NameColumn, theEvent->size().width() - 240 ); + lstRecent->header()->resizeSection( NameColumn, event->size().width() - 240 ); lstRecent->header()->resizeSection( AuthidColumn, 240 ); lstRecent->header()->resizeSection( QgisCrsIdColumn, 0 ); } -void QgsProjectionSelector::showEvent( QShowEvent * theEvent ) +void QgsProjectionSelector::showEvent( QShowEvent * event ) { // ensure the projection list view is actually populated // before we show this widget @@ -143,7 +143,7 @@ void QgsProjectionSelector::showEvent( QShowEvent * theEvent ) emit initialized(); // Pass up the inheritance hierarchy - QWidget::showEvent( theEvent ); + QWidget::showEvent( event ); } QString QgsProjectionSelector::ogcWmsCrsFilterAsSqlExpression( QSet * crsFilter ) @@ -259,12 +259,12 @@ void QgsProjectionSelector::applySelection( int column, QString value ) } } -void QgsProjectionSelector::insertRecent( long theCrsId ) +void QgsProjectionSelector::insertRecent( long crsId ) { if ( !mProjListDone || !mUserProjListDone ) return; - QList nodes = lstCoordinateSystems->findItems( QString::number( theCrsId ), Qt::MatchExactly | Qt::MatchRecursive, QgisCrsIdColumn ); + QList nodes = lstCoordinateSystems->findItems( QString::number( crsId ), Qt::MatchExactly | Qt::MatchRecursive, QgisCrsIdColumn ); if ( nodes.isEmpty() ) return; @@ -794,11 +794,11 @@ void QgsProjectionSelector::on_cbxHideDeprecated_stateChanged() hideDeprecated( lstCoordinateSystems->topLevelItem( i ) ); } -void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTxt ) +void QgsProjectionSelector::on_leSearch_textChanged( const QString & filterTxt ) { - QString filterTxt = theFilterTxt; - filterTxt.replace( QRegExp( "\\s+" ), QStringLiteral( ".*" ) ); - QRegExp re( filterTxt, Qt::CaseInsensitive ); + QString filterTxtCopy = filterTxt; + filterTxtCopy.replace( QRegExp( "\\s+" ), QStringLiteral( ".*" ) ); + QRegExp re( filterTxtCopy, Qt::CaseInsensitive ); // filter recent crs's QTreeWidgetItemIterator itr( lstRecent ); @@ -871,7 +871,7 @@ void QgsProjectionSelector::pushProjectionToFront() } -long QgsProjectionSelector::getLargestCrsIdMatch( const QString& theSql ) +long QgsProjectionSelector::getLargestCrsIdMatch( const QString& sql ) { long srsId = 0; @@ -901,7 +901,7 @@ long QgsProjectionSelector::getLargestCrsIdMatch( const QString& theSql ) return 0; } - result = sqlite3_prepare( database, theSql.toUtf8(), theSql.toUtf8().length(), &stmt, &tail ); + result = sqlite3_prepare( database, sql.toUtf8(), sql.toUtf8().length(), &stmt, &tail ); // XXX Need to free memory from the error msg if one is set if ( result == SQLITE_OK && sqlite3_step( stmt ) == SQLITE_ROW ) { @@ -925,7 +925,7 @@ long QgsProjectionSelector::getLargestCrsIdMatch( const QString& theSql ) } } - result = sqlite3_prepare( database, theSql.toUtf8(), theSql.toUtf8().length(), &stmt, &tail ); + result = sqlite3_prepare( database, sql.toUtf8(), sql.toUtf8().length(), &stmt, &tail ); // XXX Need to free memory from the error msg if one is set if ( result == SQLITE_OK && sqlite3_step( stmt ) == SQLITE_ROW ) { @@ -954,8 +954,8 @@ QStringList QgsProjectionSelector::authorities() return QStringList(); } - QString theSql = QStringLiteral( "select distinct auth_name from tbl_srs" ); - result = sqlite3_prepare( database, theSql.toUtf8(), theSql.toUtf8().length(), &stmt, &tail ); + QString sql = QStringLiteral( "select distinct auth_name from tbl_srs" ); + result = sqlite3_prepare( database, sql.toUtf8(), sql.toUtf8().length(), &stmt, &tail ); QStringList authorities; if ( result == SQLITE_OK ) @@ -993,11 +993,11 @@ const QString QgsProjectionSelector::sqlSafeString( const QString& theSQL ) return retval; } -void QgsProjectionSelector::showDBMissingWarning( const QString& theFileName ) +void QgsProjectionSelector::showDBMissingWarning( const QString& fileName ) { QMessageBox::critical( this, tr( "Resource Location Error" ), tr( "Error reading database file from: \n %1\n" "Because of this the projection selector will not work..." ) - .arg( theFileName ) ); + .arg( fileName ) ); } diff --git a/src/gui/qgsprojectionselector.h b/src/gui/qgsprojectionselector.h index 81791279d13..932563311bd 100644 --- a/src/gui/qgsprojectionselector.h +++ b/src/gui/qgsprojectionselector.h @@ -110,10 +110,10 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti protected: // Used to ensure the projection list view is actually populated - void showEvent( QShowEvent * theEvent ) override; + void showEvent( QShowEvent * event ) override; // Used to manage column sizes - void resizeEvent( QResizeEvent * theEvent ) override; + void resizeEvent( QResizeEvent * event ) override; private: @@ -150,7 +150,7 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti QString getSelectedExpression( const QString& e ); //! Show the user a warning if the srs database could not be found - void showDBMissingWarning( const QString& theFileName ); + void showDBMissingWarning( const QString& fileName ); // List view nodes for the tree view of projections //! User defined projections node QTreeWidgetItem *mUserProjList = nullptr; @@ -167,10 +167,10 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti /** * Utility method used in conjunction with name based searching tool */ - long getLargestCrsIdMatch( const QString& theSql ); + long getLargestCrsIdMatch( const QString& sql ); //! add recently used CRS - void insertRecent( long theCrsId ); + void insertRecent( long crsId ); //! Has the Projection List been populated? bool mProjListDone; diff --git a/src/gui/raster/qgshillshaderendererwidget.h b/src/gui/raster/qgshillshaderendererwidget.h index 02b67d4bde6..0af7d05529a 100644 --- a/src/gui/raster/qgshillshaderendererwidget.h +++ b/src/gui/raster/qgshillshaderendererwidget.h @@ -45,7 +45,7 @@ class GUI_EXPORT QgsHillshadeRendererWidget: public QgsRasterRendererWidget, pri /** * Factory method to create the renderer for this type. */ - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsHillshadeRendererWidget( layer, theExtent ); } + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) { return new QgsHillshadeRendererWidget( layer, extent ); } /** * @brief The renderer for the widget. diff --git a/src/gui/raster/qgsmultibandcolorrendererwidget.cpp b/src/gui/raster/qgsmultibandcolorrendererwidget.cpp index a55f9557473..d1a976e07fd 100644 --- a/src/gui/raster/qgsmultibandcolorrendererwidget.cpp +++ b/src/gui/raster/qgsmultibandcolorrendererwidget.cpp @@ -260,23 +260,23 @@ void QgsMultiBandColorRendererWidget::minMaxModified() } } -void QgsMultiBandColorRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax ) +void QgsMultiBandColorRendererWidget::loadMinMax( int bandNo, double min, double max ) { - QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) ); + QgsDebugMsg( QString( "theBandNo = %1 min = %2 max = %3" ).arg( bandNo ).arg( min ).arg( max ) ); QLineEdit *myMinLineEdit, *myMaxLineEdit; - if ( mRedBandComboBox->currentData().toInt() == theBandNo ) + if ( mRedBandComboBox->currentData().toInt() == bandNo ) { myMinLineEdit = mRedMinLineEdit; myMaxLineEdit = mRedMaxLineEdit; } - else if ( mGreenBandComboBox->currentData().toInt() == theBandNo ) + else if ( mGreenBandComboBox->currentData().toInt() == bandNo ) { myMinLineEdit = mGreenMinLineEdit; myMaxLineEdit = mGreenMaxLineEdit; } - else if ( mBlueBandComboBox->currentData().toInt() == theBandNo ) + else if ( mBlueBandComboBox->currentData().toInt() == bandNo ) { myMinLineEdit = mBlueMinLineEdit; myMaxLineEdit = mBlueMaxLineEdit; @@ -288,22 +288,22 @@ void QgsMultiBandColorRendererWidget::loadMinMax( int theBandNo, double theMin, } mDisableMinMaxWidgetRefresh = true; - if ( qIsNaN( theMin ) ) + if ( qIsNaN( min ) ) { myMinLineEdit->clear(); } else { - myMinLineEdit->setText( QString::number( theMin ) ); + myMinLineEdit->setText( QString::number( min ) ); } - if ( qIsNaN( theMax ) ) + if ( qIsNaN( max ) ) { myMaxLineEdit->clear(); } else { - myMaxLineEdit->setText( QString::number( theMax ) ); + myMaxLineEdit->setText( QString::number( max ) ); } mDisableMinMaxWidgetRefresh = false; } diff --git a/src/gui/raster/qgsmultibandcolorrendererwidget.h b/src/gui/raster/qgsmultibandcolorrendererwidget.h index 9c6b0005dc8..f68dd2e3cb6 100644 --- a/src/gui/raster/qgsmultibandcolorrendererwidget.h +++ b/src/gui/raster/qgsmultibandcolorrendererwidget.h @@ -38,7 +38,7 @@ class GUI_EXPORT QgsMultiBandColorRendererWidget: public QgsRasterRendererWidget public: QgsMultiBandColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsMultiBandColorRendererWidget( layer, theExtent ); } + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) { return new QgsMultiBandColorRendererWidget( layer, extent ); } QgsRasterRenderer* renderer() override; void setMapCanvas( QgsMapCanvas* canvas ) override; @@ -55,7 +55,7 @@ class GUI_EXPORT QgsMultiBandColorRendererWidget: public QgsRasterRendererWidget public slots: //! called when new min/max values are loaded - void loadMinMax( int theBandNo, double theMin, double theMax ); + void loadMinMax( int bandNo, double min, double max ); private slots: //void on_mLoadPushButton_clicked(); diff --git a/src/gui/raster/qgspalettedrendererwidget.h b/src/gui/raster/qgspalettedrendererwidget.h index e959f8f240e..218c22b8db2 100644 --- a/src/gui/raster/qgspalettedrendererwidget.h +++ b/src/gui/raster/qgspalettedrendererwidget.h @@ -34,7 +34,7 @@ class GUI_EXPORT QgsPalettedRendererWidget: public QgsRasterRendererWidget, priv public: QgsPalettedRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsPalettedRendererWidget( layer, theExtent ); } + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) { return new QgsPalettedRendererWidget( layer, extent ); } QgsRasterRenderer* renderer() override; diff --git a/src/gui/raster/qgsrasterhistogramwidget.cpp b/src/gui/raster/qgsrasterhistogramwidget.cpp index 7c13dd6fb69..985ad27ea7a 100644 --- a/src/gui/raster/qgsrasterhistogramwidget.cpp +++ b/src/gui/raster/qgsrasterhistogramwidget.cpp @@ -251,9 +251,9 @@ void QgsRasterHistogramWidget::setRendererWidget( const QString& name, QgsRaster on_cboHistoBand_currentIndexChanged( -1 ); } -void QgsRasterHistogramWidget::setActive( bool theActiveFlag ) +void QgsRasterHistogramWidget::setActive( bool activeFlag ) { - if ( theActiveFlag ) + if ( activeFlag ) { refreshHistogram(); on_cboHistoBand_currentIndexChanged( -1 ); @@ -688,15 +688,15 @@ void QgsRasterHistogramWidget::on_mSaveAsImageButton_clicked() } } -bool QgsRasterHistogramWidget::histoSaveAsImage( const QString& theFilename, +bool QgsRasterHistogramWidget::histoSaveAsImage( const QString& filename, int width, int height, int quality ) { // make sure dir. exists - QFileInfo myInfo( theFilename ); + QFileInfo myInfo( filename ); QDir myDir( myInfo.dir() ); if ( ! myDir.exists() ) { - QgsDebugMsg( QString( "Error, directory %1 non-existent (theFilename = %2)" ).arg( myDir.absolutePath(), theFilename ) ); + QgsDebugMsg( QString( "Error, directory %1 non-existent (theFilename = %2)" ).arg( myDir.absolutePath(), filename ) ); return false; } @@ -734,15 +734,15 @@ bool QgsRasterHistogramWidget::histoSaveAsImage( const QString& theFilename, #endif // save pixmap to file - myPixmap.save( theFilename, nullptr, quality ); + myPixmap.save( filename, nullptr, quality ); // should do more error checking return true; } -void QgsRasterHistogramWidget::setSelectedBand( int theBandNo ) +void QgsRasterHistogramWidget::setSelectedBand( int bandNo ) { - cboHistoBand->setCurrentIndex( theBandNo - 1 ); + cboHistoBand->setCurrentIndex( bandNo - 1 ); } void QgsRasterHistogramWidget::on_cboHistoBand_currentIndexChanged( int index ) @@ -884,34 +884,34 @@ void QgsRasterHistogramWidget::histoAction( const QString &actionName, bool acti leHistoMax->blockSignals( true ); // process each band - Q_FOREACH ( int theBandNo, myBands ) + Q_FOREACH ( int bandNo, myBands ) { ok = false; #if 0 if ( actionName == "Load actual" ) { ok = mRendererWidget->bandMinMax( QgsRasterRendererWidget::Actual, - theBandNo, minMaxValues ); + bandNo, minMaxValues ); } else if ( actionName == "Load estimate" ) { ok = mRendererWidget->bandMinMax( QgsRasterRendererWidget::Estimate, - theBandNo, minMaxValues ); + bandNo, minMaxValues ); } else if ( actionName == "Load extent" ) { ok = mRendererWidget->bandMinMax( QgsRasterRendererWidget::CurrentExtent, - theBandNo, minMaxValues ); + bandNo, minMaxValues ); } else if ( actionName == "Load 1 stddev" || actionName == "Load stddev" ) { - ok = mRendererWidget->bandMinMaxFromStdDev( myStdDev, theBandNo, minMaxValues ); + ok = mRendererWidget->bandMinMaxFromStdDev( myStdDev, bandNo, minMaxValues ); } #endif // apply current item - cboHistoBand->setCurrentIndex( theBandNo - 1 ); + cboHistoBand->setCurrentIndex( bandNo - 1 ); if ( !ok || actionName == QLatin1String( "Load reset" ) ) { leHistoMin->clear(); @@ -920,9 +920,9 @@ void QgsRasterHistogramWidget::histoAction( const QString &actionName, bool acti // TODO - fix gdal provider: changes data type when nodata value is not found // this prevents us from getting proper min and max values here minMaxValues[0] = QgsContrastEnhancement::minimumValuePossible( - ( Qgis::DataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) ); + ( Qgis::DataType ) mRasterLayer->dataProvider()->dataType( bandNo ) ); minMaxValues[1] = QgsContrastEnhancement::maximumValuePossible( - ( Qgis::DataType ) mRasterLayer->dataProvider()->dataType( theBandNo ) ); + ( Qgis::DataType ) mRasterLayer->dataProvider()->dataType( bandNo ) ); } else { @@ -954,12 +954,12 @@ void QgsRasterHistogramWidget::applyHistoMin() if ( ! mRendererWidget ) return; - int theBandNo = cboHistoBand->currentIndex() + 1; + int bandNo = cboHistoBand->currentIndex() + 1; QList< int > mySelectedBands = rendererSelectedBands(); QString min; for ( int i = 0; i <= mySelectedBands.size(); i++ ) { - if ( theBandNo == mRendererWidget->selectedBand( i ) ) + if ( bandNo == mRendererWidget->selectedBand( i ) ) { min = leHistoMin->text(); if ( mHistoUpdateStyleToMinMax ) @@ -983,12 +983,12 @@ void QgsRasterHistogramWidget::applyHistoMax() if ( ! mRendererWidget ) return; - int theBandNo = cboHistoBand->currentIndex() + 1; + int bandNo = cboHistoBand->currentIndex() + 1; QList< int > mySelectedBands = rendererSelectedBands(); QString max; for ( int i = 0; i <= mySelectedBands.size(); i++ ) { - if ( theBandNo == mRendererWidget->selectedBand( i ) ) + if ( bandNo == mRendererWidget->selectedBand( i ) ) { max = leHistoMax->text(); if ( mHistoUpdateStyleToMinMax ) @@ -1118,11 +1118,11 @@ void QgsRasterHistogramWidget::updateHistoMarkers() if ( !mpPlot || !mHistoMarkerMin || !mHistoMarkerMax ) return; - int theBandNo = cboHistoBand->currentIndex() + 1; + int bandNo = cboHistoBand->currentIndex() + 1; QList< int > mySelectedBands = histoSelectedBands(); if (( ! mHistoShowMarkers && ! btnHistoMin->isChecked() && ! btnHistoMax->isChecked() ) || - ( ! mySelectedBands.isEmpty() && ! mySelectedBands.contains( theBandNo ) ) ) + ( ! mySelectedBands.isEmpty() && ! mySelectedBands.contains( bandNo ) ) ) { mHistoMarkerMin->hide(); mHistoMarkerMax->hide(); @@ -1139,7 +1139,7 @@ void QgsRasterHistogramWidget::updateHistoMarkers() if ( maxStr != QLatin1String( "" ) ) maxVal = maxStr.toDouble(); - QPen linePen = QPen( mHistoColors.at( theBandNo ) ); + QPen linePen = QPen( mHistoColors.at( bandNo ) ); linePen.setStyle( Qt::DashLine ); mHistoMarkerMin->setLineStyle( QwtPlotMarker::VLine ); mHistoMarkerMin->setLinePen( linePen ); @@ -1198,7 +1198,7 @@ QList< int > QgsRasterHistogramWidget::rendererSelectedBands() return mySelectedBands; } -QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int theBandNo ) +QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int bandNo ) { QPair< QString, QString > myMinMax; @@ -1207,7 +1207,7 @@ QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int theBandN if ( mRendererName == QLatin1String( "singlebandgray" ) ) { - if ( theBandNo == mRendererWidget->selectedBand() ) + if ( bandNo == mRendererWidget->selectedBand() ) { myMinMax.first = mRendererWidget->min(); myMinMax.second = mRendererWidget->max(); @@ -1217,7 +1217,7 @@ QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int theBandN { for ( int i = 0; i <= 2; i++ ) { - if ( theBandNo == mRendererWidget->selectedBand( i ) ) + if ( bandNo == mRendererWidget->selectedBand( i ) ) { myMinMax.first = mRendererWidget->min( i ); myMinMax.second = mRendererWidget->max( i ); @@ -1231,9 +1231,9 @@ QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int theBandN // TODO - fix gdal provider: changes data type when nodata value is not found // this prevents us from getting proper min and max values here // minStr = QString::number( QgsContrastEnhancement::minimumValuePossible( ( Qgis::DataType ) - // mRasterLayer->dataProvider()->dataType( theBandNo ) ) ); + // mRasterLayer->dataProvider()->dataType( bandNo ) ) ); // maxStr = QString::number( QgsContrastEnhancement::maximumValuePossible( ( Qgis::DataType ) - // mRasterLayer->dataProvider()->dataType( theBandNo ) ) ); + // mRasterLayer->dataProvider()->dataType( bandNo ) ) ); // if we get an empty result, fill with default value (histo min/max) if ( myMinMax.first.isEmpty() ) @@ -1241,7 +1241,7 @@ QPair< QString, QString > QgsRasterHistogramWidget::rendererMinMax( int theBandN if ( myMinMax.second.isEmpty() ) myMinMax.second = QString::number( mHistoMax ); - QgsDebugMsg( QString( "bandNo %1 got min/max [%2] [%3]" ).arg( theBandNo ).arg( myMinMax.first, myMinMax.second ) ); + QgsDebugMsg( QString( "bandNo %1 got min/max [%2] [%3]" ).arg( bandNo ).arg( myMinMax.first, myMinMax.second ) ); return myMinMax; } diff --git a/src/gui/raster/qgsrasterhistogramwidget.h b/src/gui/raster/qgsrasterhistogramwidget.h index adadf42f0d4..cdc7d76d4f3 100644 --- a/src/gui/raster/qgsrasterhistogramwidget.h +++ b/src/gui/raster/qgsrasterhistogramwidget.h @@ -46,13 +46,13 @@ class GUI_EXPORT QgsRasterHistogramWidget : public QgsMapLayerConfigWidget, priv QgsRasterHistogramWidget( QgsRasterLayer *lyr, QWidget *parent = nullptr ); //! Save the histogram as an image to disk - bool histoSaveAsImage( const QString& theFilename, int width = 600, int height = 600, int quality = -1 ); + bool histoSaveAsImage( const QString& filename, int width = 600, int height = 600, int quality = -1 ); //! Set the renderer widget (or just its name if there is no widget) void setRendererWidget( const QString& name, QgsRasterRendererWidget* rendererWidget = nullptr ); //! Activate the histogram widget - void setActive( bool theActiveFlag ); + void setActive( bool activeFlag ); //! \brief Compute the histogram on demand. bool computeHistogram( bool forceComputeFlag ); @@ -127,6 +127,6 @@ class GUI_EXPORT QgsRasterHistogramWidget : public QgsMapLayerConfigWidget, priv QList< int > histoSelectedBands(); //! \brief Returns a list of selected bands in the renderer widget. QList< int > rendererSelectedBands(); - QPair< QString, QString > rendererMinMax( int theBandNo ); + QPair< QString, QString > rendererMinMax( int bandNo ); }; #endif diff --git a/src/gui/raster/qgsrasterminmaxwidget.cpp b/src/gui/raster/qgsrasterminmaxwidget.cpp index 89adcbf1c74..e1511d372e7 100644 --- a/src/gui/raster/qgsrasterminmaxwidget.cpp +++ b/src/gui/raster/qgsrasterminmaxwidget.cpp @@ -29,9 +29,9 @@ const int IDX_WHOLE_RASTER = 0; const int IDX_CURRENT_CANVAS = 1; const int IDX_UPDATED_CANVAS = 2; -QgsRasterMinMaxWidget::QgsRasterMinMaxWidget( QgsRasterLayer* theLayer, QWidget *parent ) +QgsRasterMinMaxWidget::QgsRasterMinMaxWidget( QgsRasterLayer* layer, QWidget *parent ) : QWidget( parent ) - , mLayer( theLayer ) + , mLayer( layer ) , mCanvas( nullptr ) , mLastRectangleValid( false ) , mBandsChanged( false ) @@ -53,10 +53,10 @@ QgsMapCanvas* QgsRasterMinMaxWidget::mapCanvas() return mCanvas; } -void QgsRasterMinMaxWidget::setBands( const QList & theBands ) +void QgsRasterMinMaxWidget::setBands( const QList & bands ) { - mBandsChanged = theBands != mBands; - mBands = theBands; + mBandsChanged = bands != mBands; + mBands = bands; } QgsRectangle QgsRasterMinMaxWidget::extent() diff --git a/src/gui/raster/qgsrasterminmaxwidget.h b/src/gui/raster/qgsrasterminmaxwidget.h index a65d304c5c8..f0548d33713 100644 --- a/src/gui/raster/qgsrasterminmaxwidget.h +++ b/src/gui/raster/qgsrasterminmaxwidget.h @@ -36,14 +36,14 @@ class GUI_EXPORT QgsRasterMinMaxWidget: public QWidget, private Ui::QgsRasterMin { Q_OBJECT public: - QgsRasterMinMaxWidget( QgsRasterLayer* theLayer, QWidget *parent = nullptr ); + QgsRasterMinMaxWidget( QgsRasterLayer* layer, QWidget *parent = nullptr ); /** Sets the extent to use for minimum and maximum value calculation. - * @param theExtent extent in raster layer's CRS + * @param extent extent in raster layer's CRS * @note if a map canvas is set using setMapCanvas(), its extent will take * precedence over any extent set using this method. */ - void setExtent( const QgsRectangle & theExtent ) { mExtent = theExtent; } + void setExtent( const QgsRectangle & extent ) { mExtent = extent; } /** Sets the map canvas associated with the widget. This allows the widget to retrieve the current * map extent from the canvas. If a canvas is set it will take precedence over any extent @@ -61,7 +61,7 @@ class GUI_EXPORT QgsRasterMinMaxWidget: public QWidget, private Ui::QgsRasterMin */ QgsMapCanvas* mapCanvas(); - void setBands( const QList & theBands ); + void setBands( const QList & bands ); /** Return the extent selected by the user. * Either an empty extent for 'full' or the current visible extent. @@ -101,7 +101,7 @@ class GUI_EXPORT QgsRasterMinMaxWidget: public QWidget, private Ui::QgsRasterMin void widgetChanged(); //! signal emitted when new min/max values are computed from statistics. - void load( int theBandNo, double theMin, double theMax ); + void load( int bandNo, double min, double max ); private slots: diff --git a/src/gui/raster/qgsrastertransparencywidget.cpp b/src/gui/raster/qgsrastertransparencywidget.cpp index 299e13b829a..ea2d14a22cb 100644 --- a/src/gui/raster/qgsrastertransparencywidget.cpp +++ b/src/gui/raster/qgsrastertransparencywidget.cpp @@ -174,10 +174,10 @@ void QgsRasterTransparencyWidget::transparencyCellTextEdited( const QString &tex emit widgetChanged(); } -void QgsRasterTransparencyWidget::sliderTransparency_valueChanged( int theValue ) +void QgsRasterTransparencyWidget::sliderTransparency_valueChanged( int value ) { //set the transparency percentage label to a suitable value - int myInt = static_cast < int >(( theValue / 255.0 ) * 100 ); //255.0 to prevent integer division + int myInt = static_cast < int >(( value / 255.0 ) * 100 ); //255.0 to prevent integer division lblTransparencyPercent->setText( QString::number( myInt ) + '%' ); } diff --git a/src/gui/raster/qgsrastertransparencywidget.h b/src/gui/raster/qgsrastertransparencywidget.h index bf023035994..db43139c660 100644 --- a/src/gui/raster/qgsrastertransparencywidget.h +++ b/src/gui/raster/qgsrastertransparencywidget.h @@ -62,7 +62,7 @@ class GUI_EXPORT QgsRasterTransparencyWidget : public QgsMapLayerConfigWidget, p void transparencyCellTextEdited( const QString & text ); //! \brief slot executed when the transparency level changes. - void sliderTransparency_valueChanged( int theValue ); + void sliderTransparency_valueChanged( int value ); //! \brief slot executed when user presses "Add Values From Display" button on the transparency page void on_pbnAddValuesFromDisplay_clicked(); diff --git a/src/gui/raster/qgssinglebandgrayrendererwidget.cpp b/src/gui/raster/qgssinglebandgrayrendererwidget.cpp index d92fe668a46..6bd7489ea53 100644 --- a/src/gui/raster/qgssinglebandgrayrendererwidget.cpp +++ b/src/gui/raster/qgssinglebandgrayrendererwidget.cpp @@ -141,29 +141,29 @@ void QgsSingleBandGrayRendererWidget::minMaxModified() } -void QgsSingleBandGrayRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax ) +void QgsSingleBandGrayRendererWidget::loadMinMax( int bandNo, double min, double max ) { - Q_UNUSED( theBandNo ); + Q_UNUSED( bandNo ); - QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) ); + QgsDebugMsg( QString( "theBandNo = %1 min = %2 max = %3" ).arg( bandNo ).arg( min ).arg( max ) ); mDisableMinMaxWidgetRefresh = true; - if ( qIsNaN( theMin ) ) + if ( qIsNaN( min ) ) { mMinLineEdit->clear(); } else { - mMinLineEdit->setText( QString::number( theMin ) ); + mMinLineEdit->setText( QString::number( min ) ); } - if ( qIsNaN( theMax ) ) + if ( qIsNaN( max ) ) { mMaxLineEdit->clear(); } else { - mMaxLineEdit->setText( QString::number( theMax ) ); + mMaxLineEdit->setText( QString::number( max ) ); } mDisableMinMaxWidgetRefresh = false; } diff --git a/src/gui/raster/qgssinglebandgrayrendererwidget.h b/src/gui/raster/qgssinglebandgrayrendererwidget.h index b53be0d34c0..02044bd84f0 100644 --- a/src/gui/raster/qgssinglebandgrayrendererwidget.h +++ b/src/gui/raster/qgssinglebandgrayrendererwidget.h @@ -33,7 +33,7 @@ class GUI_EXPORT QgsSingleBandGrayRendererWidget: public QgsRasterRendererWidget public: QgsSingleBandGrayRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsSingleBandGrayRendererWidget( layer, theExtent ); } + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) { return new QgsSingleBandGrayRendererWidget( layer, extent ); } QgsRasterRenderer* renderer() override; void setMapCanvas( QgsMapCanvas* canvas ) override; @@ -50,7 +50,7 @@ class GUI_EXPORT QgsSingleBandGrayRendererWidget: public QgsRasterRendererWidget public slots: //! called when new min/max values are loaded - void loadMinMax( int theBandNo, double theMin, double theMax ); + void loadMinMax( int bandNo, double min, double max ); private slots: void on_mGrayBandComboBox_currentIndexChanged( int index ); diff --git a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp index 2ebf695e041..5020414246d 100644 --- a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp +++ b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp @@ -744,51 +744,51 @@ void QgsSingleBandPseudoColorRendererWidget::on_mColorInterpolationComboBox_curr emit widgetChanged(); } -void QgsSingleBandPseudoColorRendererWidget::loadMinMax( int theBandNo, double theMin, double theMax ) +void QgsSingleBandPseudoColorRendererWidget::loadMinMax( int bandNo, double min, double max ) { - Q_UNUSED( theBandNo ); - QgsDebugMsg( QString( "theBandNo = %1 theMin = %2 theMax = %3" ).arg( theBandNo ).arg( theMin ).arg( theMax ) ); + Q_UNUSED( bandNo ); + QgsDebugMsg( QString( "theBandNo = %1 min = %2 max = %3" ).arg( bandNo ).arg( min ).arg( max ) ); mDisableMinMaxWidgetRefresh = true; - if ( qIsNaN( theMin ) ) + if ( qIsNaN( min ) ) { mMinLineEdit->clear(); } else { - mMinLineEdit->setText( QString::number( theMin ) ); + mMinLineEdit->setText( QString::number( min ) ); } - if ( qIsNaN( theMax ) ) + if ( qIsNaN( max ) ) { mMaxLineEdit->clear(); } else { - mMaxLineEdit->setText( QString::number( theMax ) ); + mMaxLineEdit->setText( QString::number( max ) ); } mDisableMinMaxWidgetRefresh = false; classify(); } -void QgsSingleBandPseudoColorRendererWidget::setLineEditValue( QLineEdit * theLineEdit, double theValue ) +void QgsSingleBandPseudoColorRendererWidget::setLineEditValue( QLineEdit * lineEdit, double value ) { QString s; - if ( !qIsNaN( theValue ) ) + if ( !qIsNaN( value ) ) { - s = QString::number( theValue ); + s = QString::number( value ); } - theLineEdit->setText( s ); + lineEdit->setText( s ); } -double QgsSingleBandPseudoColorRendererWidget::lineEditValue( const QLineEdit * theLineEdit ) const +double QgsSingleBandPseudoColorRendererWidget::lineEditValue( const QLineEdit * lineEdit ) const { - if ( theLineEdit->text().isEmpty() ) + if ( lineEdit->text().isEmpty() ) { return std::numeric_limits::quiet_NaN(); } - return theLineEdit->text().toDouble(); + return lineEdit->text().toDouble(); } void QgsSingleBandPseudoColorRendererWidget::resetClassifyButton() diff --git a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.h b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.h index bdbb433fc28..90b73d88513 100644 --- a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.h +++ b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.h @@ -39,7 +39,7 @@ class GUI_EXPORT QgsSingleBandPseudoColorRendererWidget: public QgsRasterRendere QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); - static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &theExtent ) { return new QgsSingleBandPseudoColorRendererWidget( layer, theExtent ); } + static QgsRasterRendererWidget* create( QgsRasterLayer* layer, const QgsRectangle &extent ) { return new QgsSingleBandPseudoColorRendererWidget( layer, extent ); } QgsRasterRenderer* renderer() override; void setMapCanvas( QgsMapCanvas* canvas ) override; void doComputations() override; @@ -53,7 +53,7 @@ class GUI_EXPORT QgsSingleBandPseudoColorRendererWidget: public QgsRasterRendere */ void classify(); //! called when new min/max values are loaded - void loadMinMax( int theBandNo, double theMin, double theMax ); + void loadMinMax( int bandNo, double min, double max ); private: @@ -93,8 +93,8 @@ class GUI_EXPORT QgsSingleBandPseudoColorRendererWidget: public QgsRasterRendere private: - void setLineEditValue( QLineEdit *theLineEdit, double theValue ); - double lineEditValue( const QLineEdit *theLineEdit ) const; + void setLineEditValue( QLineEdit *lineEdit, double value ); + double lineEditValue( const QLineEdit *lineEdit ) const; void resetClassifyButton(); QgsRasterMinMaxWidget * mMinMaxWidget = nullptr; bool mDisableMinMaxWidgetRefresh; diff --git a/src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp b/src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp index 9270713300f..9ac89464a74 100644 --- a/src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp +++ b/src/gui/symbology-ng/qgsrulebasedrendererwidget.cpp @@ -1245,9 +1245,9 @@ void QgsRuleBasedRendererModel::finishedAddingRules() emit endInsertRows(); } -void QgsRuleBasedRendererModel::setFeatureCounts( const QHash& theCountMap ) +void QgsRuleBasedRendererModel::setFeatureCounts( const QHash& countMap ) { - mFeatureCountMap = theCountMap; + mFeatureCountMap = countMap; updateRule( QModelIndex() ); } diff --git a/src/gui/symbology-ng/qgsrulebasedrendererwidget.h b/src/gui/symbology-ng/qgsrulebasedrendererwidget.h index 433efdc61b2..83494868194 100644 --- a/src/gui/symbology-ng/qgsrulebasedrendererwidget.h +++ b/src/gui/symbology-ng/qgsrulebasedrendererwidget.h @@ -83,7 +83,7 @@ class GUI_EXPORT QgsRuleBasedRendererModel : public QAbstractItemModel void finishedAddingRules(); // call endInsertRows //! @note not available in python bindungs - void setFeatureCounts( const QHash &theCountMap ); + void setFeatureCounts( const QHash &countMap ); void clearFeatureCounts(); protected: diff --git a/src/plugins/compass/qgscompassplugin.cpp b/src/plugins/compass/qgscompassplugin.cpp index b5cc9b302f7..d8084e57f2b 100644 --- a/src/plugins/compass/qgscompassplugin.cpp +++ b/src/plugins/compass/qgscompassplugin.cpp @@ -166,19 +166,19 @@ void QgsCompassPlugin::setCurrentTheme( QString ) } } -QIcon QgsCompassPlugin::getThemeIcon( const QString &theName ) +QIcon QgsCompassPlugin::getThemeIcon( const QString &name ) { - if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + theName ) ) + if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + name ) ) { - return QIcon( QgsApplication::activeThemePath() + "/plugins" + theName ); + return QIcon( QgsApplication::activeThemePath() + "/plugins" + name ); } - else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + theName ) ) + else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + name ) ) { - return QIcon( QgsApplication::defaultThemePath() + "/plugins" + theName ); + return QIcon( QgsApplication::defaultThemePath() + "/plugins" + name ); } else { - return QIcon( ":/icons" + theName ); + return QIcon( ":/icons" + name ); } } @@ -256,7 +256,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/compass/qgscompassplugin.h b/src/plugins/compass/qgscompassplugin.h index 702c45a70a6..90c5a1ebd5b 100644 --- a/src/plugins/compass/qgscompassplugin.h +++ b/src/plugins/compass/qgscompassplugin.h @@ -77,8 +77,8 @@ class QgsCompassPlugin: public QObject, public QgisPlugin, private Ui::QgsCompas //! show the help document void help(); //! update the plugins theme when the app tells us its theme is changed - void setCurrentTheme( QString theThemeName ); - QIcon getThemeIcon( const QString &theThemeName ); + void setCurrentTheme( QString themeName ); + QIcon getThemeIcon( const QString &themeName ); void about(); private: diff --git a/src/plugins/compass/qgscompassplugingui.cpp b/src/plugins/compass/qgscompassplugingui.cpp index b9838bdc19a..03b517f9f1f 100644 --- a/src/plugins/compass/qgscompassplugingui.cpp +++ b/src/plugins/compass/qgscompassplugingui.cpp @@ -79,7 +79,7 @@ void QgsCompassPluginGui::handleAzimuth( const QVariant &azimuth, const QVariant } //Copied from QgsDecorationNorthArrowDialog adapted to be portable -void QgsCompassPluginGui::rotatePixmap( QLabel * pixmapLabel, QString myFileNameQString, int theRotationInt ) +void QgsCompassPluginGui::rotatePixmap( QLabel * pixmapLabel, QString myFileNameQString, int rotationInt ) { QPixmap myQPixmap; if ( myQPixmap.load( myFileNameQString ) ) @@ -98,11 +98,11 @@ void QgsCompassPluginGui::rotatePixmap( QLabel * pixmapLabel, QString myFileName //myQPainter.translate( (int)centerXDouble, (int)centerYDouble ); //rotate the canvas - myQPainter.rotate( theRotationInt ); + myQPainter.rotate( rotationInt ); //work out how to shift the image so that it appears in the center of the canvas //(x cos a + y sin a - x, -x sin a + y cos a - y) const double PI = 3.14159265358979323846; - double myRadiansDouble = ( PI / 180 ) * theRotationInt; + double myRadiansDouble = ( PI / 180 ) * rotationInt; int xShift = static_cast(( ( centerXDouble * cos( myRadiansDouble ) ) + ( centerYDouble * sin( myRadiansDouble ) ) diff --git a/src/plugins/compass/qgscompassplugingui.h b/src/plugins/compass/qgscompassplugingui.h index cf8c1958372..6348413a658 100644 --- a/src/plugins/compass/qgscompassplugingui.h +++ b/src/plugins/compass/qgscompassplugingui.h @@ -47,7 +47,7 @@ class QgsCompassPluginGui : public QWidget, private Ui::QgsCompassPluginGuiBase // void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); } void handleVisibilityChanged( bool visible ); void handleAzimuth( const QVariant &azimuth, const QVariant &calibrationLevel ); - void rotatePixmap( QLabel *pixmapLabel, QString myFileNameQString, int theRotationInt ); + void rotatePixmap( QLabel *pixmapLabel, QString myFileNameQString, int rotationInt ); }; #endif diff --git a/src/plugins/coordinate_capture/coordinatecapture.cpp b/src/plugins/coordinate_capture/coordinatecapture.cpp index 7dced6fcfa2..5597d7d5f9d 100644 --- a/src/plugins/coordinate_capture/coordinatecapture.cpp +++ b/src/plugins/coordinate_capture/coordinatecapture.cpp @@ -65,7 +65,7 @@ static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; * an interface object that provides access to exposed functions in QGIS. * @param theQGisInterface - Pointer to the QGIS interface object */ -CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface ) +CoordinateCapture::CoordinateCapture( QgisInterface * qgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) , mpMapTool( nullptr ) , mpTrackMouseButton( nullptr ) @@ -74,7 +74,7 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface ) , mypCRSLabel( nullptr ) , mCanvasDisplayPrecision( 5 ) , mUserCrsDisplayPrecision( 5 ) - , mQGisIface( theQgisInterface ) + , mQGisIface( qgisInterface ) , mQActionPointer( nullptr ) { } @@ -200,31 +200,31 @@ void CoordinateCapture::setSourceCrs() mCanvasDisplayPrecision = ( mQGisIface->mapCanvas()->mapSettings().destinationCrs().mapUnits() == QgsUnitTypes::DistanceDegrees ) ? 5 : 3; // for the map canvas coordinate display } -void CoordinateCapture::mouseClicked( const QgsPoint& thePoint ) +void CoordinateCapture::mouseClicked( const QgsPoint& point ) { //clicking on the canvas will update the widgets and then disable //tracking so the user can copy the click point coords mpTrackMouseButton->setChecked( false ); - update( thePoint ); + update( point ); } -void CoordinateCapture::mouseMoved( const QgsPoint& thePoint ) +void CoordinateCapture::mouseMoved( const QgsPoint& point ) { //mouse movements will only update the widgets if the //tracking button is checked if ( mpTrackMouseButton->isChecked() ) { - update( thePoint ); + update( point ); } } -void CoordinateCapture::update( const QgsPoint& thePoint ) +void CoordinateCapture::update( const QgsPoint& point ) { //this is the coordinate resolved back to lat / lon - QgsPoint myUserCrsPoint = mTransform.transform( thePoint ); + QgsPoint myUserCrsPoint = mTransform.transform( point ); mpUserCrsEdit->setText( QString::number( myUserCrsPoint.x(), 'f', mUserCrsDisplayPrecision ) + ',' + QString::number( myUserCrsPoint.y(), 'f', mUserCrsDisplayPrecision ) ); // This is the coordinate space of the map canvas - mpCanvasEdit->setText( QString::number( thePoint.x(), 'f', mCanvasDisplayPrecision ) + ',' + - QString::number( thePoint.y(), 'f', mCanvasDisplayPrecision ) ); + mpCanvasEdit->setText( QString::number( point.x(), 'f', mCanvasDisplayPrecision ) + ',' + + QString::number( point.y(), 'f', mCanvasDisplayPrecision ) ); } void CoordinateCapture::copy() { @@ -279,9 +279,9 @@ void CoordinateCapture::unload() } // Set icons to the current theme -void CoordinateCapture::setCurrentTheme( const QString& theThemeName ) +void CoordinateCapture::setCurrentTheme( const QString& themeName ) { - Q_UNUSED( theThemeName ); + Q_UNUSED( themeName ); if ( mQActionPointer ) mQActionPointer->setIcon( QIcon( getIconPath( "coordinate_capture.png" ) ) ); if ( mpDockWidget ) @@ -294,11 +294,11 @@ void CoordinateCapture::setCurrentTheme( const QString& theThemeName ) } // Get path to the best available icon file -QString CoordinateCapture::getIconPath( const QString& theName ) +QString CoordinateCapture::getIconPath( const QString& name ) { - QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/coordinate_capture/" + theName; - QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/coordinate_capture/" + theName; - QString myQrcPath = ":/coordinate_capture/" + theName; + QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/coordinate_capture/" + name; + QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/coordinate_capture/" + name; + QString myQrcPath = ":/coordinate_capture/" + name; if ( QFile::exists( myCurThemePath ) ) { return myCurThemePath; @@ -335,9 +335,9 @@ QString CoordinateCapture::getIconPath( const QString& theName ) * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new CoordinateCapture( theQgisInterfacePointer ); + return new CoordinateCapture( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -376,7 +376,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/coordinate_capture/coordinatecapture.h b/src/plugins/coordinate_capture/coordinatecapture.h index 654c4ff3be3..a3f7b0d9af6 100644 --- a/src/plugins/coordinate_capture/coordinatecapture.h +++ b/src/plugins/coordinate_capture/coordinatecapture.h @@ -25,7 +25,7 @@ * * Additional useful conventions: * - * theVariableName - a method parameter (prefix with 'the') + * variableName - a method parameter (prefix with 'the') * myVariableName - a locally declared variable within a method ('my' prefix) * * DO: Use mixed case variable names - myVariableName @@ -77,9 +77,9 @@ class CoordinateCapture: public QObject, public QgisPlugin /** * Constructor for a plugin. The QgisInterface pointer is passed by * QGIS when it attempts to instantiate the plugin. - * @param theInterface Pointer to the QgisInterface object. + * @param interface Pointer to the QgisInterface object. */ - explicit CoordinateCapture( QgisInterface * theInterface ); + explicit CoordinateCapture( QgisInterface * interface ); virtual ~CoordinateCapture(); @@ -97,19 +97,19 @@ class CoordinateCapture: public QObject, public QgisPlugin //! Set the Coordinate Reference System used for displaying non canvas CRS coord void setCRS(); //! Called when mouse clicks on the canvas. Will populate text box with coords. - void mouseClicked( const QgsPoint& thePoint ); + void mouseClicked( const QgsPoint& point ); /** Called when mouse moved over the canvas. If the tracking button is toggled, * the text box coords will be updated. */ - void mouseMoved( const QgsPoint& thePoint ); + void mouseMoved( const QgsPoint& point ); //! Called when mouse is clicked on the canvas - void update( const QgsPoint& thePoint ); + void update( const QgsPoint& point ); //! Called when user clicks the copy button void copy(); //! called when the project's CRS is changed void setSourceCrs(); //! update the plugins theme when the app tells us its theme is changed - void setCurrentTheme( const QString& theThemeName ); + void setCurrentTheme( const QString& themeName ); private: //! Container for the coordinate info @@ -147,7 +147,7 @@ class CoordinateCapture: public QObject, public QgisPlugin int mUserCrsDisplayPrecision; //! Get the path to the icon from the best available theme - QString getIconPath( const QString& theName ); + QString getIconPath( const QString& name ); //////////////////////////////////////////////////////////////////// // diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp index 897583341e7..f0ebaa36852 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp @@ -46,7 +46,7 @@ * @param parent - Pointer the to parent QWidget for modality * @param fl - Windown flags */ -eVisDatabaseConnectionGui::eVisDatabaseConnectionGui( QList* theTemporaryFileList, QWidget* parent, Qt::WindowFlags fl ) +eVisDatabaseConnectionGui::eVisDatabaseConnectionGui( QList* temporaryFileList, QWidget* parent, Qt::WindowFlags fl ) : QDialog( parent, fl ) { setupUi( this ); @@ -54,7 +54,7 @@ eVisDatabaseConnectionGui::eVisDatabaseConnectionGui( QList* th QSettings settings; restoreGeometry( settings.value( QStringLiteral( "/eVis/db-geometry" ) ).toByteArray() ); - mTempOutputFileList = theTemporaryFileList; + mTempOutputFileList = temporaryFileList; //Initialize variables mQueryDefinitionMap = new QMap; diff --git a/src/plugins/evis/eventbrowser/evisconfiguration.cpp b/src/plugins/evis/eventbrowser/evisconfiguration.cpp index e3c99fc07d0..327422af069 100644 --- a/src/plugins/evis/eventbrowser/evisconfiguration.cpp +++ b/src/plugins/evis/eventbrowser/evisconfiguration.cpp @@ -105,20 +105,20 @@ bool eVisConfiguration::isUseOnlyFilenameSet() return mUseOnlyFilename; } -void eVisConfiguration::setApplyPathRulesToDocs( bool theBool ) +void eVisConfiguration::setApplyPathRulesToDocs( bool pathRules ) { - mApplyPathRulesToDocs = theBool; + mApplyPathRulesToDocs = pathRules; } -void eVisConfiguration::setAttributeCompassOffset( bool theBool ) +void eVisConfiguration::setAttributeCompassOffset( bool compassOffset ) { - mAttributeCompassOffset = theBool; + mAttributeCompassOffset = compassOffset; } -void eVisConfiguration::setBasePath( const QString& thePath ) +void eVisConfiguration::setBasePath( const QString& path ) { QSettings myQSettings; - mBasePath = thePath; + mBasePath = path; if ( "" != mBasePath ) { if ( mBasePath.contains( '/' ) ) @@ -138,42 +138,42 @@ void eVisConfiguration::setBasePath( const QString& thePath ) } } -void eVisConfiguration::setCompassBearingField( const QString& theField ) +void eVisConfiguration::setCompassBearingField( const QString& field ) { - mCompassBearingField = theField; + mCompassBearingField = field; } -void eVisConfiguration::setCompassOffset( double theOffset ) +void eVisConfiguration::setCompassOffset( double offset ) { - mCompassOffset = theOffset; + mCompassOffset = offset; } -void eVisConfiguration::setCompassOffsetField( const QString& theField ) +void eVisConfiguration::setCompassOffsetField( const QString& field ) { - mCompassOffsetField = theField; + mCompassOffsetField = field; } -void eVisConfiguration::setDisplayCompassBearing( bool theBool ) +void eVisConfiguration::setDisplayCompassBearing( bool compassBearing ) { - mDisplayCompassBearing = theBool; + mDisplayCompassBearing = compassBearing; } -void eVisConfiguration::setEventImagePathField( const QString& theField ) +void eVisConfiguration::setEventImagePathField( const QString& field ) { - mEventImagePathField = theField; + mEventImagePathField = field; } -void eVisConfiguration::setEventImagePathRelative( bool theBool ) +void eVisConfiguration::setEventImagePathRelative( bool pathRelative ) { - mEventImagePathRelative = theBool; + mEventImagePathRelative = pathRelative; } -void eVisConfiguration::setManualCompassOffset( bool theBool ) +void eVisConfiguration::setManualCompassOffset( bool manualOffset ) { - mManualCompassOffset = theBool; + mManualCompassOffset = manualOffset; } -void eVisConfiguration::setUseOnlyFilename( bool theBool ) +void eVisConfiguration::setUseOnlyFilename( bool useOnlyFileName ) { - mUseOnlyFilename = theBool; + mUseOnlyFilename = useOnlyFileName; } diff --git a/src/plugins/evis/eventbrowser/evisconfiguration.h b/src/plugins/evis/eventbrowser/evisconfiguration.h index 8b379837300..92dc650dd3d 100644 --- a/src/plugins/evis/eventbrowser/evisconfiguration.h +++ b/src/plugins/evis/eventbrowser/evisconfiguration.h @@ -55,17 +55,17 @@ class eVisConfiguration bool isManualCompassOffsetSet(); bool isUseOnlyFilenameSet(); - void setApplyPathRulesToDocs( bool ); - void setAttributeCompassOffset( bool ); + void setApplyPathRulesToDocs( bool pathRules ); + void setAttributeCompassOffset( bool compassOffset ); void setBasePath( const QString& ); void setCompassBearingField( const QString& ); void setCompassOffset( double ); void setCompassOffsetField( const QString& ); - void setDisplayCompassBearing( bool ); + void setDisplayCompassBearing( bool compassBearing ); void setEventImagePathField( const QString& ); - void setEventImagePathRelative( bool ); - void setManualCompassOffset( bool ); - void setUseOnlyFilename( bool ); + void setEventImagePathRelative( bool pathRelative ); + void setManualCompassOffset( bool manualOffset ); + void setUseOnlyFilename( bool useOnlyFileName ); private: diff --git a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp index c86eae456e9..56809ca5ad9 100644 --- a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp +++ b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp @@ -713,24 +713,24 @@ void eVisGenericEventBrowserGui::setBasePathToDataSource() /** * Slot called when a column is clicked in the tree displaying the attribute data - * @param theItem - The tree widget item click - * @param theColumn - The column that was clicked + * @param item - The tree widget item click + * @param column - The column that was clicked */ -void eVisGenericEventBrowserGui::launchExternalApplication( QTreeWidgetItem * theItem, int theColumn ) +void eVisGenericEventBrowserGui::launchExternalApplication( QTreeWidgetItem * item, int column ) { // At this point there is only attribute data with no children, ignore clicks on field name - if ( 1 == theColumn ) + if ( 1 == column ) { int myIterator = 0; bool startsWithExtension = false; while ( myIterator < tableFileTypeAssociations->rowCount() ) { - if ( theItem->text( theColumn ).startsWith( tableFileTypeAssociations->item( myIterator, 0 )->text() + ':', Qt::CaseInsensitive ) ) + if ( item->text( column ).startsWith( tableFileTypeAssociations->item( myIterator, 0 )->text() + ':', Qt::CaseInsensitive ) ) { startsWithExtension = true; break; } - else if ( theItem->text( theColumn ).endsWith( tableFileTypeAssociations->item( myIterator, 0 )->text(), Qt::CaseInsensitive ) ) + else if ( item->text( column ).endsWith( tableFileTypeAssociations->item( myIterator, 0 )->text(), Qt::CaseInsensitive ) ) { startsWithExtension = false; break; @@ -743,10 +743,10 @@ void eVisGenericEventBrowserGui::launchExternalApplication( QTreeWidgetItem * th { QProcess *myProcess = new QProcess(); QString myApplication = tableFileTypeAssociations->item( myIterator, 1 )->text(); - QString myDocument = theItem->text( theColumn ); + QString myDocument = item->text( column ); if ( startsWithExtension ) { - myDocument = theItem->text( theColumn ).remove( tableFileTypeAssociations->item( myIterator, 0 )->text() + ':', Qt::CaseInsensitive ); + myDocument = item->text( column ).remove( tableFileTypeAssociations->item( myIterator, 0 )->text() + ':', Qt::CaseInsensitive ); } if ( "" != myApplication ) @@ -784,7 +784,7 @@ void eVisGenericEventBrowserGui::launchExternalApplication( QTreeWidgetItem * th } else { - QMessageBox::information( this, tr( "Attribute Contents" ), theItem->text( theColumn ) ); + QMessageBox::information( this, tr( "Attribute Contents" ), item->text( column ) ); } } } @@ -793,13 +793,13 @@ void eVisGenericEventBrowserGui::launchExternalApplication( QTreeWidgetItem * th * Slot called when the restore or save button is click on the options panel * @param state - The new state of the checkbox */ -void eVisGenericEventBrowserGui::on_buttonboxOptions_clicked( QAbstractButton* theButton ) +void eVisGenericEventBrowserGui::on_buttonboxOptions_clicked( QAbstractButton* button ) { - if ( QDialogButtonBox::ResetRole == buttonboxOptions->buttonRole( theButton ) ) + if ( QDialogButtonBox::ResetRole == buttonboxOptions->buttonRole( button ) ) { restoreDefaultOptions(); } - else if ( QDialogButtonBox::AcceptRole == buttonboxOptions->buttonRole( theButton ) ) + else if ( QDialogButtonBox::AcceptRole == buttonboxOptions->buttonRole( button ) ) { accept(); } @@ -807,21 +807,21 @@ void eVisGenericEventBrowserGui::on_buttonboxOptions_clicked( QAbstractButton* t /** * Slot called when the state changes for the chkboxApplyPathRulesToDocs check box. - * @param theState - The new state of the checkbox + * @param state - The new state of the checkbox */ -void eVisGenericEventBrowserGui::on_chkboxApplyPathRulesToDocs_stateChanged( int theState ) +void eVisGenericEventBrowserGui::on_chkboxApplyPathRulesToDocs_stateChanged( int state ) { - Q_UNUSED( theState ); + Q_UNUSED( state ); mConfiguration.setApplyPathRulesToDocs( chkboxApplyPathRulesToDocs->isChecked() ); } /** * Slot called when the index changes for the cboxEventImagePathField combo box. - * @param theIndex - The index of the new selected item + * @param index - The index of the new selected item */ -void eVisGenericEventBrowserGui::on_cboxEventImagePathField_currentIndexChanged( int theIndex ) +void eVisGenericEventBrowserGui::on_cboxEventImagePathField_currentIndexChanged( int index ) { - Q_UNUSED( theIndex ); + Q_UNUSED( index ); if ( !mIgnoreEvent ) { mConfiguration.setEventImagePathField( cboxEventImagePathField->currentText() ); @@ -845,11 +845,11 @@ void eVisGenericEventBrowserGui::on_cboxEventImagePathField_currentIndexChanged( /** * Slot called when the index changes for the cboxCompassBearingField combo box. - * @param theIndex - The index of the new selected item + * @param index - The index of the new selected item */ -void eVisGenericEventBrowserGui::on_cboxCompassBearingField_currentIndexChanged( int theIndex ) +void eVisGenericEventBrowserGui::on_cboxCompassBearingField_currentIndexChanged( int index ) { - Q_UNUSED( theIndex ); + Q_UNUSED( index ); if ( !mIgnoreEvent ) { mConfiguration.setCompassBearingField( cboxCompassBearingField->currentText() ); @@ -873,11 +873,11 @@ void eVisGenericEventBrowserGui::on_cboxCompassBearingField_currentIndexChanged( /** * Slot called when the index changes for the cboxCompassBearingField combo box. - * @param theIndex - The index of the new selected item + * @param index - The index of the new selected item */ -void eVisGenericEventBrowserGui::on_cboxCompassOffsetField_currentIndexChanged( int theIndex ) +void eVisGenericEventBrowserGui::on_cboxCompassOffsetField_currentIndexChanged( int index ) { - Q_UNUSED( theIndex ); + Q_UNUSED( index ); if ( !mIgnoreEvent ) { mConfiguration.setCompassOffsetField( cboxCompassOffsetField->currentText() ); @@ -901,22 +901,22 @@ void eVisGenericEventBrowserGui::on_cboxCompassOffsetField_currentIndexChanged( /** * Slot called when the chkDisplayCompassBearing radio button is toggled - * @param theState - The current selection state of the radio button + * @param state - The current selection state of the radio button */ -void eVisGenericEventBrowserGui::on_chkboxDisplayCompassBearing_stateChanged( int theState ) +void eVisGenericEventBrowserGui::on_chkboxDisplayCompassBearing_stateChanged( int state ) { - Q_UNUSED( theState ); + Q_UNUSED( state ); mConfiguration.setDisplayCompassBearing( chkboxDisplayCompassBearing->isChecked() ); cboxCompassBearingField->setEnabled( chkboxDisplayCompassBearing->isChecked() ); } /** * Slot called when the state changes for the chkboxEventImagePathRelative check box. - * @param theState - The new state of the checkbox + * @param state - The new state of the checkbox */ -void eVisGenericEventBrowserGui::on_chkboxEventImagePathRelative_stateChanged( int theState ) +void eVisGenericEventBrowserGui::on_chkboxEventImagePathRelative_stateChanged( int state ) { - Q_UNUSED( theState ); + Q_UNUSED( state ); mConfiguration.setEventImagePathRelative( chkboxEventImagePathRelative->isChecked() ); if ( chkboxEventImagePathRelative->isChecked() && "" == leBasePath->text() ) @@ -928,22 +928,22 @@ void eVisGenericEventBrowserGui::on_chkboxEventImagePathRelative_stateChanged( i /** * Slot called when the state changes for the chkboxUseOnlyFilename check box. - * @param theState - The new state of the checkbox + * @param state - The new state of the checkbox */ -void eVisGenericEventBrowserGui::on_chkboxUseOnlyFilename_stateChanged( int theState ) +void eVisGenericEventBrowserGui::on_chkboxUseOnlyFilename_stateChanged( int state ) { - Q_UNUSED( theState ); + Q_UNUSED( state ); mConfiguration.setUseOnlyFilename( chkboxUseOnlyFilename->isChecked() ); } /** * Slot called when the tabs in the tabWidget are selected - * @param theCurrentTabIndex - The index of the currently selected tab + * @param currentTabIndex - The index of the currently selected tab */ -void eVisGenericEventBrowserGui::on_displayArea_currentChanged( int theCurrentTabIndex ) +void eVisGenericEventBrowserGui::on_displayArea_currentChanged( int currentTabIndex ) { //Force redraw when we switching back to the Display tab - if ( 0 == theCurrentTabIndex ) + if ( 0 == currentTabIndex ) { loadRecord(); } @@ -951,20 +951,20 @@ void eVisGenericEventBrowserGui::on_displayArea_currentChanged( int theCurrentTa /** * Slot called when a manual compass offset is entered - * @param theValue - The new compass offset + * @param value - The new compass offset */ -void eVisGenericEventBrowserGui::on_dsboxCompassOffset_valueChanged( double theValue ) +void eVisGenericEventBrowserGui::on_dsboxCompassOffset_valueChanged( double value ) { - mConfiguration.setCompassOffset( theValue ); + mConfiguration.setCompassOffset( value ); } /** * Slot called the text in leBasePath is set or changed - * @param theText - The new base path + * @param text - The new base path */ -void eVisGenericEventBrowserGui::on_leBasePath_textChanged( const QString& theText ) +void eVisGenericEventBrowserGui::on_leBasePath_textChanged( const QString& text ) { - mConfiguration.setBasePath( theText ); + mConfiguration.setBasePath( text ); } /** @@ -1074,28 +1074,28 @@ void eVisGenericEventBrowserGui::on_pbtnResetUseOnlyFilenameData_clicked() chkboxUseOnlyFilename->setChecked( false ); } -void eVisGenericEventBrowserGui::on_rbtnManualCompassOffset_toggled( bool theState ) +void eVisGenericEventBrowserGui::on_rbtnManualCompassOffset_toggled( bool state ) { - mConfiguration.setManualCompassOffset( theState ); - mConfiguration.setAttributeCompassOffset( !theState ); + mConfiguration.setManualCompassOffset( state ); + mConfiguration.setAttributeCompassOffset( !state ); - dsboxCompassOffset->setEnabled( theState ); - cboxCompassOffsetField->setEnabled( !theState ); + dsboxCompassOffset->setEnabled( state ); + cboxCompassOffsetField->setEnabled( !state ); } /** * Slot called when an entry in the file associations table is clicked - * @param theRow - the row that was clicked - * @param theColumn - the column that was clicked + * @param row - the row that was clicked + * @param column - the column that was clicked */ -void eVisGenericEventBrowserGui::on_tableFileTypeAssociations_cellDoubleClicked( int theRow, int theColumn ) +void eVisGenericEventBrowserGui::on_tableFileTypeAssociations_cellDoubleClicked( int row, int column ) { - if ( 1 == theColumn ) + if ( 1 == column ) { QString myApplication = QFileDialog::getOpenFileName( this, tr( "Select Application" ), QDir::homePath(), tr( "All ( * )" ) ); if ( "" != myApplication ) { - tableFileTypeAssociations->setItem( theRow, theColumn, new QTableWidgetItem( myApplication ) ); + tableFileTypeAssociations->setItem( row, column, new QTableWidgetItem( myApplication ) ); } } @@ -1103,9 +1103,9 @@ void eVisGenericEventBrowserGui::on_tableFileTypeAssociations_cellDoubleClicked( /** * This slot is coonnected to the map canvas. When the canvas is done drawing the slot is fired to display thee highlighting symbol - * @param thePainter - Pointer to the QPainter object + * @param painter - Pointer to the QPainter object */ -void eVisGenericEventBrowserGui::renderSymbol( QPainter* thePainter ) +void eVisGenericEventBrowserGui::renderSymbol( QPainter* painter ) { if ( !mFeatureIds.isEmpty() && mVectorLayer ) @@ -1158,13 +1158,13 @@ void eVisGenericEventBrowserGui::renderSymbol( QPainter* thePainter ) int xShift = ( int )myPoint.x() - ( myTempPixmap.width() / 2 ); int yShift = ( int )myPoint.y() - ( myTempPixmap.height() / 2 ); - thePainter->drawPixmap( xShift, yShift, myTempPixmap ); + painter->drawPixmap( xShift, yShift, myTempPixmap ); } else { int xShift = ( int )myPoint.x() - ( mHighlightSymbol.width() / 2 ); int yShift = ( int )myPoint.y() - ( mHighlightSymbol.height() / 2 ); - thePainter->drawPixmap( xShift, yShift, mHighlightSymbol ); + painter->drawPixmap( xShift, yShift, mHighlightSymbol ); } } } diff --git a/src/plugins/evis/evis.cpp b/src/plugins/evis/evis.cpp index c76f241d92d..c9d40b55cba 100644 --- a/src/plugins/evis/evis.cpp +++ b/src/plugins/evis/evis.cpp @@ -82,9 +82,9 @@ static const QString sIcon = QStringLiteral( ":/evis/eVisEventBrowser.png" ); -eVis::eVis( QgisInterface * theQgisInterface ) +eVis::eVis( QgisInterface * qgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) - , mQGisIface( theQgisInterface ) + , mQGisIface( qgisInterface ) , mDatabaseConnectionActionPointer( nullptr ) , mEventIdToolActionPointer( nullptr ) , mEventBrowserActionPointer( nullptr ) @@ -193,9 +193,9 @@ void eVis::unload() } } -void eVis::drawVectorLayer( const QString& thePathNameQString, const QString& theBaseNameQString, const QString& theProviderQString ) +void eVis::drawVectorLayer( const QString& pathNameQString, const QString& baseNameQString, const QString& providerQString ) { - mQGisIface->addVectorLayer( thePathNameQString, theBaseNameQString, theProviderQString ); + mQGisIface->addVectorLayer( pathNameQString, baseNameQString, providerQString ); } @@ -215,9 +215,9 @@ void eVis::drawVectorLayer( const QString& thePathNameQString, const QString& th * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new eVis( theQgisInterfacePointer ); + return new eVis( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -257,7 +257,7 @@ QGISEXTERN QString version() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/evis/evis.h b/src/plugins/evis/evis.h index 0bd9658bfaf..75ee57fdd2a 100644 --- a/src/plugins/evis/evis.h +++ b/src/plugins/evis/evis.h @@ -56,7 +56,7 @@ * * Additional useful conventions: * - * theVariableName - a method parameter ( prefix with 'the' ) + * variableName - a method parameter ( prefix with 'the' ) * myVariableName - a locally declared variable within a method ( 'my' prefix ) * * DO: Use mixed case variable names - myVariableName @@ -92,7 +92,7 @@ class eVis: public QObject, public QgisPlugin public: //! Constructor - explicit eVis( QgisInterface * theInterface ); + explicit eVis( QgisInterface * interface ); ~eVis(); diff --git a/src/plugins/evis/idtool/eviseventidtool.cpp b/src/plugins/evis/idtool/eviseventidtool.cpp index 5a5623bea02..7facda188e2 100644 --- a/src/plugins/evis/idtool/eviseventidtool.cpp +++ b/src/plugins/evis/idtool/eviseventidtool.cpp @@ -39,10 +39,10 @@ /** * Constructor for the id style tool, this tool inherits the QgsMapTool and requires a pointer to * to the map canvas. -* @param theCanvas - Pointer to the QGIS map canvas +* @param canvas - Pointer to the QGIS map canvas */ -eVisEventIdTool::eVisEventIdTool( QgsMapCanvas* theCanvas ) - : QgsMapTool( theCanvas ) +eVisEventIdTool::eVisEventIdTool( QgsMapCanvas* canvas ) + : QgsMapTool( canvas ) , mBrowser( nullptr ) { //set cursor @@ -58,11 +58,11 @@ eVisEventIdTool::eVisEventIdTool( QgsMapCanvas* theCanvas ) /** * Mouse release, i.e., select, event -* @param theMouseEvent - Pointer to a QMouseEvent +* @param mouseEvent - Pointer to a QMouseEvent */ -void eVisEventIdTool::canvasReleaseEvent( QgsMapMouseEvent* theMouseEvent ) +void eVisEventIdTool::canvasReleaseEvent( QgsMapMouseEvent* mouseEvent ) { - if ( !mCanvas || !theMouseEvent ) + if ( !mCanvas || !mouseEvent ) return; //Check to see if there is a layer selected @@ -71,7 +71,7 @@ void eVisEventIdTool::canvasReleaseEvent( QgsMapMouseEvent* theMouseEvent ) //Check to see if the current layer is a vector layer if ( QgsMapLayer::VectorLayer == mCanvas->currentLayer()->type() ) { - select( mCanvas->getCoordinateTransform()->toMapCoordinates( theMouseEvent->x(), theMouseEvent->y() ) ); + select( mCanvas->getCoordinateTransform()->toMapCoordinates( mouseEvent->x(), mouseEvent->y() ) ); } else { @@ -86,9 +86,9 @@ void eVisEventIdTool::canvasReleaseEvent( QgsMapMouseEvent* theMouseEvent ) /** * Selection routine called by the mouse release event -* @param thePoint = QgsPoint representing the x, y coordinates of the mouse release event +* @param point = QgsPoint representing the x, y coordinates of the mouse release event */ -void eVisEventIdTool::select( const QgsPoint& thePoint ) +void eVisEventIdTool::select( const QgsPoint& point ) { if ( !mCanvas ) @@ -100,10 +100,10 @@ void eVisEventIdTool::select( const QgsPoint& thePoint ) double searchWidth = QgsMapTool::searchRadiusMU( mCanvas ); QgsRectangle myRectangle; - myRectangle.setXMinimum( thePoint.x() - searchWidth ); - myRectangle.setXMaximum( thePoint.x() + searchWidth ); - myRectangle.setYMinimum( thePoint.y() - searchWidth ); - myRectangle.setYMaximum( thePoint.y() + searchWidth ); + myRectangle.setXMinimum( point.x() - searchWidth ); + myRectangle.setXMaximum( point.x() + searchWidth ); + myRectangle.setYMinimum( point.y() - searchWidth ); + myRectangle.setYMaximum( point.y() + searchWidth ); //Transform rectangle to map coordinates myRectangle = toLayerCoordinates( myLayer, myRectangle ); diff --git a/src/plugins/geometry_checker/qgsgeometrycheckerplugin.cpp b/src/plugins/geometry_checker/qgsgeometrycheckerplugin.cpp index dfef10665e3..e90ce0f6e1a 100644 --- a/src/plugins/geometry_checker/qgsgeometrycheckerplugin.cpp +++ b/src/plugins/geometry_checker/qgsgeometrycheckerplugin.cpp @@ -63,9 +63,9 @@ void QgsGeometryCheckerPlugin::unload() * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new QgsGeometryCheckerPlugin( theQgisInterfacePointer ); + return new QgsGeometryCheckerPlugin( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -104,7 +104,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/georeferencer/qgsgcplistmodel.cpp b/src/plugins/georeferencer/qgsgcplistmodel.cpp index 6cf1bc63922..20e8b699a62 100644 --- a/src/plugins/georeferencer/qgsgcplistmodel.cpp +++ b/src/plugins/georeferencer/qgsgcplistmodel.cpp @@ -65,9 +65,9 @@ void QgsGCPListModel::setGCPList( QgsGCPList *theGCPList ) } // ------------------------------- public ---------------------------------- // -void QgsGCPListModel::setGeorefTransform( QgsGeorefTransform *theGeorefTransform ) +void QgsGCPListModel::setGeorefTransform( QgsGeorefTransform *georefTransform ) { - mGeorefTransform = theGeorefTransform; + mGeorefTransform = georefTransform; updateModel(); } diff --git a/src/plugins/georeferencer/qgsgcplistmodel.h b/src/plugins/georeferencer/qgsgcplistmodel.h index 10c27377741..435527698d7 100644 --- a/src/plugins/georeferencer/qgsgcplistmodel.h +++ b/src/plugins/georeferencer/qgsgcplistmodel.h @@ -31,7 +31,7 @@ class QgsGCPListModel : public QStandardItemModel explicit QgsGCPListModel( QObject *parent = nullptr ); void setGCPList( QgsGCPList *theGCPList ); - void setGeorefTransform( QgsGeorefTransform *theGeorefTransform ); + void setGeorefTransform( QgsGeorefTransform *georefTransform ); void updateModel(); public slots: diff --git a/src/plugins/georeferencer/qgsgcplistwidget.cpp b/src/plugins/georeferencer/qgsgcplistwidget.cpp index 8b30a800e83..2c797e92a59 100644 --- a/src/plugins/georeferencer/qgsgcplistwidget.cpp +++ b/src/plugins/georeferencer/qgsgcplistwidget.cpp @@ -83,9 +83,9 @@ void QgsGCPListWidget::setGCPList( QgsGCPList *theGCPList ) adjustTableContent(); } -void QgsGCPListWidget::setGeorefTransform( QgsGeorefTransform *theGeorefTransform ) +void QgsGCPListWidget::setGeorefTransform( QgsGeorefTransform *georefTransform ) { - mGCPListModel->setGeorefTransform( theGeorefTransform ); + mGCPListModel->setGeorefTransform( georefTransform ); adjustTableContent(); } diff --git a/src/plugins/georeferencer/qgsgcplistwidget.h b/src/plugins/georeferencer/qgsgcplistwidget.h index d9b897ca65b..2fd42da0722 100644 --- a/src/plugins/georeferencer/qgsgcplistwidget.h +++ b/src/plugins/georeferencer/qgsgcplistwidget.h @@ -35,7 +35,7 @@ class QgsGCPListWidget : public QTableView explicit QgsGCPListWidget( QWidget *parent = nullptr ); void setGCPList( QgsGCPList *theGCPList ); - void setGeorefTransform( QgsGeorefTransform *theGeorefTransform ); + void setGeorefTransform( QgsGeorefTransform *georefTransform ); QgsGCPList *gcpList() { return mGCPList; } void updateGCPList(); void closeEditors(); diff --git a/src/plugins/georeferencer/qgsgeorefplugin.cpp b/src/plugins/georeferencer/qgsgeorefplugin.cpp index 7d440ecc2d9..59ae9659e05 100644 --- a/src/plugins/georeferencer/qgsgeorefplugin.cpp +++ b/src/plugins/georeferencer/qgsgeorefplugin.cpp @@ -29,7 +29,7 @@ * * Additional useful conventions: * - * theVariableName - a method parameter (prefix with 'the') + * variableName - a method parameter (prefix with 'the') * myVariableName - a locally declared variable within a method ('my' prefix) * * DO: Use mixed case variable names - myVariableName @@ -78,9 +78,9 @@ static const QString sPluginIcon = QStringLiteral( ":/icons/default/mGeorefRun.p * @param theQGisApp - Pointer to the QGIS main window * @param theQGisInterface - Pointer to the QGIS interface object */ -QgsGeorefPlugin::QgsGeorefPlugin( QgisInterface * theQgisInterface ) +QgsGeorefPlugin::QgsGeorefPlugin( QgisInterface * qgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) - , mQGisIface( theQgisInterface ) + , mQGisIface( qgisInterface ) , mActionRunGeoref( nullptr ) , mPluginGui( nullptr ) { @@ -142,19 +142,19 @@ void QgsGeorefPlugin::setCurrentTheme( const QString& ) mActionRunGeoref->setIcon( getThemeIcon( QStringLiteral( "/mGeorefRun.png" ) ) ); } -QIcon QgsGeorefPlugin::getThemeIcon( const QString &theName ) +QIcon QgsGeorefPlugin::getThemeIcon( const QString &name ) { - if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + theName ) ) + if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + name ) ) { - return QIcon( QgsApplication::activeThemePath() + "/plugins" + theName ); + return QIcon( QgsApplication::activeThemePath() + "/plugins" + name ); } - else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + theName ) ) + else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + name ) ) { - return QIcon( QgsApplication::defaultThemePath() + "/plugins" + theName ); + return QIcon( QgsApplication::defaultThemePath() + "/plugins" + name ); } else { - return QIcon( ":/icons/default" + theName ); + return QIcon( ":/icons/default" + name ); } } @@ -182,9 +182,9 @@ QIcon QgsGeorefPlugin::getThemeIcon( const QString &theName ) * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new QgsGeorefPlugin( theQgisInterfacePointer ); + return new QgsGeorefPlugin( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -223,7 +223,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/georeferencer/qgsgeorefplugin.h b/src/plugins/georeferencer/qgsgeorefplugin.h index 263b163f96f..d6d30af344b 100644 --- a/src/plugins/georeferencer/qgsgeorefplugin.h +++ b/src/plugins/georeferencer/qgsgeorefplugin.h @@ -29,7 +29,7 @@ * * Additional useful conventions: * - * theVariableName - a method parameter (prefix with 'the') + * variableName - a method parameter (prefix with 'the') * myVariableName - a locally declared variable within a method ('my' prefix) * * DO: Use mixed case variable names - myVariableName @@ -86,8 +86,8 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin //! unload the plugin void unload() override; //! update the plugins theme when the app tells us its theme is changed - void setCurrentTheme( const QString& theThemeName ); - QIcon getThemeIcon( const QString &theThemeName ); + void setCurrentTheme( const QString& themeName ); + QIcon getThemeIcon( const QString &themeName ); ////////////////////////////////////////////////////////////////////// // diff --git a/src/plugins/georeferencer/qgsgeorefplugingui.cpp b/src/plugins/georeferencer/qgsgeorefplugingui.cpp index e792e5135d1..9f4b9895c6e 100644 --- a/src/plugins/georeferencer/qgsgeorefplugingui.cpp +++ b/src/plugins/georeferencer/qgsgeorefplugingui.cpp @@ -72,11 +72,11 @@ QgsGeorefDockWidget::QgsGeorefDockWidget( const QString & title, QWidget * paren setObjectName( QStringLiteral( "GeorefDockWidget" ) ); // set object name so the position can be saved } -QgsGeorefPluginGui::QgsGeorefPluginGui( QgisInterface* theQgisInterface, QWidget* parent, Qt::WindowFlags fl ) +QgsGeorefPluginGui::QgsGeorefPluginGui( QgisInterface* qgisInterface, QWidget* parent, Qt::WindowFlags fl ) : QMainWindow( parent, fl ) , mMousePrecisionDecimalPlaces( 0 ) , mTransformParam( QgsGeorefTransform::InvalidTransform ) - , mIface( theQgisInterface ) + , mIface( qgisInterface ) , mLayer( nullptr ) , mAgainAddRaster( false ) , mMovingPoint( nullptr ) @@ -834,9 +834,9 @@ void QgsGeorefPluginGui::extentsChanged() } // Registry layer QGis -void QgsGeorefPluginGui::layerWillBeRemoved( const QString& theLayerId ) +void QgsGeorefPluginGui::layerWillBeRemoved( const QString& layerId ) { - mAgainAddRaster = mLayer && mLayer->id().compare( theLayerId ) == 0; + mAgainAddRaster = mLayer && mLayer->id().compare( layerId ) == 0; } // ------------------------------ private ---------------------------------- // @@ -2097,27 +2097,27 @@ QString QgsGeorefPluginGui::guessWorldFileName( const QString &rasterFileName ) // Note this code is duplicated from qgisapp.cpp because // I didn't want to make plugins on qgsapplication [TS] -QIcon QgsGeorefPluginGui::getThemeIcon( const QString &theName ) +QIcon QgsGeorefPluginGui::getThemeIcon( const QString &name ) { - if ( QFile::exists( QgsApplication::activeThemePath() + theName ) ) + if ( QFile::exists( QgsApplication::activeThemePath() + name ) ) { - return QIcon( QgsApplication::activeThemePath() + theName ); + return QIcon( QgsApplication::activeThemePath() + name ); } - else if ( QFile::exists( QgsApplication::defaultThemePath() + theName ) ) + else if ( QFile::exists( QgsApplication::defaultThemePath() + name ) ) { - return QIcon( QgsApplication::defaultThemePath() + theName ); + return QIcon( QgsApplication::defaultThemePath() + name ); } else { QSettings settings; - QString themePath = ":/icons/" + settings.value( QStringLiteral( "/Themes" ) ).toString() + theName; + QString themePath = ":/icons/" + settings.value( QStringLiteral( "/Themes" ) ).toString() + name; if ( QFile::exists( themePath ) ) { return QIcon( themePath ); } else { - return QIcon( ":/icons/default" + theName ); + return QIcon( ":/icons/default" + name ); } } } diff --git a/src/plugins/georeferencer/qgsgeorefplugingui.h b/src/plugins/georeferencer/qgsgeorefplugingui.h index 8f3b7712148..65ee1a50101 100644 --- a/src/plugins/georeferencer/qgsgeorefplugingui.h +++ b/src/plugins/georeferencer/qgsgeorefplugingui.h @@ -52,7 +52,7 @@ class QgsGeorefPluginGui : public QMainWindow, private Ui::QgsGeorefPluginGuiBas Q_OBJECT public: - QgsGeorefPluginGui( QgisInterface* theQgisInterface, QWidget* parent = nullptr, Qt::WindowFlags fl = 0 ); + QgsGeorefPluginGui( QgisInterface* qgisInterface, QWidget* parent = nullptr, Qt::WindowFlags fl = 0 ); ~QgsGeorefPluginGui(); protected: @@ -117,7 +117,7 @@ class QgsGeorefPluginGui : public QMainWindow, private Ui::QgsGeorefPluginGuiBas // when one Layer is removed - void layerWillBeRemoved( const QString& theLayerId ); + void layerWillBeRemoved( const QString& layerId ); void extentsChanged(); // Use for need add again Raster (case above) bool updateGeorefTransform(); @@ -180,7 +180,7 @@ class QgsGeorefPluginGui : public QMainWindow, private Ui::QgsGeorefPluginGuiBas QString convertResamplingEnumToString( QgsImageWarper::ResamplingMethod resampling ); int polynomialOrder( QgsGeorefTransform::TransformParametrisation transform ); QString guessWorldFileName( const QString &rasterFileName ); - QIcon getThemeIcon( const QString &theName ); + QIcon getThemeIcon( const QString &name ); bool checkFileExisting( const QString& fileName, const QString& title, const QString& question ); bool equalGCPlists( const QgsGCPList &list1, const QgsGCPList &list2 ); void logTransformOptions(); diff --git a/src/plugins/georeferencer/qgsimagewarper.cpp b/src/plugins/georeferencer/qgsimagewarper.cpp index 98b9870231d..e0d97a413b6 100644 --- a/src/plugins/georeferencer/qgsimagewarper.cpp +++ b/src/plugins/georeferencer/qgsimagewarper.cpp @@ -31,8 +31,8 @@ bool QgsImageWarper::sWarpCanceled = false; -QgsImageWarper::QgsImageWarper( QWidget *theParent ) - : mParent( theParent ) +QgsImageWarper::QgsImageWarper( QWidget *parent ) + : mParent( parent ) { } diff --git a/src/plugins/georeferencer/qgsimagewarper.h b/src/plugins/georeferencer/qgsimagewarper.h index 8bcc8fdd49d..2160c3c462a 100644 --- a/src/plugins/georeferencer/qgsimagewarper.h +++ b/src/plugins/georeferencer/qgsimagewarper.h @@ -32,7 +32,7 @@ class QgsImageWarper Q_DECLARE_TR_FUNCTIONS( QgsImageWarper ) public: - explicit QgsImageWarper( QWidget *theParent ); + explicit QgsImageWarper( QWidget *parent ); enum ResamplingMethod { diff --git a/src/plugins/georeferencer/qgstransformsettingsdialog.cpp b/src/plugins/georeferencer/qgstransformsettingsdialog.cpp index 40cd82e3ce3..df3e52ce8fd 100644 --- a/src/plugins/georeferencer/qgstransformsettingsdialog.cpp +++ b/src/plugins/georeferencer/qgstransformsettingsdialog.cpp @@ -298,27 +298,27 @@ QString QgsTransformSettingsDialog::generateModifiedRasterFileName( const QStrin // Note this code is duplicated from qgisapp.cpp because // I didn't want to make plugins on qgsapplication [TS] -QIcon QgsTransformSettingsDialog::getThemeIcon( const QString &theName ) +QIcon QgsTransformSettingsDialog::getThemeIcon( const QString &name ) { - if ( QFile::exists( QgsApplication::activeThemePath() + theName ) ) + if ( QFile::exists( QgsApplication::activeThemePath() + name ) ) { - return QIcon( QgsApplication::activeThemePath() + theName ); + return QIcon( QgsApplication::activeThemePath() + name ); } - else if ( QFile::exists( QgsApplication::defaultThemePath() + theName ) ) + else if ( QFile::exists( QgsApplication::defaultThemePath() + name ) ) { - return QIcon( QgsApplication::defaultThemePath() + theName ); + return QIcon( QgsApplication::defaultThemePath() + name ); } else { QSettings settings; - QString themePath = ":/icons/" + settings.value( QStringLiteral( "/Themes" ) ).toString() + theName; + QString themePath = ":/icons/" + settings.value( QStringLiteral( "/Themes" ) ).toString() + name; if ( QFile::exists( themePath ) ) { return QIcon( themePath ); } else { - return QIcon( ":/icons/default" + theName ); + return QIcon( ":/icons/default" + name ); } } } diff --git a/src/plugins/georeferencer/qgstransformsettingsdialog.h b/src/plugins/georeferencer/qgstransformsettingsdialog.h index 69762df62f4..98f406b10a3 100644 --- a/src/plugins/georeferencer/qgstransformsettingsdialog.h +++ b/src/plugins/georeferencer/qgstransformsettingsdialog.h @@ -47,7 +47,7 @@ class QgsTransformSettingsDialog : public QDialog, private Ui::QgsTransformSetti void on_tbnReportFile_clicked(); void on_cmbTransformType_currentIndexChanged( const QString& text ); void on_mWorldFileCheckBox_stateChanged( int state ); - QIcon getThemeIcon( const QString &theName ); + QIcon getThemeIcon( const QString &name ); private: bool checkGCPpoints( int count, int &minGCPpoints ); diff --git a/src/plugins/globe/globe_plugin.cpp b/src/plugins/globe/globe_plugin.cpp index de8ff55c368..2a7eb364fba 100644 --- a/src/plugins/globe/globe_plugin.cpp +++ b/src/plugins/globe/globe_plugin.cpp @@ -226,9 +226,9 @@ class NavigationControl : public osgEarth::Util::Controls::ImageControl }; -GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface ) +GlobePlugin::GlobePlugin( QgisInterface* qgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) - , mQGisIface( theQgisInterface ) + , mQGisIface( qgisInterface ) , mViewerWidget( 0 ) , mDockWidget( 0 ) , mSettingsDialog( 0 ) @@ -1201,9 +1201,9 @@ bool KeyboardControlHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GU * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new GlobePlugin( theQgisInterfacePointer ); + return new GlobePlugin( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -1249,7 +1249,7 @@ QGISEXTERN QString experimental() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/globe/globe_plugin.h b/src/plugins/globe/globe_plugin.h index ff1b289be17..406dbdcdedc 100644 --- a/src/plugins/globe/globe_plugin.h +++ b/src/plugins/globe/globe_plugin.h @@ -79,7 +79,7 @@ class GLOBE_EXPORT GlobePlugin : public QObject, public QgisPlugin Q_OBJECT public: - GlobePlugin( QgisInterface* theQgisInterface ); + GlobePlugin( QgisInterface* qgisInterface ); ~GlobePlugin(); //! init the gui diff --git a/src/plugins/gps_importer/qgsgpsplugin.cpp b/src/plugins/gps_importer/qgsgpsplugin.cpp index 2c04f1ccf8b..ea3aa36c54b 100644 --- a/src/plugins/gps_importer/qgsgpsplugin.cpp +++ b/src/plugins/gps_importer/qgsgpsplugin.cpp @@ -62,9 +62,9 @@ static const QString icon_ = QStringLiteral( ":/gps_importer.svg" ); * @param qgis Pointer to the QGIS main window * @param _qI Pointer to the QGIS interface object */ -QgsGPSPlugin::QgsGPSPlugin( QgisInterface * theQgisInterFace ) +QgsGPSPlugin::QgsGPSPlugin( QgisInterface * qgisInterFace ) : QgisPlugin( name_, description_, category_, version_, type_ ) - , mQGisInterface( theQgisInterFace ) + , mQGisInterface( qgisInterFace ) , mQActionPointer( nullptr ) , mCreateGPXAction( nullptr ) { @@ -201,12 +201,12 @@ void QgsGPSPlugin::createGPX() } } -void QgsGPSPlugin::drawVectorLayer( const QString& thePathNameQString, - const QString& theBaseNameQString, - const QString& theProviderQString ) +void QgsGPSPlugin::drawVectorLayer( const QString& pathNameQString, + const QString& baseNameQString, + const QString& providerQString ) { - mQGisInterface->addVectorLayer( thePathNameQString, theBaseNameQString, - theProviderQString ); + mQGisInterface->addVectorLayer( pathNameQString, baseNameQString, + providerQString ); } // Unload the plugin by cleaning up the GUI @@ -675,9 +675,9 @@ void QgsGPSPlugin::setupBabel() } //! Set icons to the current theme -void QgsGPSPlugin::setCurrentTheme( const QString& theThemeName ) +void QgsGPSPlugin::setCurrentTheme( const QString& themeName ) { - Q_UNUSED( theThemeName ); + Q_UNUSED( themeName ); QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/gps_importer/"; QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/gps_importer/"; QString myQrcPath = QStringLiteral( ":/" ); @@ -712,9 +712,9 @@ void QgsGPSPlugin::setCurrentTheme( const QString& theThemeName ) * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new QgsGPSPlugin( theQgisInterfacePointer ); + return new QgsGPSPlugin( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as @@ -754,7 +754,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/gps_importer/qgsgpsplugin.h b/src/plugins/gps_importer/qgsgpsplugin.h index ae7273ccbda..35059eb7be3 100644 --- a/src/plugins/gps_importer/qgsgpsplugin.h +++ b/src/plugins/gps_importer/qgsgpsplugin.h @@ -58,7 +58,7 @@ class QgsGPSPlugin: public QObject, public QgisPlugin //! show the help document void help(); //! update the plugins theme when the app tells us its theme is changed - void setCurrentTheme( const QString& theThemeName ); + void setCurrentTheme( const QString& themeName ); //! load a GPX file void loadGPXFile( const QString& fileName, bool loadWaypoints, bool loadRoutes, diff --git a/src/plugins/grass/qgsgrassmoduleinput.cpp b/src/plugins/grass/qgsgrassmoduleinput.cpp index 4391b07a5e2..7bd6059ab3e 100644 --- a/src/plugins/grass/qgsgrassmoduleinput.cpp +++ b/src/plugins/grass/qgsgrassmoduleinput.cpp @@ -197,7 +197,7 @@ void QgsGrassModuleInputModel::addMapset( const QString & mapset ) appendRow( mapsetItem ); } -void QgsGrassModuleInputModel::refreshMapset( QStandardItem *mapsetItem, const QString & mapset, const QList & theTypes ) +void QgsGrassModuleInputModel::refreshMapset( QStandardItem *mapsetItem, const QString & mapset, const QList & types ) { QgsDebugMsg( "mapset = " + mapset ); if ( !mapsetItem ) @@ -205,15 +205,15 @@ void QgsGrassModuleInputModel::refreshMapset( QStandardItem *mapsetItem, const Q return; } - QList types = theTypes; - if ( types.isEmpty() ) + QList typesCopy = types; + if ( typesCopy.isEmpty() ) { - types << QgsGrassObject::Raster << QgsGrassObject::Vector; + typesCopy << QgsGrassObject::Raster << QgsGrassObject::Vector; #if GRASS_VERSION_MAJOR >= 7 - types << QgsGrassObject::Strds << QgsGrassObject::Stvds << QgsGrassObject::Str3ds; + typesCopy << QgsGrassObject::Strds << QgsGrassObject::Stvds << QgsGrassObject::Str3ds; #endif } - Q_FOREACH ( QgsGrassObject::Type type, types ) + Q_FOREACH ( QgsGrassObject::Type type, typesCopy ) { QgsGrassObject mapsetObject( QgsGrass::getDefaultGisdbase(), QgsGrass::getDefaultLocation(), mapset, QLatin1String( "" ), QgsGrassObject::Mapset ); QStringList maps = QgsGrass::grassObjects( mapsetObject, type ); diff --git a/src/plugins/grass/qgsgrassmoduleinput.h b/src/plugins/grass/qgsgrassmoduleinput.h index 752270c9a77..89cf4cdc980 100644 --- a/src/plugins/grass/qgsgrassmoduleinput.h +++ b/src/plugins/grass/qgsgrassmoduleinput.h @@ -82,7 +82,7 @@ class QgsGrassModuleInputModel : public QStandardItemModel private: void addMapset( const QString & mapset ); - void refreshMapset( QStandardItem *mapsetItem, const QString & mapset, const QList & theTypes = QList() ); + void refreshMapset( QStandardItem *mapsetItem, const QString & mapset, const QList & types = QList() ); // Add to watched paths if exists and if not yet watched void watch( const QString & path ); QString mLocationPath; diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp index 3bc4a607618..6013b4b6d74 100644 --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -66,11 +66,11 @@ static const QString pluginIcon = QStringLiteral( ":/images/themes/default/grass * Constructor for the plugin. The plugin is passed a pointer to the main app * and an interface object that provides access to exposed functions in QGIS. * @param theQGisApp Pointer to the QGIS main window - * @param theQgisInterFace Pointer to the QGIS interface object + * @param qgisInterFace Pointer to the QGIS interface object */ -QgsGrassPlugin::QgsGrassPlugin( QgisInterface * theQgisInterFace ) +QgsGrassPlugin::QgsGrassPlugin( QgisInterface * qgisInterFace ) : mToolBarPointer( 0 ) - , qGisInterface( theQgisInterFace ) + , qGisInterface( qgisInterFace ) , mCanvas( 0 ) , mRegionAction( 0 ) , mRegionBand( 0 ) @@ -332,10 +332,10 @@ void QgsGrassPlugin::onGisbaseChanged() } } -void QgsGrassPlugin::onLayerWasAdded( QgsMapLayer* theMapLayer ) +void QgsGrassPlugin::onLayerWasAdded( QgsMapLayer* mapLayer ) { - QgsDebugMsg( "name = " + theMapLayer->name() ); - QgsVectorLayer *vectorLayer = qobject_cast( theMapLayer ); + QgsDebugMsg( "name = " + mapLayer->name() ); + QgsVectorLayer *vectorLayer = qobject_cast( mapLayer ); if ( !vectorLayer ) return; QgsGrassProvider* grassProvider = dynamic_cast( vectorLayer->dataProvider() ); @@ -880,9 +880,9 @@ void QgsGrassPlugin::unload() } // Set icons to the current theme -void QgsGrassPlugin::setCurrentTheme( QString theThemeName ) +void QgsGrassPlugin::setCurrentTheme( QString themeName ) { - Q_UNUSED( theThemeName ); + Q_UNUSED( themeName ); if ( mToolBarPointer ) { mOpenMapsetAction->setIcon( getThemeIcon( QStringLiteral( "grass_open_mapset.png" ) ) ); @@ -898,11 +898,11 @@ void QgsGrassPlugin::setCurrentTheme( QString theThemeName ) // I didn't want to make plugins dependent on qgsapplication // and because it needs grass specific path into // the GRASS plugin resource bundle [TS] -QIcon QgsGrassPlugin::getThemeIcon( const QString &theName ) +QIcon QgsGrassPlugin::getThemeIcon( const QString &name ) { - QString myCurThemePath = QgsApplication::activeThemePath() + "/grass/" + theName; - QString myDefThemePath = QgsApplication::defaultThemePath() + "/grass/" + theName; - QString myQrcPath = ":/default/grass/" + theName; + QString myCurThemePath = QgsApplication::activeThemePath() + "/grass/" + name; + QString myDefThemePath = QgsApplication::defaultThemePath() + "/grass/" + name; + QString myQrcPath = ":/default/grass/" + name; if ( QFile::exists( myCurThemePath ) ) { return QIcon( myCurThemePath ); @@ -938,9 +938,9 @@ void QgsGrassPlugin::setTransform() * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new QgsGrassPlugin( theQgisInterfacePointer ); + return new QgsGrassPlugin( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as @@ -980,7 +980,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/grass/qgsgrassplugin.h b/src/plugins/grass/qgsgrassplugin.h index 04d9608b57d..c9fff5ced4e 100644 --- a/src/plugins/grass/qgsgrassplugin.h +++ b/src/plugins/grass/qgsgrassplugin.h @@ -82,7 +82,7 @@ class QgsGrassPlugin : public QObject, public QgisPlugin virtual ~QgsGrassPlugin(); //! Get an icon from the active theme if possible - static QIcon getThemeIcon( const QString &theName ); + static QIcon getThemeIcon( const QString &name ); public slots: //! init the gui @@ -118,10 +118,10 @@ class QgsGrassPlugin : public QObject, public QgisPlugin //! New project void newProject(); //! update plugin icons when the app tells us its theme is changed - void setCurrentTheme( QString theThemeName ); + void setCurrentTheme( QString themeName ); void setTransform(); //! Called when a new layer was added to map registry - void onLayerWasAdded( QgsMapLayer* theMapLayer ); + void onLayerWasAdded( QgsMapLayer* mapLayer ); //! Called when editing of a layer started void onEditingStarted(); void onEditingStopped(); diff --git a/src/plugins/grass/qgsgrasstools.cpp b/src/plugins/grass/qgsgrasstools.cpp index 8e1d8ab5e69..444491dd1fd 100644 --- a/src/plugins/grass/qgsgrasstools.cpp +++ b/src/plugins/grass/qgsgrasstools.cpp @@ -647,11 +647,11 @@ void QgsGrassTools::closeTools() // // Helper function for Tim's experimental model list // -void QgsGrassTools::on_mFilterInput_textChanged( QString theText ) +void QgsGrassTools::on_mFilterInput_textChanged( QString text ) { - QgsDebugMsg( "GRASS modules filter changed to :" + theText ); - mTreeModelProxy->setFilter( theText ); - if ( theText.isEmpty() ) + QgsDebugMsg( "GRASS modules filter changed to :" + text ); + mTreeModelProxy->setFilter( text ); + if ( text.isEmpty() ) { mTreeView->collapseAll(); mTreeView->expandToDepth( 0 ); @@ -665,25 +665,25 @@ void QgsGrassTools::on_mFilterInput_textChanged( QString theText ) // there is a filter type switch in UI QRegExp::PatternSyntax mySyntax = QRegExp::PatternSyntax( QRegExp::Wildcard ); Qt::CaseSensitivity myCaseSensitivity = Qt::CaseInsensitive; - QRegExp myRegExp( theText, myCaseSensitivity, mySyntax ); + QRegExp myRegExp( text, myCaseSensitivity, mySyntax ); mModelProxy->setFilterRegExp( myRegExp ); } -void QgsGrassTools::itemClicked( const QModelIndex &theIndex ) +void QgsGrassTools::itemClicked( const QModelIndex &index ) { - if ( theIndex.column() == 0 ) + if ( index.column() == 0 ) { // // If the model has been filtered, the index row in the proxy won't match // the index row in the underlying model so we need to jump through this // little hoop to get the correct item // - const QSortFilterProxyModel *proxyModel = qobject_cast( theIndex.model() ); + const QSortFilterProxyModel *proxyModel = qobject_cast( index.model() ); if ( !proxyModel ) { return; } - QModelIndex index = proxyModel->mapToSource( theIndex ); + QModelIndex index = proxyModel->mapToSource( index ); QStandardItemModel *model = 0; if ( proxyModel == mTreeModelProxy ) diff --git a/src/plugins/grass/qgsgrasstools.h b/src/plugins/grass/qgsgrasstools.h index 3b98b407f63..53c07e96f99 100644 --- a/src/plugins/grass/qgsgrasstools.h +++ b/src/plugins/grass/qgsgrasstools.h @@ -92,9 +92,9 @@ class QgsGrassTools: public QgsDockWidget, public Ui::QgsGrassToolsBase void closeTools(); //! Update the regex used to filter the modules list (autoconnect to ui) - void on_mFilterInput_textChanged( QString theText ); + void on_mFilterInput_textChanged( QString text ); //! Run a module when its entry is clicked in the list view - void itemClicked( const QModelIndex &theIndex ); + void itemClicked( const QModelIndex &index ); //! Run a module given its module name e.g. r.in.gdal void runModule( QString name, bool direct ); void on_mDebugButton_clicked(); diff --git a/src/plugins/grass/qtermwidget/ColorScheme.cpp b/src/plugins/grass/qtermwidget/ColorScheme.cpp index 9b6c74c1f2f..46f49ab0031 100644 --- a/src/plugins/grass/qtermwidget/ColorScheme.cpp +++ b/src/plugins/grass/qtermwidget/ColorScheme.cpp @@ -778,11 +778,11 @@ const ColorScheme* ColorSchemeManager::findColorScheme(const QString& name) } } -ColorSchemeManager* ColorSchemeManager::theColorSchemeManager = 0; -//K_GLOBAL_STATIC( ColorSchemeManager , theColorSchemeManager ) +ColorSchemeManager* ColorSchemeManager::sColorSchemeManager = 0; +//K_GLOBAL_STATIC( ColorSchemeManager , colorSchemeManager ) ColorSchemeManager* ColorSchemeManager::instance() { - if (! theColorSchemeManager) - theColorSchemeManager = new ColorSchemeManager(); - return theColorSchemeManager; + if (! sColorSchemeManager) + sColorSchemeManager = new ColorSchemeManager(); + return sColorSchemeManager; } diff --git a/src/plugins/grass/qtermwidget/ColorScheme.h b/src/plugins/grass/qtermwidget/ColorScheme.h index 5f2b77ea524..dd9e89d2887 100644 --- a/src/plugins/grass/qtermwidget/ColorScheme.h +++ b/src/plugins/grass/qtermwidget/ColorScheme.h @@ -349,7 +349,7 @@ private: static const ColorScheme _defaultColorScheme; - static ColorSchemeManager * theColorSchemeManager; + static ColorSchemeManager * sColorSchemeManager; }; } diff --git a/src/plugins/grass/qtermwidget/KeyboardTranslator.cpp b/src/plugins/grass/qtermwidget/KeyboardTranslator.cpp index dfa35e093b2..74932860462 100644 --- a/src/plugins/grass/qtermwidget/KeyboardTranslator.cpp +++ b/src/plugins/grass/qtermwidget/KeyboardTranslator.cpp @@ -884,11 +884,11 @@ bool KeyboardTranslatorManager::deleteTranslator(const QString& name) return false; } } -//K_GLOBAL_STATIC( KeyboardTranslatorManager , theKeyboardTranslatorManager ) -KeyboardTranslatorManager* KeyboardTranslatorManager::theKeyboardTranslatorManager = 0; +//K_GLOBAL_STATIC( KeyboardTranslatorManager , keyboardTranslatorManager ) +KeyboardTranslatorManager* KeyboardTranslatorManager::sKeyboardTranslatorManager = 0; KeyboardTranslatorManager* KeyboardTranslatorManager::instance() { - if (! theKeyboardTranslatorManager) - theKeyboardTranslatorManager = new KeyboardTranslatorManager(); - return theKeyboardTranslatorManager; + if (! sKeyboardTranslatorManager ) + sKeyboardTranslatorManager = new KeyboardTranslatorManager(); + return sKeyboardTranslatorManager; } diff --git a/src/plugins/grass/qtermwidget/KeyboardTranslator.h b/src/plugins/grass/qtermwidget/KeyboardTranslator.h index 50462feccc0..2c0507bd3c2 100644 --- a/src/plugins/grass/qtermwidget/KeyboardTranslator.h +++ b/src/plugins/grass/qtermwidget/KeyboardTranslator.h @@ -508,7 +508,7 @@ private: // instance bool _haveLoadedAll; - static KeyboardTranslatorManager * theKeyboardTranslatorManager; + static KeyboardTranslatorManager * sKeyboardTranslatorManager; }; inline int KeyboardTranslator::Entry::keyCode() const { return _keyCode; } diff --git a/src/plugins/offline_editing/offline_editing_plugin.cpp b/src/plugins/offline_editing/offline_editing_plugin.cpp index 79d2623a477..f40c63ed284 100644 --- a/src/plugins/offline_editing/offline_editing_plugin.cpp +++ b/src/plugins/offline_editing/offline_editing_plugin.cpp @@ -35,9 +35,9 @@ static const QString sPluginVersion = QObject::tr( "Version 0.1" ); static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; static const QString sPluginIcon = QStringLiteral( ":/offline_editing/offline_editing_copy.png" ); -QgsOfflineEditingPlugin::QgsOfflineEditingPlugin( QgisInterface* theQgisInterface ) +QgsOfflineEditingPlugin::QgsOfflineEditingPlugin( QgisInterface* qgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) - , mQGisIface( theQgisInterface ) + , mQGisIface( qgisInterface ) , mActionConvertProject( nullptr ) , mActionSynchronize( nullptr ) , mOfflineEditing( nullptr ) @@ -214,9 +214,9 @@ void QgsOfflineEditingPlugin::hideProgress() * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new QgsOfflineEditingPlugin( theQgisInterfacePointer ); + return new QgsOfflineEditingPlugin( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as @@ -256,7 +256,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/offline_editing/offline_editing_plugin.h b/src/plugins/offline_editing/offline_editing_plugin.h index 03cdb25035c..58610d504ec 100644 --- a/src/plugins/offline_editing/offline_editing_plugin.h +++ b/src/plugins/offline_editing/offline_editing_plugin.h @@ -32,7 +32,7 @@ class QgsOfflineEditingPlugin : public QObject, public QgisPlugin Q_OBJECT public: - explicit QgsOfflineEditingPlugin( QgisInterface* theQgisInterface ); + explicit QgsOfflineEditingPlugin( QgisInterface* qgisInterface ); virtual ~QgsOfflineEditingPlugin(); public slots: diff --git a/src/plugins/plugin_template/plugin.cpp b/src/plugins/plugin_template/plugin.cpp index e27b37c0ed2..93b29ded97a 100644 --- a/src/plugins/plugin_template/plugin.cpp +++ b/src/plugins/plugin_template/plugin.cpp @@ -51,9 +51,9 @@ static const QString sPluginIcon = ":/[pluginlcasename]/[pluginlcasename].png"; * an interface object that provides access to exposed functions in QGIS. * @param theQGisInterface - Pointer to the QGIS interface object */ -[pluginname]::[pluginname]( QgisInterface * theQgisInterface ): +[pluginname]::[pluginname]( QgisInterface * qgisInterface ): QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ), - mQGisIface( theQgisInterface ) + mQGisIface( qgisInterface ) { } @@ -126,9 +126,9 @@ void [pluginname]::unload() * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new [pluginname]( theQgisInterfacePointer ); + return new [pluginname]( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -167,7 +167,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/plugin_template/plugin.h b/src/plugins/plugin_template/plugin.h index 7c72a1fe559..d81c63e2137 100644 --- a/src/plugins/plugin_template/plugin.h +++ b/src/plugins/plugin_template/plugin.h @@ -25,7 +25,7 @@ * * Additional useful conventions: * - * theVariableName - a method parameter (prefix with 'the') + * variableName - a method parameter (prefix with 'the') * myVariableName - a locally declared variable within a method ('my' prefix) * * DO: Use mixed case variable names - myVariableName @@ -66,9 +66,9 @@ class [pluginname]: public QObject, public QgisPlugin /** * Constructor for a plugin. The QgisInterface pointer is passed by * QGIS when it attempts to instantiate the plugin. - * @param theInterface Pointer to the QgisInterface object. + * @param interface Pointer to the QgisInterface object. */ - [pluginname]( QgisInterface * theInterface ); + [pluginname]( QgisInterface * interface ); //! Destructor virtual ~[pluginname](); diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.cpp b/src/plugins/spatialquery/qgsspatialquerydialog.cpp index b8c85c20b65..b2a0a035e1f 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.cpp +++ b/src/plugins/spatialquery/qgsspatialquerydialog.cpp @@ -404,22 +404,22 @@ QgsVectorLayer * QgsSpatialQueryDialog::getLayerFromCombobox( bool isTarget, int QIcon QgsSpatialQueryDialog::getIconTypeGeometry( QgsWkbTypes::GeometryType geomType ) { - QString theName; + QString name; if ( geomType == QgsWkbTypes::PointGeometry ) { - theName = QStringLiteral( "/mIconPointLayer.svg" ); + name = QStringLiteral( "/mIconPointLayer.svg" ); } else if ( geomType == QgsWkbTypes::LineGeometry ) { - theName = QStringLiteral( "/mIconLineLayer.svg" ); + name = QStringLiteral( "/mIconLineLayer.svg" ); } else // Polygon { - theName = QStringLiteral( "/mIconPolygonLayer.svg" ); + name = QStringLiteral( "/mIconPolygonLayer.svg" ); } // Copy from qgisapp.cpp - QString myPreferredPath = QgsApplication::activeThemePath() + QDir::separator() + theName; - QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + theName; + QString myPreferredPath = QgsApplication::activeThemePath() + QDir::separator() + name; + QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + name; if ( QFile::exists( myPreferredPath ) ) { return QIcon( myPreferredPath ); diff --git a/src/plugins/spatialquery/qgsspatialqueryplugin.cpp b/src/plugins/spatialquery/qgsspatialqueryplugin.cpp index beefc822544..e0d9768cc29 100644 --- a/src/plugins/spatialquery/qgsspatialqueryplugin.cpp +++ b/src/plugins/spatialquery/qgsspatialqueryplugin.cpp @@ -138,19 +138,19 @@ void QgsSpatialQueryPlugin::setCurrentTheme( const QString& ) mSpatialQueryAction->setIcon( getThemeIcon( QStringLiteral( "/spatialquery.png" ) ) ); } -QIcon QgsSpatialQueryPlugin::getThemeIcon( const QString &theName ) +QIcon QgsSpatialQueryPlugin::getThemeIcon( const QString &name ) { - if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + theName ) ) + if ( QFile::exists( QgsApplication::activeThemePath() + "/plugins" + name ) ) { - return QIcon( QgsApplication::activeThemePath() + "/plugins" + theName ); + return QIcon( QgsApplication::activeThemePath() + "/plugins" + name ); } - else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + theName ) ) + else if ( QFile::exists( QgsApplication::defaultThemePath() + "/plugins" + name ) ) { - return QIcon( QgsApplication::defaultThemePath() + "/plugins" + theName ); + return QIcon( QgsApplication::defaultThemePath() + "/plugins" + name ); } else { - return QIcon( ":/icons" + theName ); + return QIcon( ":/icons" + name ); } } @@ -208,7 +208,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin* theSpatialQueryPluginPointer ) +QGISEXTERN void unload( QgisPlugin* spatialQueryPluginPointer ) { - delete theSpatialQueryPluginPointer; + delete spatialQueryPluginPointer; } diff --git a/src/plugins/spatialquery/qgsspatialqueryplugin.h b/src/plugins/spatialquery/qgsspatialqueryplugin.h index af23886e768..e20a42fc101 100644 --- a/src/plugins/spatialquery/qgsspatialqueryplugin.h +++ b/src/plugins/spatialquery/qgsspatialqueryplugin.h @@ -63,8 +63,8 @@ class QgsSpatialQueryPlugin: public QObject, public QgisPlugin //! Show the dialog box void run(); //! update the plugins theme when the app tells us its theme is changed - void setCurrentTheme( const QString& theThemeName ); - QIcon getThemeIcon( const QString &theThemeName ); + void setCurrentTheme( const QString& themeName ); + QIcon getThemeIcon( const QString &themeName ); private: diff --git a/src/plugins/topology/dockModel.cpp b/src/plugins/topology/dockModel.cpp index a89cc6cccfb..b7e850a7545 100644 --- a/src/plugins/topology/dockModel.cpp +++ b/src/plugins/topology/dockModel.cpp @@ -18,7 +18,7 @@ #include "dockModel.h" #include "topolError.h" -DockModel::DockModel( ErrorList& theErrorList, QObject *parent = nullptr ) : mErrorlist( theErrorList ) +DockModel::DockModel( ErrorList& errorList, QObject *parent = nullptr ) : mErrorlist( errorList ) { Q_UNUSED( parent ); mHeader << QObject::tr( "Error" ) << QObject::tr( "Layer" ) << QObject::tr( "Feature ID" ); diff --git a/src/plugins/topology/dockModel.h b/src/plugins/topology/dockModel.h index 4b26e9ad32e..5589845c6ae 100644 --- a/src/plugins/topology/dockModel.h +++ b/src/plugins/topology/dockModel.h @@ -32,10 +32,10 @@ class DockModel: public QAbstractTableModel /** * Constructor - * @param theErrorList reference to the ErrorList where errors will be stored + * @param errorList reference to the ErrorList where errors will be stored * @param parent parent object */ - DockModel( ErrorList& theErrorList, QObject *parent ); + DockModel( ErrorList& errorList, QObject *parent ); /** * Returns header data diff --git a/src/plugins/topology/rulesDialog.cpp b/src/plugins/topology/rulesDialog.cpp index 02091370483..6ee9a2bbc8c 100644 --- a/src/plugins/topology/rulesDialog.cpp +++ b/src/plugins/topology/rulesDialog.cpp @@ -29,12 +29,12 @@ #include "rulesDialog.h" #include "topolTest.h" -rulesDialog::rulesDialog( const QMap& testMap, QgisInterface *theQgisIface, QWidget *parent ) +rulesDialog::rulesDialog( const QMap& testMap, QgisInterface *qgisIface, QWidget *parent ) : QDialog( parent ), Ui::rulesDialog() { setupUi( this ); - mQgisIface = theQgisIface; + mQgisIface = qgisIface; //setHorizontalHeaderItems(); mRulesTable->hideColumn( 4 ); diff --git a/src/plugins/topology/rulesDialog.h b/src/plugins/topology/rulesDialog.h index 23415b9fc81..cc63ac2b3e7 100644 --- a/src/plugins/topology/rulesDialog.h +++ b/src/plugins/topology/rulesDialog.h @@ -37,10 +37,10 @@ class rulesDialog : public QDialog, private Ui::rulesDialog * Constructor * @param layerList List of layer IDs * @param testMap maps test names to test routines - * @param theQgisIface pointer to a QgisInterface instance + * @param qgisIface pointer to a QgisInterface instance * @param parent parent widget */ - rulesDialog( const QMap& testMap, QgisInterface* theQgisIface, QWidget *parent ); + rulesDialog( const QMap& testMap, QgisInterface* qgisIface, QWidget *parent ); ~rulesDialog(); /* * Returns pointer to the test table diff --git a/src/plugins/topology/topol.cpp b/src/plugins/topology/topol.cpp index 4a3705d4366..435ebeeec66 100644 --- a/src/plugins/topology/topol.cpp +++ b/src/plugins/topology/topol.cpp @@ -48,9 +48,9 @@ static const QString sPluginIcon = QStringLiteral( ":/topology/mActionTopologyCh * an interface object that provides access to exposed functions in QGIS. * @param theQGisInterface - Pointer to the QGIS interface object */ -Topol::Topol( QgisInterface * theQgisInterface ) +Topol::Topol( QgisInterface * qgisInterface ) : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType ) - , mQGisIface( theQgisInterface ) + , mQGisIface( qgisInterface ) , mQActionPointer( nullptr ) { mDock = nullptr; @@ -140,9 +140,9 @@ void Topol::unload() * of the plugin class */ // Class factory to return a new instance of the plugin class -QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer ) +QGISEXTERN QgisPlugin * classFactory( QgisInterface * qgisInterfacePointer ) { - return new Topol( theQgisInterfacePointer ); + return new Topol( qgisInterfacePointer ); } // Return the name of the plugin - note that we do not user class members as // the class may not yet be insantiated when this method is called. @@ -181,7 +181,7 @@ QGISEXTERN QString icon() } // Delete ourself -QGISEXTERN void unload( QgisPlugin * thePluginPointer ) +QGISEXTERN void unload( QgisPlugin * pluginPointer ) { - delete thePluginPointer; + delete pluginPointer; } diff --git a/src/plugins/topology/topol.h b/src/plugins/topology/topol.h index 77c92fb628f..2cc73ed4064 100644 --- a/src/plugins/topology/topol.h +++ b/src/plugins/topology/topol.h @@ -26,7 +26,7 @@ * * Additional useful conventions: * - * theVariableName - a method parameter (prefix with 'the') + * variableName - a method parameter (prefix with 'the') * myVariableName - a locally declared variable within a method ('my' prefix) * * DO: Use mixed case variable names - myVariableName @@ -68,9 +68,9 @@ class Topol: public QObject, public QgisPlugin /** * Constructor for a plugin. The QgisInterface pointer is passed by * QGIS when it attempts to instantiate the plugin. - * @param theInterface Pointer to the QgisInterface object. + * @param interface Pointer to the QgisInterface object. */ - explicit Topol( QgisInterface * theInterface ); + explicit Topol( QgisInterface * interface ); virtual ~Topol(); diff --git a/src/plugins/topology/topolError.cpp b/src/plugins/topology/topolError.cpp index 770d59277d4..fe26cd11f28 100644 --- a/src/plugins/topology/topolError.cpp +++ b/src/plugins/topology/topolError.cpp @@ -126,15 +126,15 @@ bool TopolError::fixDeleteSecond() return fl.layer->deleteFeature( fl.feature.id() ); } -TopolError::TopolError( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) - : mBoundingBox( theBoundingBox ) - , mConflict( theConflict ) - , mFeaturePairs( theFeaturePairs ) +TopolError::TopolError( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) + : mBoundingBox( boundingBox ) + , mConflict( conflict ) + , mFeaturePairs( featurePairs ) { mFixMap[ QObject::tr( "Select automatic fix" )] = &TopolError::fixDummy; } -TopolErrorIntersection::TopolErrorIntersection( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, QList theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorIntersection::TopolErrorIntersection( const QgsRectangle& boundingBox, const QgsGeometry& conflict, QList featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "intersecting geometries" ); @@ -144,14 +144,14 @@ TopolErrorIntersection::TopolErrorIntersection( const QgsRectangle& theBoundingB mFixMap[QObject::tr( "Delete red feature" )] = &TopolErrorIntersection::fixDeleteSecond; // allow union only when both features have the same geometry type - if ( theFeaturePairs.first().feature.geometry().type() == theFeaturePairs[1].feature.geometry().type() ) + if ( featurePairs.first().feature.geometry().type() == featurePairs[1].feature.geometry().type() ) { mFixMap[QObject::tr( "Union to blue feature" )] = &TopolErrorIntersection::fixUnionFirst; mFixMap[QObject::tr( "Union to red feature" )] = &TopolErrorIntersection::fixUnionSecond; } } -TopolErrorClose::TopolErrorClose( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorClose::TopolErrorClose( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "features too close" ); @@ -160,75 +160,75 @@ TopolErrorClose::TopolErrorClose( const QgsRectangle& theBoundingBox, const QgsG mFixMap[QObject::tr( "Snap to segment" )] = &TopolErrorClose::fixSnap; } -TopolErrorCovered::TopolErrorCovered( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorCovered::TopolErrorCovered( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "point not covered by segment" ); mFixMap[QObject::tr( "Delete point" )] = &TopolErrorCovered::fixDeleteFirst; } -TopolErrorShort::TopolErrorShort( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorShort::TopolErrorShort( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "segment too short" ); mFixMap[QObject::tr( "Delete feature" )] = &TopolErrorShort::fixDeleteFirst; } -TopolErrorValid::TopolErrorValid( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorValid::TopolErrorValid( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "invalid geometry" ); mFixMap[QObject::tr( "Delete feature" )] = &TopolErrorValid::fixDeleteFirst; } -TopolErrorDangle::TopolErrorDangle( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorDangle::TopolErrorDangle( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "dangling end" ); mFixMap[QObject::tr( "Delete feature" )] = &TopolErrorDangle::fixDeleteFirst; } -TopolErrorDuplicates::TopolErrorDuplicates( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorDuplicates::TopolErrorDuplicates( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "duplicate geometry" ); //mFixMap["Delete feature"] = &TopolErrorDuplicates::fixDeleteFirst; } -TopolErrorPseudos::TopolErrorPseudos( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorPseudos::TopolErrorPseudos( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "pseudo node" ); //mFixMap["Delete feature"] = &TopolErrorDuplicates::fixDeleteFirst; } -TopolErrorOverlaps::TopolErrorOverlaps( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorOverlaps::TopolErrorOverlaps( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "overlaps" ); //mFixMap["Delete feature"] = &TopolErrorDuplicates::fixDeleteFirst; } -TopolErrorGaps::TopolErrorGaps( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorGaps::TopolErrorGaps( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "gaps" ); //mFixMap["Delete feature"] = &TopolErrorDuplicates::fixDeleteFirst; } -TopolErrorPointNotCoveredByLineEnds::TopolErrorPointNotCoveredByLineEnds( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorPointNotCoveredByLineEnds::TopolErrorPointNotCoveredByLineEnds( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "point not covered" ); } -TopolErrorLineEndsNotCoveredByPoints::TopolErrorLineEndsNotCoveredByPoints( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorLineEndsNotCoveredByPoints::TopolErrorLineEndsNotCoveredByPoints( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "line ends not covered by point" ); } -TopolErrorPointNotInPolygon::TopolErrorPointNotInPolygon( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorPointNotInPolygon::TopolErrorPointNotInPolygon( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "point not in polygon" ); } -TopolErrorPolygonContainsPoint::TopolErrorPolygonContainsPoint( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErrorPolygonContainsPoint::TopolErrorPolygonContainsPoint( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "polygon does not contain point" ); } -TopolErroMultiPart::TopolErroMultiPart( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ) : TopolError( theBoundingBox, theConflict, theFeaturePairs ) +TopolErroMultiPart::TopolErroMultiPart( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ) : TopolError( boundingBox, conflict, featurePairs ) { mName = QObject::tr( "multipart feature" ); } diff --git a/src/plugins/topology/topolError.h b/src/plugins/topology/topolError.h index be8864acdaf..1fdc0c8b22c 100644 --- a/src/plugins/topology/topolError.h +++ b/src/plugins/topology/topolError.h @@ -36,12 +36,12 @@ class FeatureLayer /** * Constructor - * @param theLayer layer pointer - * @param theFeature QgsFeature + * @param layer layer pointer + * @param feature QgsFeature */ - FeatureLayer( QgsVectorLayer* theLayer, const QgsFeature& theFeature ) - : layer( theLayer ) - , feature( theFeature ) + FeatureLayer( QgsVectorLayer* layer, const QgsFeature& feature ) + : layer( layer ) + , feature( feature ) {} QgsVectorLayer* layer = nullptr; @@ -117,11 +117,11 @@ class TopolError /** * Constructor - * @param theBoundingBox bounding box of the two features - * @param theConflict geometry representation of the conflict - * @param theFeaturePairs FeatureLayer pairs of the two features + * @param boundingBox bounding box of the two features + * @param conflict geometry representation of the conflict + * @param featurePairs FeatureLayer pairs of the two features */ - TopolError( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolError( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); virtual ~TopolError() = default; @@ -160,91 +160,91 @@ class TopolError class TopolErrorIntersection : public TopolError { public: - TopolErrorIntersection( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, QList theFeaturePairs ); + TopolErrorIntersection( const QgsRectangle& boundingBox, const QgsGeometry& conflict, QList featurePairs ); }; class TopolErrorClose : public TopolError { public: - TopolErrorClose( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorClose( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorCovered : public TopolError { public: - TopolErrorCovered( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorCovered( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorShort : public TopolError { public: - TopolErrorShort( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorShort( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorValid : public TopolError { public: - TopolErrorValid( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorValid( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorDangle : public TopolError { public: - TopolErrorDangle( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorDangle( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorDuplicates : public TopolError { public: - TopolErrorDuplicates( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorDuplicates( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorPseudos : public TopolError { public: - TopolErrorPseudos( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorPseudos( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorOverlaps : public TopolError { public: - TopolErrorOverlaps( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorOverlaps( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorGaps : public TopolError { public: - TopolErrorGaps( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorGaps( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorPointNotCoveredByLineEnds : public TopolError { public: - TopolErrorPointNotCoveredByLineEnds( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorPointNotCoveredByLineEnds( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorLineEndsNotCoveredByPoints : public TopolError { public: - TopolErrorLineEndsNotCoveredByPoints( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorLineEndsNotCoveredByPoints( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorPointNotInPolygon : public TopolError { public: - TopolErrorPointNotInPolygon( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorPointNotInPolygon( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErrorPolygonContainsPoint : public TopolError { public: - TopolErrorPolygonContainsPoint( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErrorPolygonContainsPoint( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; class TopolErroMultiPart : public TopolError { public: - TopolErroMultiPart( const QgsRectangle& theBoundingBox, const QgsGeometry& theConflict, const QList& theFeaturePairs ); + TopolErroMultiPart( const QgsRectangle& boundingBox, const QgsGeometry& conflict, const QList& featurePairs ); }; #endif diff --git a/src/plugins/topology/topolTest.cpp b/src/plugins/topology/topolTest.cpp index 84cf2427d59..e20e531c438 100644 --- a/src/plugins/topology/topolTest.cpp +++ b/src/plugins/topology/topolTest.cpp @@ -44,7 +44,7 @@ static bool _canExportToGeos( const QgsGeometry& geom ) topolTest::topolTest( QgisInterface* qgsIface ) { - theQgsInterface = qgsIface; + qgsInterface = qgsIface; mTestCanceled = false; // one layer tests @@ -307,7 +307,7 @@ ErrorList topolTest::checkDanglingLines( double tolerance, QgsVectorLayer* layer } } - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); for ( std::multimap::iterator pointIt = endVerticesMap.begin(), end = endVerticesMap.end(); pointIt != end; pointIt = endVerticesMap.upper_bound( pointIt->first ) ) @@ -362,7 +362,7 @@ ErrorList topolTest::checkDuplicates( double tolerance, QgsVectorLayer *layer1, QgsSpatialIndex* index = mLayerIndexes[layer1->id()]; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); QMap::const_iterator it; for ( it = mFeatureMap2.constBegin(); it != mFeatureMap2.constEnd(); ++it ) @@ -509,7 +509,7 @@ ErrorList topolTest::checkOverlaps( double tolerance, QgsVectorLayer *layer1, Qg bool duplicate = false; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); for ( ; cit != crossingIdsEnd; ++cit ) { @@ -697,7 +697,7 @@ ErrorList topolTest::checkGaps( double tolerance, QgsVectorLayer *layer1, QgsVec QList geomColl = diffGeoms.asGeometryCollection(); - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); for ( int i = 1; i < geomColl.count() ; ++i ) { @@ -795,7 +795,7 @@ ErrorList topolTest::checkPseudos( double tolerance, QgsVectorLayer *layer1, Qgs } - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); for ( std::multimap::iterator pointIt = endVerticesMap.begin(), end = endVerticesMap.end(); pointIt != end; pointIt = endVerticesMap.upper_bound( pointIt->first ) ) @@ -902,7 +902,7 @@ ErrorList topolTest::checkPointCoveredBySegment( double tolerance, QgsVectorLaye } QgsSpatialIndex* index = mLayerIndexes[layer2->id()]; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); QList::Iterator it; for ( it = mFeatureList1.begin(); it != mFeatureList1.end(); ++it ) @@ -1131,7 +1131,7 @@ ErrorList topolTest::checkOverlapWithLayer( double tolerance, QgsVectorLayer* la bool skipItself = layer1 == layer2; QgsSpatialIndex* index = mLayerIndexes[layer2->id()]; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); QList::iterator it; for ( it = mFeatureList1.begin(); it != mFeatureList1.end(); ++it ) @@ -1227,7 +1227,7 @@ ErrorList topolTest::checkPointCoveredByLineEnds( double tolerance, QgsVectorLay } QgsSpatialIndex* index = mLayerIndexes[layer2->id()]; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); QList::Iterator it; for ( it = mFeatureList1.begin(); it != mFeatureList1.end(); ++it ) @@ -1304,7 +1304,7 @@ ErrorList topolTest::checkyLineEndsCoveredByPoints( double tolerance, QgsVectorL QgsSpatialIndex* index = mLayerIndexes[layer2->id()]; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); QList::Iterator it; for ( it = mFeatureList1.begin(); it != mFeatureList1.end(); ++it ) @@ -1403,7 +1403,7 @@ ErrorList topolTest::checkPointInPolygon( double tolerance, QgsVectorLayer *laye QgsSpatialIndex* index = mLayerIndexes[layer2->id()]; - QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( theQgsInterface->mapCanvas()->extent().asWktPolygon() ); + QgsGeometry canvasExtentPoly = QgsGeometry::fromWkt( qgsInterface->mapCanvas()->extent().asWktPolygon() ); QList::Iterator it; for ( it = mFeatureList1.begin(); it != mFeatureList1.end(); ++it ) @@ -1681,7 +1681,7 @@ ErrorList topolTest::runTest( const QString& testName, QgsVectorLayer* layer1, Q QgsRectangle extent; if ( type == ValidateExtent ) { - extent = theQgsInterface->mapCanvas()->extent(); + extent = qgsInterface->mapCanvas()->extent(); } else { @@ -1702,10 +1702,10 @@ ErrorList topolTest::runTest( const QString& testName, QgsVectorLayer* layer1, Q QgsRectangle extent; if ( type == ValidateExtent ) { - extent = theQgsInterface->mapCanvas()->extent(); + extent = qgsInterface->mapCanvas()->extent(); if ( mTopologyRuleMap[testName].useSpatialIndex ) { - mLayerIndexes[layer1->id()] = createIndex( layer1, theQgsInterface->mapCanvas()->extent() ); + mLayerIndexes[layer1->id()] = createIndex( layer1, qgsInterface->mapCanvas()->extent() ); } else { diff --git a/src/plugins/topology/topolTest.h b/src/plugins/topology/topolTest.h index f42b7e8543f..1500c0dd16d 100644 --- a/src/plugins/topology/topolTest.h +++ b/src/plugins/topology/topolTest.h @@ -270,7 +270,7 @@ class topolTest: public QObject QList mFeatureList1; QMap mFeatureMap2; - QgisInterface* theQgsInterface = nullptr; + QgisInterface* qgsInterface = nullptr; bool mTestCanceled; /** diff --git a/src/providers/arcgisrest/qgsafsproviderextern.cpp b/src/providers/arcgisrest/qgsafsproviderextern.cpp index 865c191d3d9..31ff9ea33f8 100644 --- a/src/providers/arcgisrest/qgsafsproviderextern.cpp +++ b/src/providers/arcgisrest/qgsafsproviderextern.cpp @@ -55,21 +55,21 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Net; } -QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem ) +QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem ) { - if ( thePath.isEmpty() ) + if ( path.isEmpty() ) { return new QgsAfsRootItem( parentItem, QStringLiteral( "ArcGisFeatureServer" ), QStringLiteral( "arcgisfeatureserver:" ) ); } // path schema: afs:/connection name (used by OWS) - if ( thePath.startsWith( QLatin1String( "afs:/" ) ) ) + if ( path.startsWith( QLatin1String( "afs:/" ) ) ) { - QString connectionName = thePath.split( '/' ).last(); + QString connectionName = path.split( '/' ).last(); if ( QgsOwsConnection::connectionList( QStringLiteral( "ArcGisFeatureServer" ) ).contains( connectionName ) ) { QgsOwsConnection connection( QStringLiteral( "ArcGisFeatureServer" ), connectionName ); - return new QgsAfsConnectionItem( parentItem, QStringLiteral( "ArcGisFeatureServer" ), thePath, connection.uri().param( QStringLiteral( "url" ) ) ); + return new QgsAfsConnectionItem( parentItem, QStringLiteral( "ArcGisFeatureServer" ), path, connection.uri().param( QStringLiteral( "url" ) ) ); } } diff --git a/src/providers/arcgisrest/qgsamsprovider.cpp b/src/providers/arcgisrest/qgsamsprovider.cpp index adab274068d..3da341b9b41 100644 --- a/src/providers/arcgisrest/qgsamsprovider.cpp +++ b/src/providers/arcgisrest/qgsamsprovider.cpp @@ -374,24 +374,24 @@ QgsImageFetcher* QgsAmsProvider::getLegendGraphicFetcher( const QgsMapSettings* return new QgsAmsLegendFetcher( this ); } -QgsRasterIdentifyResult QgsAmsProvider::identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight, int theDpi ) +QgsRasterIdentifyResult QgsAmsProvider::identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &extent, int width, int height, int dpi ) { // http://resources.arcgis.com/en/help/rest/apiref/identify.html QgsDataSourceUri dataSource( dataSourceUri() ); QUrl queryUrl( dataSource.param( QStringLiteral( "url" ) ) + "/identify" ); queryUrl.addQueryItem( QStringLiteral( "f" ), QStringLiteral( "json" ) ); queryUrl.addQueryItem( QStringLiteral( "geometryType" ), QStringLiteral( "esriGeometryPoint" ) ); - queryUrl.addQueryItem( QStringLiteral( "geometry" ), QStringLiteral( "{x: %1, y: %2}" ).arg( thePoint.x(), 0, 'f' ).arg( thePoint.y(), 0, 'f' ) ); + queryUrl.addQueryItem( QStringLiteral( "geometry" ), QStringLiteral( "{x: %1, y: %2}" ).arg( point.x(), 0, 'f' ).arg( point.y(), 0, 'f' ) ); // queryUrl.addQueryItem( "sr", mCrs.postgisSrid() ); queryUrl.addQueryItem( QStringLiteral( "layers" ), QStringLiteral( "all:%1" ).arg( dataSource.param( QStringLiteral( "layer" ) ) ) ); - queryUrl.addQueryItem( QStringLiteral( "imageDisplay" ), QStringLiteral( "%1,%2,%3" ).arg( theWidth ).arg( theHeight ).arg( theDpi ) ); - queryUrl.addQueryItem( QStringLiteral( "mapExtent" ), QStringLiteral( "%1,%2,%3,%4" ).arg( theExtent.xMinimum(), 0, 'f' ).arg( theExtent.yMinimum(), 0, 'f' ).arg( theExtent.xMaximum(), 0, 'f' ).arg( theExtent.yMaximum(), 0, 'f' ) ); + queryUrl.addQueryItem( QStringLiteral( "imageDisplay" ), QStringLiteral( "%1,%2,%3" ).arg( width ).arg( height ).arg( dpi ) ); + queryUrl.addQueryItem( QStringLiteral( "mapExtent" ), QStringLiteral( "%1,%2,%3,%4" ).arg( extent.xMinimum(), 0, 'f' ).arg( extent.yMinimum(), 0, 'f' ).arg( extent.xMaximum(), 0, 'f' ).arg( extent.yMaximum(), 0, 'f' ) ); queryUrl.addQueryItem( QStringLiteral( "tolerance" ), QStringLiteral( "10" ) ); QVariantList queryResults = QgsArcGisRestUtils::queryServiceJSON( queryUrl, mErrorTitle, mError ).value( QStringLiteral( "results" ) ).toList(); QMap entries; - if ( theFormat == QgsRaster::IdentifyFormatText ) + if ( format == QgsRaster::IdentifyFormatText ) { foreach ( const QVariant& result, queryResults ) { @@ -405,7 +405,7 @@ QgsRasterIdentifyResult QgsAmsProvider::identify( const QgsPoint & thePoint, Qgs entries.insert( entries.size(), valueStr ); } } - else if ( theFormat == QgsRaster::IdentifyFormatFeature ) + else if ( format == QgsRaster::IdentifyFormatFeature ) { foreach ( const QVariant& result, queryResults ) { @@ -434,7 +434,7 @@ QgsRasterIdentifyResult QgsAmsProvider::identify( const QgsPoint & thePoint, Qgs entries.insert( entries.size(), qVariantFromValue( QList() << store ) ); } } - return QgsRasterIdentifyResult( theFormat, entries ); + return QgsRasterIdentifyResult( format, entries ); } void QgsAmsProvider::readBlock( int /*bandNo*/, const QgsRectangle & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback ) diff --git a/src/providers/arcgisrest/qgsamsprovider.h b/src/providers/arcgisrest/qgsamsprovider.h index 64204946e7f..1592f5a6cb7 100644 --- a/src/providers/arcgisrest/qgsamsprovider.h +++ b/src/providers/arcgisrest/qgsamsprovider.h @@ -83,7 +83,7 @@ class QgsAmsProvider : public QgsRasterDataProvider bool supportsLegendGraphic() const override { return true; } QImage getLegendGraphic( double scale = 0, bool forceRefresh = false, const QgsRectangle * visibleExtent = 0 ) override; QgsImageFetcher* getLegendGraphicFetcher( const QgsMapSettings* mapSettings ) override; - QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override; + QgsRasterIdentifyResult identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &extent = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override; protected: void readBlock( int bandNo, const QgsRectangle & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override; diff --git a/src/providers/arcgisrest/qgsamsproviderextern.cpp b/src/providers/arcgisrest/qgsamsproviderextern.cpp index e4ac7af8bf7..0b74cbb4805 100644 --- a/src/providers/arcgisrest/qgsamsproviderextern.cpp +++ b/src/providers/arcgisrest/qgsamsproviderextern.cpp @@ -55,21 +55,21 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Net; } -QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem ) +QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem ) { - if ( thePath.isEmpty() ) + if ( path.isEmpty() ) { return new QgsAmsRootItem( parentItem, QStringLiteral( "ArcGisMapServer" ), QStringLiteral( "arcgismapserver:" ) ); } // path schema: ams:/connection name (used by OWS) - if ( thePath.startsWith( QLatin1String( "ams:/" ) ) ) + if ( path.startsWith( QLatin1String( "ams:/" ) ) ) { - QString connectionName = thePath.split( '/' ).last(); + QString connectionName = path.split( '/' ).last(); if ( QgsOwsConnection::connectionList( QStringLiteral( "ArcGisMapServer" ) ).contains( connectionName ) ) { QgsOwsConnection connection( QStringLiteral( "ArcGisMapServer" ), connectionName ); - return new QgsAmsConnectionItem( parentItem, QStringLiteral( "ArcGisMapServer" ), thePath, connection.uri().param( QStringLiteral( "url" ) ) ); + return new QgsAmsConnectionItem( parentItem, QStringLiteral( "ArcGisMapServer" ), path, connection.uri().param( QStringLiteral( "url" ) ) ); } } diff --git a/src/providers/db2/qgsdb2provider.cpp b/src/providers/db2/qgsdb2provider.cpp index 4a9c50f4afa..8534b72edb3 100644 --- a/src/providers/db2/qgsdb2provider.cpp +++ b/src/providers/db2/qgsdb2provider.cpp @@ -1716,9 +1716,9 @@ QGISEXTERN void *selectWidget( QWidget *parent, Qt::WindowFlags fl ) return new QgsDb2SourceSelect( parent, fl ); } -QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem ) +QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem ) { - Q_UNUSED( thePath ); + Q_UNUSED( path ); QgsDebugMsg( "DB2: Browser Panel; data item detected." ); return new QgsDb2RootItem( parentItem, PROVIDER_KEY, QStringLiteral( "DB2:" ) ); } diff --git a/src/providers/gdal/qgsgdaldataitems.cpp b/src/providers/gdal/qgsgdaldataitems.cpp index 199214576f4..4e5b146df90 100644 --- a/src/providers/gdal/qgsgdaldataitems.cpp +++ b/src/providers/gdal/qgsgdaldataitems.cpp @@ -20,20 +20,20 @@ #include // defined in qgsgdalprovider.cpp -void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString, QStringList & theExtensions, QStringList & theWildcards ); +void buildSupportedRasterFileFilterAndExtensions( QString & fileFiltersString, QStringList & extensions, QStringList & wildcards ); QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem* parent, QString name, QString path, QString uri, - QStringList *theSublayers ) + QStringList *sublayers ) : QgsLayerItem( parent, name, path, uri, QgsLayerItem::Raster, QStringLiteral( "gdal" ) ) { mToolTip = uri; // save sublayers for subsequent access // if there are sublayers, set populated=false so item can be populated on demand - if ( theSublayers && !theSublayers->isEmpty() ) + if ( sublayers && !sublayers->isEmpty() ) { - sublayers = *theSublayers; + mSublayers = *sublayers; setState( NotPopulated ); } else @@ -73,13 +73,13 @@ QVector QgsGdalLayerItem::createChildren() QVector children; // get children from sublayers - if ( !sublayers.isEmpty() ) + if ( !mSublayers.isEmpty() ) { QgsDataItem * childItem = nullptr; - QgsDebugMsg( QString( "got %1 sublayers" ).arg( sublayers.count() ) ); - for ( int i = 0; i < sublayers.count(); i++ ) + QgsDebugMsg( QString( "got %1 sublayers" ).arg( mSublayers.count() ) ); + for ( int i = 0; i < mSublayers.count(); i++ ) { - QString name = sublayers[i]; + QString name = mSublayers[i]; // if netcdf/hdf use all text after filename // for hdf4 it would be best to get description, because the subdataset_index is not very practical if ( name.startsWith( QLatin1String( "netcdf" ), Qt::CaseInsensitive ) || @@ -97,7 +97,7 @@ QVector QgsGdalLayerItem::createChildren() if ( name.endsWith( ':' ) ) name.chop( 1 ); if ( name.endsWith( '\"' ) ) name.chop( 1 ); - childItem = new QgsGdalLayerItem( this, name, sublayers[i], sublayers[i] ); + childItem = new QgsGdalLayerItem( this, name, mSublayers[i], mSublayers[i] ); if ( childItem ) this->addChildItem( childItem ); } @@ -127,17 +127,17 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::File | QgsDataProvider::Dir | QgsDataProvider::Net; } -QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString path, QgsDataItem* parentItem ) { - if ( thePath.isEmpty() ) + if ( path.isEmpty() ) return nullptr; - QgsDebugMsgLevel( "thePath = " + thePath, 2 ); + QgsDebugMsgLevel( "thePath = " + path, 2 ); // zip settings + info QSettings settings; QString scanZipSetting = settings.value( QStringLiteral( "/qgis/scanZipInBrowser2" ), "basic" ).toString(); - QString vsiPrefix = QgsZipItem::vsiPrefix( thePath ); + QString vsiPrefix = QgsZipItem::vsiPrefix( path ); bool is_vsizip = ( vsiPrefix == QLatin1String( "/vsizip/" ) ); bool is_vsigzip = ( vsiPrefix == QLatin1String( "/vsigzip/" ) ); bool is_vsitar = ( vsiPrefix == QLatin1String( "/vsitar/" ) ); @@ -159,16 +159,16 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) } // get suffix, removing .gz if present - QString tmpPath = thePath; //path used for testing, not for layer creation + QString tmpPath = path; //path used for testing, not for layer creation if ( is_vsigzip ) tmpPath.chop( 3 ); QFileInfo info( tmpPath ); QString suffix = info.suffix().toLower(); // extract basename with extension - info.setFile( thePath ); + info.setFile( path ); QString name = info.fileName(); - QgsDebugMsgLevel( "thePath= " + thePath + " tmpPath= " + tmpPath + " name= " + name + QgsDebugMsgLevel( "thePath= " + path + " tmpPath= " + tmpPath + " name= " + name + " suffix= " + suffix + " vsiPrefix= " + vsiPrefix, 3 ); // allow only normal files or VSIFILE items to continue @@ -192,13 +192,13 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // skip *.aux.xml files (GDAL auxiliary metadata files), // *.shp.xml files (ESRI metadata) and *.tif.xml files (TIFF metadata) // unless that extension is in the list (*.xml might be though) - if ( thePath.endsWith( QLatin1String( ".aux.xml" ), Qt::CaseInsensitive ) && + if ( path.endsWith( QLatin1String( ".aux.xml" ), Qt::CaseInsensitive ) && !sExtensions.contains( QStringLiteral( "aux.xml" ) ) ) return nullptr; - if ( thePath.endsWith( QLatin1String( ".shp.xml" ), Qt::CaseInsensitive ) && + if ( path.endsWith( QLatin1String( ".shp.xml" ), Qt::CaseInsensitive ) && !sExtensions.contains( QStringLiteral( "shp.xml" ) ) ) return nullptr; - if ( thePath.endsWith( QLatin1String( ".tif.xml" ), Qt::CaseInsensitive ) && + if ( path.endsWith( QLatin1String( ".tif.xml" ), Qt::CaseInsensitive ) && !sExtensions.contains( QStringLiteral( "tif.xml" ) ) ) return nullptr; @@ -223,14 +223,14 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) if ( vsiPrefix != QLatin1String( "" ) ) { // add vsiPrefix to path if needed - if ( !thePath.startsWith( vsiPrefix ) ) - thePath = vsiPrefix + thePath; + if ( !path.startsWith( vsiPrefix ) ) + path = vsiPrefix + path; // if this is a /vsigzip/path_to_zip.zip/file_inside_zip remove the full path from the name // no need to change the name I believe #if 0 - if (( is_vsizip || is_vsitar ) && ( thePath != vsiPrefix + parentItem->path() ) ) + if (( is_vsizip || is_vsitar ) && ( path != vsiPrefix + parentItem->path() ) ) { - name = thePath; + name = path; name = name.replace( vsiPrefix + parentItem->path() + '/', "" ); } #endif @@ -248,7 +248,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // do not print errors, but write to debug CPLPushErrorHandler( CPLQuietErrorHandler ); CPLErrorReset(); - if ( ! GDALIdentifyDriver( thePath.toUtf8().constData(), nullptr ) ) + if ( ! GDALIdentifyDriver( path.toUtf8().constData(), nullptr ) ) { QgsDebugMsgLevel( "Skipping VRT file because root is not a GDAL VRT", 2 ); CPLPopErrorHandler(); @@ -258,8 +258,8 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) } // add the item QStringList sublayers; - QgsDebugMsgLevel( QString( "adding item name=%1 thePath=%2" ).arg( name, thePath ), 2 ); - QgsLayerItem * item = new QgsGdalLayerItem( parentItem, name, thePath, thePath, &sublayers ); + QgsDebugMsgLevel( QString( "adding item name=%1 path=%2" ).arg( name, path ), 2 ); + QgsLayerItem * item = new QgsGdalLayerItem( parentItem, name, path, path, &sublayers ); if ( item ) return item; } @@ -269,7 +269,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // do not print errors, but write to debug CPLPushErrorHandler( CPLQuietErrorHandler ); CPLErrorReset(); - GDALDatasetH hDS = GDALOpen( thePath.toUtf8().constData(), GA_ReadOnly ); + GDALDatasetH hDS = GDALOpen( path.toUtf8().constData(), GA_ReadOnly ); CPLPopErrorHandler(); if ( ! hDS ) @@ -282,9 +282,9 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) GDALClose( hDS ); - QgsDebugMsgLevel( "GdalDataset opened " + thePath, 2 ); + QgsDebugMsgLevel( "GdalDataset opened " + path, 2 ); - QgsLayerItem * item = new QgsGdalLayerItem( parentItem, name, thePath, thePath, + QgsLayerItem * item = new QgsGdalLayerItem( parentItem, name, path, path, &sublayers ); return item; diff --git a/src/providers/gdal/qgsgdaldataitems.h b/src/providers/gdal/qgsgdaldataitems.h index 661aa41e60f..b28c8dc5864 100644 --- a/src/providers/gdal/qgsgdaldataitems.h +++ b/src/providers/gdal/qgsgdaldataitems.h @@ -23,12 +23,12 @@ class QgsGdalLayerItem : public QgsLayerItem private: - QStringList sublayers; + QStringList mSublayers; public: QgsGdalLayerItem( QgsDataItem* parent, QString name, QString path, QString uri, - QStringList *theSublayers = nullptr ); + QStringList *mSublayers = nullptr ); bool setCrs( const QgsCoordinateReferenceSystem& crs ) override; diff --git a/src/providers/gdal/qgsgdalprovider.cpp b/src/providers/gdal/qgsgdalprovider.cpp index 1fad5694b82..55e8481a9fb 100644 --- a/src/providers/gdal/qgsgdalprovider.cpp +++ b/src/providers/gdal/qgsgdalprovider.cpp @@ -373,12 +373,12 @@ QString QgsGdalProvider::metadata() } -QgsRasterBlock* QgsGdalProvider::block( int theBandNo, const QgsRectangle &theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback ) +QgsRasterBlock* QgsGdalProvider::block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback* feedback ) { - QgsRasterBlock *block = new QgsRasterBlock( dataType( theBandNo ), theWidth, theHeight ); - if ( sourceHasNoDataValue( theBandNo ) && useSourceNoDataValue( theBandNo ) ) + QgsRasterBlock *block = new QgsRasterBlock( dataType( bandNo ), width, height ); + if ( sourceHasNoDataValue( bandNo ) && useSourceNoDataValue( bandNo ) ) { - block->setNoDataValue( sourceNoDataValue( theBandNo ) ); + block->setNoDataValue( sourceNoDataValue( bandNo ) ); } if ( block->isEmpty() ) @@ -386,19 +386,19 @@ QgsRasterBlock* QgsGdalProvider::block( int theBandNo, const QgsRectangle &theEx return block; } - if ( !mExtent.contains( theExtent ) ) + if ( !mExtent.contains( extent ) ) { - QRect subRect = QgsRasterBlock::subRect( theExtent, theWidth, theHeight, mExtent ); + QRect subRect = QgsRasterBlock::subRect( extent, width, height, mExtent ); block->setIsNoDataExcept( subRect ); } - readBlock( theBandNo, theExtent, theWidth, theHeight, block->bits(), feedback ); + readBlock( bandNo, extent, width, height, block->bits(), feedback ); // apply scale and offset - block->applyScaleOffset( bandScale( theBandNo ), bandOffset( theBandNo ) ); - block->applyNoDataValues( userNoDataValues( theBandNo ) ); + block->applyScaleOffset( bandScale( bandNo ), bandOffset( bandNo ) ); + block->applyNoDataValues( userNoDataValues( bandNo ) ); return block; } -void QgsGdalProvider::readBlock( int theBandNo, int xBlock, int yBlock, void *block ) +void QgsGdalProvider::readBlock( int bandNo, int xBlock, int yBlock, void *block ) { // TODO!!!: Check data alignment!!! May it happen that nearest value which // is not nearest is assigned to an output cell??? @@ -406,37 +406,37 @@ void QgsGdalProvider::readBlock( int theBandNo, int xBlock, int yBlock, void *bl //QgsDebugMsg( "yBlock = " + QString::number( yBlock ) ); - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); //GDALReadBlock( myGdalBand, xBlock, yBlock, block ); // We have to read with correct data type consistent with other readBlock functions int xOff = xBlock * mXBlockSize; int yOff = yBlock * mYBlockSize; - gdalRasterIO( myGdalBand, GF_Read, xOff, yOff, mXBlockSize, mYBlockSize, block, mXBlockSize, mYBlockSize, ( GDALDataType ) mGdalDataType.at( theBandNo - 1 ), 0, 0 ); + gdalRasterIO( myGdalBand, GF_Read, xOff, yOff, mXBlockSize, mYBlockSize, block, mXBlockSize, mYBlockSize, ( GDALDataType ) mGdalDataType.at( bandNo - 1 ), 0, 0 ); } -void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, int thePixelWidth, int thePixelHeight, void *theBlock, QgsRasterBlockFeedback* feedback ) +void QgsGdalProvider::readBlock( int bandNo, QgsRectangle const & extent, int pixelWidth, int pixelHeight, void *block, QgsRasterBlockFeedback* feedback ) { - QgsDebugMsg( "thePixelWidth = " + QString::number( thePixelWidth ) ); - QgsDebugMsg( "thePixelHeight = " + QString::number( thePixelHeight ) ); - QgsDebugMsg( "theExtent: " + theExtent.toString() ); + QgsDebugMsg( "thePixelWidth = " + QString::number( pixelWidth ) ); + QgsDebugMsg( "thePixelHeight = " + QString::number( pixelHeight ) ); + QgsDebugMsg( "theExtent: " + extent.toString() ); for ( int i = 0 ; i < 6; i++ ) { QgsDebugMsg( QString( "transform : %1" ).arg( mGeoTransform[i] ) ); } - int dataSize = dataTypeSize( theBandNo ); + int dataSize = dataTypeSize( bandNo ); // moved to block() #if 0 - if ( !mExtent.contains( theExtent ) ) + if ( !mExtent.contains( extent ) ) { // fill with null values - QByteArray ba = QgsRasterBlock::valueBytes( dataType( theBandNo ), noDataValue( theBandNo ) ); + QByteArray ba = QgsRasterBlock::valueBytes( dataType( bandNo ), noDataValue( bandNo ) ); char *nodata = ba.data(); - char *block = ( char * ) theBlock; - for ( int i = 0; i < thePixelWidth * thePixelHeight; i++ ) + char *block = ( char * ) block; + for ( int i = 0; i < pixelWidth * pixelHeight; i++ ) { memcpy( block, nodata, dataSize ); block += dataSize; @@ -444,7 +444,7 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, } #endif - QgsRectangle myRasterExtent = theExtent.intersect( &mExtent ); + QgsRectangle myRasterExtent = extent.intersect( &mExtent ); if ( myRasterExtent.isEmpty() ) { QgsDebugMsg( "draw request outside view extent." ); @@ -453,36 +453,36 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, QgsDebugMsg( "mExtent: " + mExtent.toString() ); QgsDebugMsg( "myRasterExtent: " + myRasterExtent.toString() ); - double xRes = theExtent.width() / thePixelWidth; - double yRes = theExtent.height() / thePixelHeight; + double xRes = extent.width() / pixelWidth; + double yRes = extent.height() / pixelHeight; // Find top, bottom rows and left, right column the raster extent covers // These are limits in target grid space #if 0 int top = 0; - int bottom = thePixelHeight - 1; + int bottom = pixelHeight - 1; int left = 0; - int right = thePixelWidth - 1; + int right = pixelWidth - 1; - if ( myRasterExtent.yMaximum() < theExtent.yMaximum() ) + if ( myRasterExtent.yMaximum() < extent.yMaximum() ) { - top = qRound(( theExtent.yMaximum() - myRasterExtent.yMaximum() ) / yRes ); + top = qRound(( extent.yMaximum() - myRasterExtent.yMaximum() ) / yRes ); } - if ( myRasterExtent.yMinimum() > theExtent.yMinimum() ) + if ( myRasterExtent.yMinimum() > extent.yMinimum() ) { - bottom = qRound(( theExtent.yMaximum() - myRasterExtent.yMinimum() ) / yRes ) - 1; + bottom = qRound(( extent.yMaximum() - myRasterExtent.yMinimum() ) / yRes ) - 1; } - if ( myRasterExtent.xMinimum() > theExtent.xMinimum() ) + if ( myRasterExtent.xMinimum() > extent.xMinimum() ) { - left = qRound(( myRasterExtent.xMinimum() - theExtent.xMinimum() ) / xRes ); + left = qRound(( myRasterExtent.xMinimum() - extent.xMinimum() ) / xRes ); } - if ( myRasterExtent.xMaximum() < theExtent.xMaximum() ) + if ( myRasterExtent.xMaximum() < extent.xMaximum() ) { - right = qRound(( myRasterExtent.xMaximum() - theExtent.xMinimum() ) / xRes ) - 1; + right = qRound(( myRasterExtent.xMaximum() - extent.xMinimum() ) / xRes ) - 1; } #endif - QRect subRect = QgsRasterBlock::subRect( theExtent, thePixelWidth, thePixelHeight, myRasterExtent ); + QRect subRect = QgsRasterBlock::subRect( extent, pixelWidth, pixelHeight, myRasterExtent ); int top = subRect.top(); int bottom = subRect.bottom(); int left = subRect.left(); @@ -584,8 +584,8 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, QgsDebugMsg( QString( "Couldn't allocate temporary buffer of %1 bytes" ).arg( dataSize * tmpWidth * tmpHeight ) ); return; } - GDALRasterBandH gdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); - GDALDataType type = ( GDALDataType )mGdalDataType.at( theBandNo - 1 ); + GDALRasterBandH gdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); + GDALDataType type = ( GDALDataType )mGdalDataType.at( bandNo - 1 ); CPLErrorReset(); CPLErr err = gdalRasterIO( gdalBand, GF_Read, @@ -610,7 +610,7 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, int tmpRow = static_cast( floor( -1. * ( tmpYMax - y ) / tmpYRes ) ); char *srcRowBlock = tmpBlock + dataSize * tmpRow * tmpWidth; - char *dstRowBlock = ( char * )theBlock + dataSize * ( top + row ) * thePixelWidth; + char *dstRowBlock = ( char * )block + dataSize * ( top + row ) * pixelWidth; double x = ( myRasterExtent.xMinimum() + 0.5 * xRes - tmpXMin ) / tmpXRes; // cell center double increment = xRes / tmpXRes; @@ -646,22 +646,22 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, // this is old version which was using GDALWarpOperation, unfortunately // it may be very slow on large datasets #if 0 -void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, int thePixelWidth, int thePixelHeight, void *theBlock ) +void QgsGdalProvider::readBlock( int bandNo, QgsRectangle const & extent, int pixelWidth, int pixelHeight, void *block ) { - QgsDebugMsg( "thePixelWidth = " + QString::number( thePixelWidth ) ); - QgsDebugMsg( "thePixelHeight = " + QString::number( thePixelHeight ) ); - QgsDebugMsg( "theExtent: " + theExtent.toString() ); + QgsDebugMsg( "thePixelWidth = " + QString::number( pixelWidth ) ); + QgsDebugMsg( "thePixelHeight = " + QString::number( pixelHeight ) ); + QgsDebugMsg( "theExtent: " + extent.toString() ); QString myMemDsn; - myMemDsn.sprintf( "DATAPOINTER = %p", theBlock ); + myMemDsn.sprintf( "DATAPOINTER = %p", block ); QgsDebugMsg( myMemDsn ); - //myMemDsn.sprintf( "MEM:::DATAPOINTER=%lu,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0", ( long )theBlock, thePixelWidth, thePixelHeight, GDALGetDataTypeName(( GDALDataType )mGdalDataType[theBandNo-1] ) ); + //myMemDsn.sprintf( "MEM:::DATAPOINTER=%lu,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0", ( long )block, pixelWidth, pixelHeight, GDALGetDataTypeName(( GDALDataType )mGdalDataType[bandNo-1] ) ); char szPointer[64]; memset( szPointer, 0, sizeof( szPointer ) ); - CPLPrintPointer( szPointer, theBlock, sizeof( szPointer ) ); + CPLPrintPointer( szPointer, block, sizeof( szPointer ) ); - myMemDsn.sprintf( "MEM:::DATAPOINTER=%s,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0", szPointer, thePixelWidth, thePixelHeight, GDALGetDataTypeName(( GDALDataType )mGdalDataType[theBandNo-1] ) ); + myMemDsn.sprintf( "MEM:::DATAPOINTER=%s,PIXELS=%d,LINES=%d,BANDS=1,DATATYPE=%s,PIXELOFFSET=0,LINEOFFSET=0,BANDOFFSET=0", szPointer, pixelWidth, pixelHeight, GDALGetDataTypeName(( GDALDataType )mGdalDataType[bandNo-1] ) ); QgsDebugMsg( "Open GDAL MEM : " + myMemDsn ); @@ -675,15 +675,15 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, return; } - //GDALSetProjection( myGdalMemDataset, theDestCRS.toWkt().toLatin1().constData() ); + //GDALSetProjection( myGdalMemDataset, destCRS.toWkt().toLatin1().constData() ); double myMemGeoTransform[6]; - myMemGeoTransform[0] = theExtent.xMinimum(); // top left x - myMemGeoTransform[1] = theExtent.width() / thePixelWidth; // w-e pixel resolution + myMemGeoTransform[0] = extent.xMinimum(); // top left x + myMemGeoTransform[1] = extent.width() / pixelWidth; // w-e pixel resolution myMemGeoTransform[2] = 0; // rotation, 0 if image is "north up" - myMemGeoTransform[3] = theExtent.yMaximum(); // top left y + myMemGeoTransform[3] = extent.yMaximum(); // top left y myMemGeoTransform[4] = 0; // rotation, 0 if image is "north up" - myMemGeoTransform[5] = -1. * theExtent.height() / thePixelHeight; // n-s pixel resolution + myMemGeoTransform[5] = -1. * extent.height() / pixelHeight; // n-s pixel resolution double myGeoTransform[6]; GDALGetGeoTransform( mGdalDataset, myGeoTransform ); @@ -709,7 +709,7 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, myWarpOptions->nBandCount = 1; myWarpOptions->panSrcBands = ( int * ) qgsMalloc( sizeof( int ) * myWarpOptions->nBandCount ); - myWarpOptions->panSrcBands[0] = theBandNo; + myWarpOptions->panSrcBands[0] = bandNo; myWarpOptions->panDstBands = ( int * ) qgsMalloc( sizeof( int ) * myWarpOptions->nBandCount ); myWarpOptions->panDstBands[0] = 1; @@ -750,7 +750,7 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, myWarpOptions->padfDstNoDataReal = ( double * ) qgsMalloc( myWarpOptions->nBandCount * sizeof( double ) ); myWarpOptions->padfDstNoDataImag = ( double * ) qgsMalloc( myWarpOptions->nBandCount * sizeof( double ) ); - myWarpOptions->padfDstNoDataReal[0] = mNoDataValue[theBandNo-1]; + myWarpOptions->padfDstNoDataReal[0] = mNoDataValue[bandNo-1]; myWarpOptions->padfDstNoDataImag[0] = 0.0; GDALSetRasterNoDataValue( GDALGetRasterBand( myGdalMemDataset, @@ -776,7 +776,7 @@ void QgsGdalProvider::readBlock( int theBandNo, QgsRectangle const & theExtent, } CPLErrorReset(); CPLErr myErr; - myErr = myOperation.ChunkAndWarpImage( 0, 0, thePixelWidth, thePixelHeight ); + myErr = myOperation.ChunkAndWarpImage( 0, 0, pixelWidth, pixelHeight ); if ( myErr != CPLE_None ) { QMessageBox::warning( 0, QObject::tr( "Warning" ), @@ -823,14 +823,14 @@ double QgsGdalProvider::noDataValue() const #endif #if 0 -void QgsGdalProvider::computeMinMax( int theBandNo ) const +void QgsGdalProvider::computeMinMax( int bandNo ) const { - QgsDebugMsg( QString( "theBandNo = %1 mMinMaxComputed = %2" ).arg( theBandNo ).arg( mMinMaxComputed[theBandNo-1] ) ); - if ( mMinMaxComputed[theBandNo-1] ) + QgsDebugMsg( QString( "theBandNo = %1 mMinMaxComputed = %2" ).arg( bandNo ).arg( mMinMaxComputed[bandNo-1] ) ); + if ( mMinMaxComputed[bandNo-1] ) { return; } - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); int bGotMin, bGotMax; double adfMinMax[2]; adfMinMax[0] = GDALGetRasterMinimum( myGdalBand, &bGotMin ); @@ -839,19 +839,19 @@ void QgsGdalProvider::computeMinMax( int theBandNo ) const { GDALComputeRasterMinMax( myGdalBand, true, adfMinMax ); } - mMinimum[theBandNo-1] = adfMinMax[0]; - mMaximum[theBandNo-1] = adfMinMax[1]; + mMinimum[bandNo-1] = adfMinMax[0]; + mMaximum[bandNo-1] = adfMinMax[1]; } #endif /** - * @param theBandNumber the number of the band for which you want a color table - * @param theList a pointer the object that will hold the color table + * @param bandNumber the number of the band for which you want a color table + * @param list a pointer the object that will hold the color table * @return true of a color table was able to be read, false otherwise */ -QList QgsGdalProvider::colorTable( int theBandNumber )const +QList QgsGdalProvider::colorTable( int bandNumber )const { - return QgsGdalProviderBase::colorTable( mGdalDataset, theBandNumber ); + return QgsGdalProviderBase::colorTable( mGdalDataset, bandNumber ); } QgsCoordinateReferenceSystem QgsGdalProvider::crs() const @@ -880,7 +880,7 @@ int QgsGdalProvider::yBlockSize() const int QgsGdalProvider::xSize() const { return mWidth; } int QgsGdalProvider::ySize() const { return mHeight; } -QString QgsGdalProvider::generateBandName( int theBandNumber ) const +QString QgsGdalProvider::generateBandName( int bandNumber ) const { if ( strcmp( GDALGetDriverShortName( GDALGetDatasetDriver( mGdalDataset ) ), "netCDF" ) == 0 ) { @@ -912,7 +912,7 @@ QString QgsGdalProvider::generateBandName( int theBandNumber ) const if ( !dimExtraValues.isEmpty() ) { QStringList bandNameValues; - GDALRasterBandH gdalBand = GDALGetRasterBand( mGdalDataset, theBandNumber ); + GDALRasterBandH gdalBand = GDALGetRasterBand( mGdalDataset, bandNumber ); GDALmetadata = GDALGetMetadata( gdalBand, nullptr ); if ( GDALmetadata ) @@ -940,26 +940,26 @@ QString QgsGdalProvider::generateBandName( int theBandNumber ) const } if ( !bandNameValues.isEmpty() ) - return tr( "Band" ) + QStringLiteral( " %1 / %2" ) .arg( theBandNumber, 1 + ( int ) log10(( float ) bandCount() ), 10, QChar( '0' ) ).arg( bandNameValues.join( QStringLiteral( " / " ) ) ); + return tr( "Band" ) + QStringLiteral( " %1 / %2" ) .arg( bandNumber, 1 + ( int ) log10(( float ) bandCount() ), 10, QChar( '0' ) ).arg( bandNameValues.join( QStringLiteral( " / " ) ) ); } } } - return QgsRasterDataProvider::generateBandName( theBandNumber ); + return QgsRasterDataProvider::generateBandName( bandNumber ); } -QgsRasterIdentifyResult QgsGdalProvider::identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight , int /*theDpi*/ ) +QgsRasterIdentifyResult QgsGdalProvider::identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox, int width, int height , int /*dpi*/ ) { - QgsDebugMsg( QString( "thePoint = %1 %2" ).arg( thePoint.x(), 0, 'g', 10 ).arg( thePoint.y(), 0, 'g', 10 ) ); + QgsDebugMsg( QString( "thePoint = %1 %2" ).arg( point.x(), 0, 'g', 10 ).arg( point.y(), 0, 'g', 10 ) ); QMap results; - if ( theFormat != QgsRaster::IdentifyFormatValue ) + if ( format != QgsRaster::IdentifyFormatValue ) { return QgsRasterIdentifyResult( ERR( tr( "Format not supported" ) ) ); } - if ( !extent().contains( thePoint ) ) + if ( !extent().contains( point ) ) { // Outside the raster for ( int bandNo = 1; bandNo <= bandCount(); bandNo++ ) @@ -969,23 +969,23 @@ QgsRasterIdentifyResult QgsGdalProvider::identify( const QgsPoint & thePoint, Qg return QgsRasterIdentifyResult( QgsRaster::IdentifyFormatValue, results ); } - QgsRectangle myExtent = theExtent; - if ( myExtent.isEmpty() ) myExtent = extent(); + QgsRectangle finalExtent = boundingBox; + if ( finalExtent.isEmpty() ) finalExtent = extent(); - QgsDebugMsg( "myExtent = " + myExtent.toString() ); + QgsDebugMsg( "myExtent = " + finalExtent.toString() ); - if ( theWidth == 0 ) theWidth = xSize(); - if ( theHeight == 0 ) theHeight = ySize(); + if ( width == 0 ) width = xSize(); + if ( height == 0 ) height = ySize(); - QgsDebugMsg( QString( "theWidth = %1 theHeight = %2" ).arg( theWidth ).arg( theHeight ) ); + QgsDebugMsg( QString( "theWidth = %1 height = %2" ).arg( width ).arg( height ) ); // Calculate the row / column where the point falls - double xres = ( myExtent.width() ) / theWidth; - double yres = ( myExtent.height() ) / theHeight; + double xres = ( finalExtent.width() ) / width; + double yres = ( finalExtent.height() ) / height; // Offset, not the cell index -> floor - int col = ( int ) floor(( thePoint.x() - myExtent.xMinimum() ) / xres ); - int row = ( int ) floor(( myExtent.yMaximum() - thePoint.y() ) / yres ); + int col = ( int ) floor(( point.x() - finalExtent.xMinimum() ) / xres ); + int row = ( int ) floor(( finalExtent.yMaximum() - point.y() ) / yres ); QgsDebugMsg( QString( "row = %1 col = %2" ).arg( row ).arg( col ) ); @@ -993,18 +993,18 @@ QgsRasterIdentifyResult QgsGdalProvider::identify( const QgsPoint & thePoint, Qg int r = 0; int c = 0; - int width = 1; - int height = 1; + int w = 1; + int h = 1; - double xMin = myExtent.xMinimum() + col * xres; - double xMax = xMin + xres * width; - double yMax = myExtent.yMaximum() - row * yres; - double yMin = yMax - yres * height; + double xMin = finalExtent.xMinimum() + col * xres; + double xMax = xMin + xres * w; + double yMax = finalExtent.yMaximum() - row * yres; + double yMin = yMax - yres * h; QgsRectangle pixelExtent( xMin, yMin, xMax, yMax ); for ( int i = 1; i <= bandCount(); i++ ) { - QgsRasterBlock * myBlock = block( i, pixelExtent, width, height ); + QgsRasterBlock * myBlock = block( i, pixelExtent, w, h ); if ( !myBlock ) { @@ -1129,9 +1129,9 @@ int QgsGdalProvider::bandCount() const return 1; } -int QgsGdalProvider::colorInterpretation( int theBandNo ) const +int QgsGdalProvider::colorInterpretation( int bandNo ) const { - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); return colorInterpretationFromGdal( GDALGetRasterColorInterpretation( myGdalBand ) ); } @@ -1195,23 +1195,23 @@ QStringList QgsGdalProvider::subLayers( GDALDatasetH dataset ) return subLayers; } -bool QgsGdalProvider::hasHistogram( int theBandNo, - int theBinCount, - double theMinimum, double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ) +bool QgsGdalProvider::hasHistogram( int bandNo, + int binCount, + double minimum, double maximum, + const QgsRectangle & boundingBox, + int sampleSize, + bool includeOutOfRange ) { - QgsDebugMsg( QString( "theBandNo = %1 theBinCount = %2 theMinimum = %3 theMaximum = %4 theSampleSize = %5" ).arg( theBandNo ).arg( theBinCount ).arg( theMinimum ).arg( theMaximum ).arg( theSampleSize ) ); + QgsDebugMsg( QString( "theBandNo = %1 binCount = %2 minimum = %3 maximum = %4 sampleSize = %5" ).arg( bandNo ).arg( binCount ).arg( minimum ).arg( maximum ).arg( sampleSize ) ); // First check if cached in mHistograms - if ( QgsRasterDataProvider::hasHistogram( theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ) ) + if ( QgsRasterDataProvider::hasHistogram( bandNo, binCount, minimum, maximum, boundingBox, sampleSize, includeOutOfRange ) ) { return true; } QgsRasterHistogram myHistogram; - initHistogram( myHistogram, theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ); + initHistogram( myHistogram, bandNo, binCount, minimum, maximum, boundingBox, sampleSize, includeOutOfRange ); // If not cached, check if supported by GDAL if ( myHistogram.extent != extent() ) @@ -1220,8 +1220,8 @@ bool QgsGdalProvider::hasHistogram( int theBandNo, return false; } - if (( sourceHasNoDataValue( theBandNo ) && !useSourceNoDataValue( theBandNo ) ) || - !userNoDataValues( theBandNo ).isEmpty() ) + if (( sourceHasNoDataValue( bandNo ) && !useSourceNoDataValue( bandNo ) ) || + !userNoDataValues( bandNo ).isEmpty() ) { QgsDebugMsg( "Custom no data values -> GDAL histogram not sufficient." ); return false; @@ -1229,7 +1229,7 @@ bool QgsGdalProvider::hasHistogram( int theBandNo, QgsDebugMsg( "Looking for GDAL histogram" ); - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); if ( ! myGdalBand ) { return false; @@ -1278,17 +1278,17 @@ bool QgsGdalProvider::hasHistogram( int theBandNo, return true; } -QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, - int theBinCount, - double theMinimum, double theMaximum, - const QgsRectangle & theExtent, - int theSampleSize, - bool theIncludeOutOfRange ) +QgsRasterHistogram QgsGdalProvider::histogram( int bandNo, + int binCount, + double minimum, double maximum, + const QgsRectangle & boundingBox, + int sampleSize, + bool includeOutOfRange ) { - QgsDebugMsg( QString( "theBandNo = %1 theBinCount = %2 theMinimum = %3 theMaximum = %4 theSampleSize = %5" ).arg( theBandNo ).arg( theBinCount ).arg( theMinimum ).arg( theMaximum ).arg( theSampleSize ) ); + QgsDebugMsg( QString( "theBandNo = %1 binCount = %2 minimum = %3 maximum = %4 sampleSize = %5" ).arg( bandNo ).arg( binCount ).arg( minimum ).arg( maximum ).arg( sampleSize ) ); QgsRasterHistogram myHistogram; - initHistogram( myHistogram, theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ); + initHistogram( myHistogram, bandNo, binCount, minimum, maximum, boundingBox, sampleSize, includeOutOfRange ); // Find cached Q_FOREACH ( const QgsRasterHistogram& histogram, mHistograms ) @@ -1300,35 +1300,35 @@ QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, } } - if (( sourceHasNoDataValue( theBandNo ) && !useSourceNoDataValue( theBandNo ) ) || - !userNoDataValues( theBandNo ).isEmpty() ) + if (( sourceHasNoDataValue( bandNo ) && !useSourceNoDataValue( bandNo ) ) || + !userNoDataValues( bandNo ).isEmpty() ) { QgsDebugMsg( "Custom no data values, using generic histogram." ); - return QgsRasterDataProvider::histogram( theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ); + return QgsRasterDataProvider::histogram( bandNo, binCount, minimum, maximum, boundingBox, sampleSize, includeOutOfRange ); } if ( myHistogram.extent != extent() ) { QgsDebugMsg( "Not full extent, using generic histogram." ); - return QgsRasterDataProvider::histogram( theBandNo, theBinCount, theMinimum, theMaximum, theExtent, theSampleSize, theIncludeOutOfRange ); + return QgsRasterDataProvider::histogram( bandNo, binCount, minimum, maximum, boundingBox, sampleSize, includeOutOfRange ); } QgsDebugMsg( "Computing GDAL histogram" ); - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); int bApproxOK = false; - if ( theSampleSize > 0 ) + if ( sampleSize > 0 ) { // cast to double, integer could overflow - if ((( double )xSize() * ( double )ySize() / theSampleSize ) > 2 ) // not perfect + if ((( double )xSize() * ( double )ySize() / sampleSize ) > 2 ) // not perfect { QgsDebugMsg( "Approx" ); bApproxOK = true; } } - QgsDebugMsg( QString( "xSize() = %1 ySize() = %2 theSampleSize = %3 bApproxOK = %4" ).arg( xSize() ).arg( ySize() ).arg( theSampleSize ).arg( bApproxOK ) ); + QgsDebugMsg( QString( "xSize() = %1 ySize() = %2 sampleSize = %3 bApproxOK = %4" ).arg( xSize() ).arg( ySize() ).arg( sampleSize ).arg( bApproxOK ) ); QgsGdalProgress myProg; myProg.type = QgsRaster::ProgressHistogram; @@ -1336,10 +1336,10 @@ QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, #if 0 // this is the old method - double myerval = ( theBandStats.maximumValue - theBandStats.minimumValue ) / theBinCount; - GDALGetRasterHistogram( myGdalBand, theBandStats.minimumValue - 0.1*myerval, - theBandStats.maximumValue + 0.1*myerval, theBinCount, myHistogramArray, - theIgnoreOutOfRangeFlag, theHistogramEstimatedFlag, progressCallback, + double myerval = ( bandStats.maximumValue - bandStats.minimumValue ) / binCount; + GDALGetRasterHistogram( myGdalBand, bandStats.minimumValue - 0.1*myerval, + bandStats.maximumValue + 0.1*myerval, binCount, myHistogramArray, + ignoreOutOfRangeFlag, histogramEstimatedFlag, progressCallback, &myProg ); //this is the arg for our custom gdal progress callback #else // this is the new method, which gets a "Default" histogram @@ -1354,8 +1354,8 @@ QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, double myMaxVal = myHistogram.maximum; // unapply scale anf offset for min and max - double myScale = bandScale( theBandNo ); - double myOffset = bandOffset( theBandNo ); + double myScale = bandScale( bandNo ); + double myOffset = bandOffset( bandNo ); if ( myScale != 1.0 || myOffset != 0. ) { myMinVal = ( myHistogram.minimum - myOffset ) / myScale; @@ -1385,7 +1385,7 @@ QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, delete [] myHistogramArray; return; } - dfHalfBucket = ( myMaxVal - myMinVal ) / ( 2 * theBinCount ); + dfHalfBucket = ( myMaxVal - myMinVal ) / ( 2 * binCount ); myMinVal -= dfHalfBucket; myMaxVal += dfHalfBucket; } @@ -1394,7 +1394,7 @@ QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, GUIntBig* myHistogramArray = new GUIntBig[myHistogram.binCount]; CPLErr myError = GDALGetRasterHistogramEx( myGdalBand, myMinVal, myMaxVal, myHistogram.binCount, myHistogramArray, - theIncludeOutOfRange, bApproxOK, progressCallback, + includeOutOfRange, bApproxOK, progressCallback, &myProg ); //this is the arg for our custom gdal progress callback if ( myError != CE_None ) @@ -1430,14 +1430,14 @@ QgsRasterHistogram QgsGdalProvider::histogram( int theBandNo, * pyramids (.ovr) are to be created. If no parameter is passed in * it will default to nearest neighbor resampling. * - * @param theTryInternalFlag - Try to make the pyramids internal if supported (e.g. geotiff). If not supported it will revert to creating external .ovr file anyway. + * @param tryInternalFlag - Try to make the pyramids internal if supported (e.g. geotiff). If not supported it will revert to creating external .ovr file anyway. * @return null string on success, otherwise a string specifying error */ -QString QgsGdalProvider::buildPyramids( const QList & theRasterPyramidList, - const QString & theResamplingMethod, QgsRaster::RasterPyramidsFormat theFormat, - const QStringList & theConfigOptions ) +QString QgsGdalProvider::buildPyramids( const QList & rasterPyramidList, + const QString & resamplingMethod, QgsRaster::RasterPyramidsFormat format, + const QStringList & configOptions ) { - //TODO: Consider making theRasterPyramidList modifyable by this method to indicate if the pyramid exists after build attempt + //TODO: Consider making rasterPyramidList modifyable by this method to indicate if the pyramid exists after build attempt //without requiring the user to rebuild the pyramid list to get the updated information // @@ -1458,7 +1458,7 @@ QString QgsGdalProvider::buildPyramids( const QList & theRaste } // check if building internally - if ( theFormat == QgsRaster::PyramidsInternal ) + if ( format == QgsRaster::PyramidsInternal ) { // test if the file is writable @@ -1509,15 +1509,15 @@ QString QgsGdalProvider::buildPyramids( const QList & theRaste // are we using Erdas Imagine external overviews? QgsStringMap myConfigOptionsOld; myConfigOptionsOld[ QStringLiteral( "USE_RRD" )] = CPLGetConfigOption( "USE_RRD", "NO" ); - if ( theFormat == QgsRaster::PyramidsErdas ) + if ( format == QgsRaster::PyramidsErdas ) CPLSetConfigOption( "USE_RRD", "YES" ); else CPLSetConfigOption( "USE_RRD", "NO" ); // add any driver-specific configuration options, save values to be restored later - if ( theFormat != QgsRaster::PyramidsErdas && ! theConfigOptions.isEmpty() ) + if ( format != QgsRaster::PyramidsErdas && ! configOptions.isEmpty() ) { - Q_FOREACH ( const QString& option, theConfigOptions ) + Q_FOREACH ( const QString& option, configOptions ) { QStringList opt = option.split( '=' ); if ( opt.size() == 2 ) @@ -1545,8 +1545,8 @@ QString QgsGdalProvider::buildPyramids( const QList & theRaste QVector myOverviewLevelsVector; QList::const_iterator myRasterPyramidIterator; - for ( myRasterPyramidIterator = theRasterPyramidList.begin(); - myRasterPyramidIterator != theRasterPyramidList.end(); + for ( myRasterPyramidIterator = rasterPyramidList.begin(); + myRasterPyramidIterator != rasterPyramidList.end(); ++myRasterPyramidIterator ) { #ifdef QGISDEBUG @@ -1575,26 +1575,26 @@ QString QgsGdalProvider::buildPyramids( const QList & theRaste // resampling method is now passed directly, via QgsRasterDataProvider::pyramidResamplingArg() // average_mp and average_magphase have been removed from the gui - QByteArray ba = theResamplingMethod.toLocal8Bit(); - const char *theMethod = ba.data(); + QByteArray ba = resamplingMethod.toLocal8Bit(); + const char *method = ba.data(); //build the pyramid and show progress to console QgsDebugMsg( QString( "Building overviews at %1 levels using resampling method %2" - ).arg( myOverviewLevelsVector.size() ).arg( theMethod ) ); + ).arg( myOverviewLevelsVector.size() ).arg( method ) ); try { //build the pyramid and show progress to console QgsGdalProgress myProg; myProg.type = QgsRaster::ProgressPyramids; myProg.provider = this; - myError = GDALBuildOverviews( mGdalBaseDataset, theMethod, + myError = GDALBuildOverviews( mGdalBaseDataset, method, myOverviewLevelsVector.size(), myOverviewLevelsVector.data(), 0, nullptr, progressCallback, &myProg ); //this is the arg for the gdal progress callback if ( myError == CE_Failure || CPLGetLastErrorNo() == CPLE_NotSupported ) { - QgsDebugMsg( QString( "Building pyramids failed using resampling method [%1]" ).arg( theMethod ) ); + QgsDebugMsg( QString( "Building pyramids failed using resampling method [%1]" ).arg( method ) ); //something bad happenend //QString myString = QString (CPLGetLastError()); GDALClose( mGdalBaseDataset ); @@ -1644,7 +1644,7 @@ QString QgsGdalProvider::buildPyramids( const QList & theRaste // is called next time, it crashes somewhere in GDAL: // https://trac.osgeo.org/gdal/ticket/4831 // Crash can be avoided if dataset is reopened, fixed in GDAL 1.9.2 - if ( theFormat == QgsRaster::PyramidsInternal ) + if ( format == QgsRaster::PyramidsInternal ) { QgsDebugMsg( "Reopening dataset ..." ); //close the gdal dataset and reopen it in read only mode @@ -1829,14 +1829,14 @@ QStringList QgsGdalProvider::subLayers() const return mSubLayers; } -void QgsGdalProvider::emitProgress( int theType, double theProgress, const QString& theMessage ) +void QgsGdalProvider::emitProgress( int type, double value, const QString& message ) { - emit progress( theType, theProgress, theMessage ); + emit progress( type, value, message ); } -void QgsGdalProvider::emitProgressUpdate( int theProgress ) +void QgsGdalProvider::emitProgressUpdate( int progress ) { - emit progressUpdate( theProgress ); + emit progressUpdate( progress ); } /** @@ -1895,7 +1895,7 @@ static QString createFileFilter_( QString const &longName, QString const &glob ) return longName + " (" + glob.toLower() + ' ' + glob.toUpper() + ");;"; } // createFileFilter_ -void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString, QStringList & theExtensions, QStringList & theWildcards ) +void buildSupportedRasterFileFilterAndExtensions( QString & fileFiltersString, QStringList & extensions, QStringList & wildcards ) { // then iterate through all of the supported drivers, adding the @@ -1929,7 +1929,7 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString // driver, which will be found in DMD_LONGNAME, which will have the // same form. - theFileFiltersString = QLatin1String( "" ); + fileFiltersString = QLatin1String( "" ); QgsDebugMsg( QString( "GDAL driver count: %1" ).arg( GDALGetDriverCount() ) ); @@ -1999,7 +1999,7 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString { // XXX add check for SDTS; in that case we want (*CATD.DDF) QString glob = "*." + myGdalDriverExtension.replace( '/', QLatin1String( " *." ) ); - theExtensions << myGdalDriverExtension.remove( '/' ).remove( '*' ).remove( '.' ); + extensions << myGdalDriverExtension.remove( '/' ).remove( '*' ).remove( '.' ); // Add only the first JP2 driver found to the filter list (it's the one GDAL uses) if ( myGdalDriverDescription == QLatin1String( "JPEG2000" ) || myGdalDriverDescription.startsWith( QLatin1String( "JP2" ) ) ) // JP2ECW, JP2KAK, JP2MrSID @@ -2009,25 +2009,25 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString jp2Driver = myGdalDriver; // first JP2 driver found glob += QLatin1String( " *.j2k" ); // add alternate extension - theExtensions << QStringLiteral( "j2k" ); + extensions << QStringLiteral( "j2k" ); } else if ( myGdalDriverDescription == QLatin1String( "GTiff" ) ) { glob += QLatin1String( " *.tiff" ); - theExtensions << QStringLiteral( "tiff" ); + extensions << QStringLiteral( "tiff" ); } else if ( myGdalDriverDescription == QLatin1String( "JPEG" ) ) { glob += QLatin1String( " *.jpeg" ); - theExtensions << QStringLiteral( "jpeg" ); + extensions << QStringLiteral( "jpeg" ); } else if ( myGdalDriverDescription == QLatin1String( "VRT" ) ) { glob += QLatin1String( " *.ovr" ); - theExtensions << QStringLiteral( "ovr" ); + extensions << QStringLiteral( "ovr" ); } - theFileFiltersString += createFileFilter_( myGdalDriverLongName, glob ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, glob ); break; // ... to next driver, if any. } @@ -2054,8 +2054,8 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString // USGS DEMs use "*.dem" if ( myGdalDriverDescription.startsWith( QLatin1String( "USGSDEM" ) ) ) { - theFileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.dem" ) ); - theExtensions << QStringLiteral( "dem" ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.dem" ) ); + extensions << QStringLiteral( "dem" ); } else if ( myGdalDriverDescription.startsWith( QLatin1String( "DTED" ) ) ) { @@ -2063,30 +2063,30 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString QString glob = QStringLiteral( "*.dt0" ); glob += QLatin1String( " *.dt1" ); glob += QLatin1String( " *.dt2" ); - theFileFiltersString += createFileFilter_( myGdalDriverLongName, glob ); - theExtensions << QStringLiteral( "dt0" ) << QStringLiteral( "dt1" ) << QStringLiteral( "dt2" ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, glob ); + extensions << QStringLiteral( "dt0" ) << QStringLiteral( "dt1" ) << QStringLiteral( "dt2" ); } else if ( myGdalDriverDescription.startsWith( QLatin1String( "MrSID" ) ) ) { // MrSID use "*.sid" - theFileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.sid" ) ); - theExtensions << QStringLiteral( "sid" ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.sid" ) ); + extensions << QStringLiteral( "sid" ); } else if ( myGdalDriverDescription.startsWith( QLatin1String( "EHdr" ) ) ) { - theFileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.bil" ) ); - theExtensions << QStringLiteral( "bil" ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.bil" ) ); + extensions << QStringLiteral( "bil" ); } else if ( myGdalDriverDescription.startsWith( QLatin1String( "AIG" ) ) ) { - theFileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "hdr.adf" ) ); - theWildcards << QStringLiteral( "hdr.adf" ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "hdr.adf" ) ); + wildcards << QStringLiteral( "hdr.adf" ); } else if ( myGdalDriverDescription == QLatin1String( "HDF4" ) ) { // HDF4 extension missing in driver metadata - theFileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.hdf" ) ); - theExtensions << QStringLiteral( "hdf" ); + fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.hdf" ) ); + extensions << QStringLiteral( "hdf" ); } else { @@ -2097,29 +2097,29 @@ void buildSupportedRasterFileFilterAndExtensions( QString & theFileFiltersString } // each loaded GDAL driver // sort file filters alphabetically - QStringList filters = theFileFiltersString.split( QStringLiteral( ";;" ), QString::SkipEmptyParts ); + QStringList filters = fileFiltersString.split( QStringLiteral( ";;" ), QString::SkipEmptyParts ); filters.sort(); - theFileFiltersString = filters.join( QStringLiteral( ";;" ) ) + ";;"; + fileFiltersString = filters.join( QStringLiteral( ";;" ) ) + ";;"; // VSIFileHandler (see qgsogrprovider.cpp) - second QSettings settings; if ( settings.value( QStringLiteral( "/qgis/scanZipInBrowser2" ), "basic" ).toString() != QLatin1String( "no" ) ) { - theFileFiltersString.prepend( createFileFilter_( QObject::tr( "GDAL/OGR VSIFileHandler" ), QStringLiteral( "*.zip *.gz *.tar *.tar.gz *.tgz" ) ) ); - theExtensions << QStringLiteral( "zip" ) << QStringLiteral( "gz" ) << QStringLiteral( "tar" ) << QStringLiteral( "tar.gz" ) << QStringLiteral( "tgz" ); + fileFiltersString.prepend( createFileFilter_( QObject::tr( "GDAL/OGR VSIFileHandler" ), QStringLiteral( "*.zip *.gz *.tar *.tar.gz *.tgz" ) ) ); + extensions << QStringLiteral( "zip" ) << QStringLiteral( "gz" ) << QStringLiteral( "tar" ) << QStringLiteral( "tar.gz" ) << QStringLiteral( "tgz" ); } // can't forget the default case - first - theFileFiltersString.prepend( QObject::tr( "All files" ) + " (*);;" ); + fileFiltersString.prepend( QObject::tr( "All files" ) + " (*);;" ); // cleanup - if ( theFileFiltersString.endsWith( QLatin1String( ";;" ) ) ) theFileFiltersString.chop( 2 ); + if ( fileFiltersString.endsWith( QLatin1String( ";;" ) ) ) fileFiltersString.chop( 2 ); - QgsDebugMsg( "Raster filter list built: " + theFileFiltersString ); - QgsDebugMsg( "Raster extension list built: " + theExtensions.join( " " ) ); + QgsDebugMsg( "Raster filter list built: " + fileFiltersString ); + QgsDebugMsg( "Raster extension list built: " + extensions.join( " " ) ); } // buildSupportedRasterFileFilter_() -QGISEXTERN bool isValidRasterFileName( QString const & theFileNameQString, QString & retErrMsg ) +QGISEXTERN bool isValidRasterFileName( QString const & fileNameQString, QString & retErrMsg ) { GDALDatasetH myDataset; @@ -2127,7 +2127,7 @@ QGISEXTERN bool isValidRasterFileName( QString const & theFileNameQString, QStri CPLErrorReset(); - QString fileName = theFileNameQString; + QString fileName = fileNameQString; // Try to open using VSIFileHandler (see qgsogrprovider.cpp) // TODO suppress error messages and report in debug, like in OGR provider @@ -2140,7 +2140,7 @@ QGISEXTERN bool isValidRasterFileName( QString const & theFileNameQString, QStri } //open the file using gdal making sure we have handled locale properly - //myDataset = GDALOpen( QFile::encodeName( theFileNameQString ).constData(), GA_ReadOnly ); + //myDataset = GDALOpen( QFile::encodeName( fileNameQString ).constData(), GA_ReadOnly ); myDataset = QgsGdalProviderBase::gdalOpen( fileName.toUtf8().constData(), GA_ReadOnly ); if ( !myDataset ) { @@ -2167,24 +2167,24 @@ QGISEXTERN bool isValidRasterFileName( QString const & theFileNameQString, QStri } } -bool QgsGdalProvider::hasStatistics( int theBandNo, - int theStats, - const QgsRectangle & theExtent, - int theSampleSize ) +bool QgsGdalProvider::hasStatistics( int bandNo, + int stats, + const QgsRectangle & boundingBox, + int sampleSize ) { - QgsDebugMsg( QString( "theBandNo = %1 theSampleSize = %2" ).arg( theBandNo ).arg( theSampleSize ) ); + QgsDebugMsg( QString( "theBandNo = %1 sampleSize = %2" ).arg( bandNo ).arg( sampleSize ) ); // First check if cached in mStatistics - if ( QgsRasterDataProvider::hasStatistics( theBandNo, theStats, theExtent, theSampleSize ) ) + if ( QgsRasterDataProvider::hasStatistics( bandNo, stats, boundingBox, sampleSize ) ) { return true; } QgsRasterBandStats myRasterBandStats; - initStatistics( myRasterBandStats, theBandNo, theStats, theExtent, theSampleSize ); + initStatistics( myRasterBandStats, bandNo, stats, boundingBox, sampleSize ); - if (( sourceHasNoDataValue( theBandNo ) && !useSourceNoDataValue( theBandNo ) ) || - !userNoDataValues( theBandNo ).isEmpty() ) + if (( sourceHasNoDataValue( bandNo ) && !useSourceNoDataValue( bandNo ) ) || + !userNoDataValues( bandNo ).isEmpty() ) { QgsDebugMsg( "Custom no data values -> GDAL statistics not sufficient." ); return false; @@ -2196,7 +2196,7 @@ bool QgsGdalProvider::hasStatistics( int theBandNo, | QgsRasterBandStats::StdDev; if ( myRasterBandStats.extent != extent() || - ( theStats & ( ~supportedStats ) ) ) + ( stats & ( ~supportedStats ) ) ) { QgsDebugMsg( "Not supported by GDAL." ); return false; @@ -2204,16 +2204,16 @@ bool QgsGdalProvider::hasStatistics( int theBandNo, QgsDebugMsg( "Looking for GDAL statistics" ); - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); if ( ! myGdalBand ) { return false; } int bApproxOK = false; - if ( theSampleSize > 0 ) + if ( sampleSize > 0 ) { - if ((( double )xSize() * ( double )ySize() / theSampleSize ) > 2 ) // not perfect + if ((( double )xSize() * ( double )ySize() / sampleSize ) > 2 ) // not perfect { bApproxOK = true; } @@ -2227,10 +2227,10 @@ bool QgsGdalProvider::hasStatistics( int theBandNo, double *pdfMean = &dfMean; double *pdfStdDev = &dfStdDev; - if ( !( theStats & QgsRasterBandStats::Min ) ) pdfMin = nullptr; - if ( !( theStats & QgsRasterBandStats::Max ) ) pdfMax = nullptr; - if ( !( theStats & QgsRasterBandStats::Mean ) ) pdfMean = nullptr; - if ( !( theStats & QgsRasterBandStats::StdDev ) ) pdfStdDev = nullptr; + if ( !( stats & QgsRasterBandStats::Min ) ) pdfMin = nullptr; + if ( !( stats & QgsRasterBandStats::Max ) ) pdfMax = nullptr; + if ( !( stats & QgsRasterBandStats::Mean ) ) pdfMean = nullptr; + if ( !( stats & QgsRasterBandStats::StdDev ) ) pdfStdDev = nullptr; // try to fetch the cached stats (bForce=FALSE) // Unfortunately GDALGetRasterStatistics() does not work as expected according to @@ -2252,9 +2252,9 @@ bool QgsGdalProvider::hasStatistics( int theBandNo, return false; } -QgsRasterBandStats QgsGdalProvider::bandStatistics( int theBandNo, int theStats, const QgsRectangle & theExtent, int theSampleSize ) +QgsRasterBandStats QgsGdalProvider::bandStatistics( int bandNo, int stats, const QgsRectangle & boundingBox, int sampleSize ) { - QgsDebugMsg( QString( "theBandNo = %1 theSampleSize = %2" ).arg( theBandNo ).arg( theSampleSize ) ); + QgsDebugMsg( QString( "theBandNo = %1 sampleSize = %2" ).arg( bandNo ).arg( sampleSize ) ); // TODO: null values set on raster layer!!! @@ -2264,7 +2264,7 @@ QgsRasterBandStats QgsGdalProvider::bandStatistics( int theBandNo, int theStats, // otherwise we use GDAL (faster, cache) QgsRasterBandStats myRasterBandStats; - initStatistics( myRasterBandStats, theBandNo, theStats, theExtent, theSampleSize ); + initStatistics( myRasterBandStats, bandNo, stats, boundingBox, sampleSize ); Q_FOREACH ( const QgsRasterBandStats& stats, mStatistics ) { @@ -2277,37 +2277,37 @@ QgsRasterBandStats QgsGdalProvider::bandStatistics( int theBandNo, int theStats, // We cannot use GDAL stats if user disabled src no data value or set // custom no data values - if (( sourceHasNoDataValue( theBandNo ) && !useSourceNoDataValue( theBandNo ) ) || - !userNoDataValues( theBandNo ).isEmpty() ) + if (( sourceHasNoDataValue( bandNo ) && !useSourceNoDataValue( bandNo ) ) || + !userNoDataValues( bandNo ).isEmpty() ) { QgsDebugMsg( "Custom no data values, using generic statistics." ); - return QgsRasterDataProvider::bandStatistics( theBandNo, theStats, theExtent, theSampleSize ); + return QgsRasterDataProvider::bandStatistics( bandNo, stats, boundingBox, sampleSize ); } int supportedStats = QgsRasterBandStats::Min | QgsRasterBandStats::Max | QgsRasterBandStats::Range | QgsRasterBandStats::Mean | QgsRasterBandStats::StdDev; - QgsDebugMsg( QString( "theStats = %1 supportedStats = %2" ).arg( theStats, 0, 2 ).arg( supportedStats, 0, 2 ) ); + QgsDebugMsg( QString( "theStats = %1 supportedStats = %2" ).arg( stats, 0, 2 ).arg( supportedStats, 0, 2 ) ); if ( myRasterBandStats.extent != extent() || - ( theStats & ( ~supportedStats ) ) ) + ( stats & ( ~supportedStats ) ) ) { QgsDebugMsg( "Statistics not supported by provider, using generic statistics." ); - return QgsRasterDataProvider::bandStatistics( theBandNo, theStats, theExtent, theSampleSize ); + return QgsRasterDataProvider::bandStatistics( bandNo, stats, boundingBox, sampleSize ); } QgsDebugMsg( "Using GDAL statistics." ); - GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, theBandNo ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( mGdalDataset, bandNo ); //int bApproxOK = false; //as we asked for stats, don't get approx values // GDAL does not have sample size parameter in API, just bApproxOK or not, // we decide if approximation should be used according to // total size / sample size ration int bApproxOK = false; - if ( theSampleSize > 0 ) + if ( sampleSize > 0 ) { - if ((( double )xSize() * ( double )ySize() / theSampleSize ) > 2 ) // not perfect + if ((( double )xSize() * ( double )ySize() / sampleSize ) > 2 ) // not perfect { bApproxOK = true; } @@ -2349,7 +2349,7 @@ QgsRasterBandStats QgsGdalProvider::bandStatistics( int theBandNo, int theStats, // if stats are found populate the QgsRasterBandStats object if ( CE_None == myerval ) { - myRasterBandStats.bandNumber = theBandNo; + myRasterBandStats.bandNumber = bandNo; myRasterBandStats.range = pdfMax - pdfMin; myRasterBandStats.minimumValue = pdfMin; myRasterBandStats.maximumValue = pdfMax; @@ -2366,8 +2366,8 @@ QgsRasterBandStats QgsGdalProvider::bandStatistics( int theBandNo, int theStats, | QgsRasterBandStats::StdDev; // define if the band has scale and offset to apply - double myScale = bandScale( theBandNo ); - double myOffset = bandOffset( theBandNo ); + double myScale = bandScale( bandNo ); + double myOffset = bandOffset( bandNo ); if ( myScale != 1.0 || myOffset != 0.0 ) { if ( myScale < 0.0 ) @@ -2782,11 +2782,11 @@ bool QgsGdalProvider::remove() QFileDialog::getOpenFileNames() call. */ -QGISEXTERN void buildSupportedRasterFileFilter( QString & theFileFiltersString ) +QGISEXTERN void buildSupportedRasterFileFilter( QString & fileFiltersString ) { QStringList exts; QStringList wildcards; - buildSupportedRasterFileFilterAndExtensions( theFileFiltersString, exts, wildcards ); + buildSupportedRasterFileFilterAndExtensions( fileFiltersString, exts, wildcards ); } /** @@ -2895,12 +2895,12 @@ QString QgsGdalProvider::validateCreationOptions( const QStringList& createOptio } QString QgsGdalProvider::validatePyramidsConfigOptions( QgsRaster::RasterPyramidsFormat pyramidsFormat, - const QStringList & theConfigOptions, const QString & fileFormat ) + const QStringList & configOptions, const QString & fileFormat ) { // Erdas Imagine format does not support config options if ( pyramidsFormat == QgsRaster::PyramidsErdas ) { - if ( ! theConfigOptions.isEmpty() ) + if ( ! configOptions.isEmpty() ) return QStringLiteral( "Erdas Imagine format does not support config options" ); else return QString(); @@ -2917,7 +2917,7 @@ QString QgsGdalProvider::validatePyramidsConfigOptions( QgsRaster::RasterPyramid { // for gtiff external pyramids, validate gtiff-specific values // PHOTOMETRIC_OVERVIEW=YCBCR requires a source raster with only 3 bands (RGB) - if ( theConfigOptions.contains( QStringLiteral( "PHOTOMETRIC_OVERVIEW=YCBCR" ) ) ) + if ( configOptions.contains( QStringLiteral( "PHOTOMETRIC_OVERVIEW=YCBCR" ) ) ) { if ( GDALGetRasterCount( mGdalDataset ) != 3 ) return QStringLiteral( "PHOTOMETRIC_OVERVIEW=YCBCR requires a source raster with only 3 bands (RGB)" ); diff --git a/src/providers/gdal/qgsgdalprovider.h b/src/providers/gdal/qgsgdalprovider.h index 5654f30bb1a..0340c4ad260 100644 --- a/src/providers/gdal/qgsgdalprovider.h +++ b/src/providers/gdal/qgsgdalprovider.h @@ -81,7 +81,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase virtual QgsCoordinateReferenceSystem crs() const override; virtual QgsRectangle extent() const override; bool isValid() const override; - QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override; + QgsRasterIdentifyResult identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override; QString lastErrorTitle() override; QString lastError() override; int capabilities() const override; @@ -93,10 +93,10 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase int yBlockSize() const override; int xSize() const override; int ySize() const override; - QString generateBandName( int theBandNumber ) const override; + QString generateBandName( int bandNumber ) const override; // Reimplemented from QgsRasterDataProvider to bypass second resampling (more efficient for local file based sources) - QgsRasterBlock *block( int theBandNo, const QgsRectangle &theExtent, int theWidth, int theHeight, QgsRasterBlockFeedback* feedback = nullptr ) override; + QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) override; void readBlock( int bandNo, int xBlock, int yBlock, void *data ) override; void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override; @@ -107,44 +107,44 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase QStringList subLayers() const override; static QStringList subLayers( GDALDatasetH dataset ); - bool hasStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ) override; + bool hasStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0 ) override; - QgsRasterBandStats bandStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ) override; + QgsRasterBandStats bandStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0 ) override; - bool hasHistogram( int theBandNo, - int theBinCount = 0, - double theMinimum = std::numeric_limits::quiet_NaN(), - double theMaximum = std::numeric_limits::quiet_NaN(), - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0, - bool theIncludeOutOfRange = false ) override; + bool hasHistogram( int bandNo, + int binCount = 0, + double minimum = std::numeric_limits::quiet_NaN(), + double maximum = std::numeric_limits::quiet_NaN(), + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0, + bool includeOutOfRange = false ) override; - QgsRasterHistogram histogram( int theBandNo, - int theBinCount = 0, - double theMinimum = std::numeric_limits::quiet_NaN(), - double theMaximum = std::numeric_limits::quiet_NaN(), - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0, - bool theIncludeOutOfRange = false ) override; + QgsRasterHistogram histogram( int bandNo, + int binCount = 0, + double minimum = std::numeric_limits::quiet_NaN(), + double maximum = std::numeric_limits::quiet_NaN(), + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0, + bool includeOutOfRange = false ) override; - QString buildPyramids( const QList & theRasterPyramidList, - const QString & theResamplingMethod = "NEAREST", - QgsRaster::RasterPyramidsFormat theFormat = QgsRaster::PyramidsGTiff, - const QStringList & theCreateOptions = QStringList() ) override; + QString buildPyramids( const QList & rasterPyramidList, + const QString & resamplingMethod = "NEAREST", + QgsRaster::RasterPyramidsFormat format = QgsRaster::PyramidsGTiff, + const QStringList & createOptions = QStringList() ) override; QList buildPyramidList( QList overviewList = QList() ) override; //! \brief Close data set and release related data void closeDataset(); //! Emit a signal to notify of the progress event. - void emitProgress( int theType, double theProgress, const QString &theMessage ); - void emitProgressUpdate( int theProgress ); + void emitProgress( int type, double value, const QString &message ); + void emitProgressUpdate( int progress ); static QMap supportedMimes(); @@ -157,7 +157,7 @@ class QgsGdalProvider : public QgsRasterDataProvider, QgsGdalProviderBase QString validateCreationOptions( const QStringList& createOptions, const QString& format ) override; QString validatePyramidsConfigOptions( QgsRaster::RasterPyramidsFormat pyramidsFormat, - const QStringList & theConfigOptions, const QString & fileFormat ) override; + const QStringList & configOptions, const QString & fileFormat ) override; private: // update mode bool mUpdate; diff --git a/src/providers/gdal/qgsgdalproviderbase.cpp b/src/providers/gdal/qgsgdalproviderbase.cpp index 7d20880b1d1..27451a3c88b 100644 --- a/src/providers/gdal/qgsgdalproviderbase.cpp +++ b/src/providers/gdal/qgsgdalproviderbase.cpp @@ -32,22 +32,22 @@ QgsGdalProviderBase::QgsGdalProviderBase() } /** - * @param theBandNumber the number of the band for which you want a color table - * @param theList a pointer the object that will hold the color table + * @param bandNumber the number of the band for which you want a color table + * @param list a pointer the object that will hold the color table * @return true of a color table was able to be read, false otherwise */ -QList QgsGdalProviderBase::colorTable( GDALDatasetH gdalDataset, int theBandNumber )const +QList QgsGdalProviderBase::colorTable( GDALDatasetH gdalDataset, int bandNumber )const { QList ct; //Invalid band number, segfault prevention - if ( 0 >= theBandNumber ) + if ( 0 >= bandNumber ) { QgsDebugMsg( "Invalid parameter" ); return ct; } - GDALRasterBandH myGdalBand = GDALGetRasterBand( gdalDataset, theBandNumber ); + GDALRasterBandH myGdalBand = GDALGetRasterBand( gdalDataset, bandNumber ); GDALColorTableH myGdalColorTable = GDALGetRasterColorTable( myGdalBand ); if ( myGdalColorTable ) @@ -132,7 +132,7 @@ QList QgsGdalProviderBase::colorTable( GDALDa } else { - QgsDebugMsg( "No color table found for band " + QString::number( theBandNumber ) ); + QgsDebugMsg( "No color table found for band " + QString::number( bandNumber ) ); return ct; } @@ -140,9 +140,9 @@ QList QgsGdalProviderBase::colorTable( GDALDa return ct; } -Qgis::DataType QgsGdalProviderBase::dataTypeFromGdal( const GDALDataType theGdalDataType ) const +Qgis::DataType QgsGdalProviderBase::dataTypeFromGdal( const GDALDataType gdalDataType ) const { - switch ( theGdalDataType ) + switch ( gdalDataType ) { case GDT_Byte: return Qgis::Byte; diff --git a/src/providers/gdal/qgsgdalproviderbase.h b/src/providers/gdal/qgsgdalproviderbase.h index 9a82ee48a7d..f5405e14521 100644 --- a/src/providers/gdal/qgsgdalproviderbase.h +++ b/src/providers/gdal/qgsgdalproviderbase.h @@ -47,7 +47,7 @@ class QgsGdalProviderBase static int gdalGetOverviewCount( GDALRasterBandH hBand ); protected: - Qgis::DataType dataTypeFromGdal( const GDALDataType theGdalDataType ) const; + Qgis::DataType dataTypeFromGdal( const GDALDataType gdalDataType ) const; int colorInterpretationFromGdal( const GDALColorInterp gdalColorInterpretation ) const; diff --git a/src/providers/gpx/qgsgpxfeatureiterator.cpp b/src/providers/gpx/qgsgpxfeatureiterator.cpp index 169af61e49a..ba66c9b5b2a 100644 --- a/src/providers/gpx/qgsgpxfeatureiterator.cpp +++ b/src/providers/gpx/qgsgpxfeatureiterator.cpp @@ -207,7 +207,7 @@ bool QgsGPXFeatureIterator::readRoute( const QgsRoute& rte, QgsFeature& feature if ( rte.points.isEmpty() ) return false; - QgsGeometry* theGeometry = readRouteGeometry( rte ); + QgsGeometry* geometry = readRouteGeometry( rte ); if ( !mRequest.filterRect().isNull() ) { @@ -215,25 +215,25 @@ bool QgsGPXFeatureIterator::readRoute( const QgsRoute& rte, QgsFeature& feature if (( rte.xMax < rect.xMinimum() ) || ( rte.xMin > rect.xMaximum() ) || ( rte.yMax < rect.yMinimum() ) || ( rte.yMin > rect.yMaximum() ) ) { - delete theGeometry; + delete geometry; return false; } - if ( !theGeometry->intersects( rect ) ) //use geos for precise intersection test + if ( !geometry->intersects( rect ) ) //use geos for precise intersection test { - delete theGeometry; + delete geometry; return false; } } if ( !( mRequest.flags() & QgsFeatureRequest::NoGeometry ) ) { - feature.setGeometry( *theGeometry ); - delete theGeometry; + feature.setGeometry( *geometry ); + delete geometry; } else { - delete theGeometry; + delete geometry; } feature.setId( rte.id ); feature.setValid( true ); @@ -250,7 +250,7 @@ bool QgsGPXFeatureIterator::readTrack( const QgsTrack& trk, QgsFeature& feature { //QgsDebugMsg( QString( "GPX feature track segments: %1" ).arg( trk.segments.size() ) ); - QgsGeometry* theGeometry = readTrackGeometry( trk ); + QgsGeometry* geometry = readTrackGeometry( trk ); if ( !mRequest.filterRect().isNull() ) { @@ -258,25 +258,25 @@ bool QgsGPXFeatureIterator::readTrack( const QgsTrack& trk, QgsFeature& feature if (( trk.xMax < rect.xMinimum() ) || ( trk.xMin > rect.xMaximum() ) || ( trk.yMax < rect.yMinimum() ) || ( trk.yMin > rect.yMaximum() ) ) { - delete theGeometry; + delete geometry; return false; } - if ( !theGeometry->intersects( rect ) ) //use geos for precise intersection test + if ( !geometry->intersects( rect ) ) //use geos for precise intersection test { - delete theGeometry; + delete geometry; return false; } } if ( !( mRequest.flags() & QgsFeatureRequest::NoGeometry ) ) { - feature.setGeometry( *theGeometry ); - delete theGeometry; + feature.setGeometry( *geometry ); + delete geometry; } else { - delete theGeometry; + delete geometry; } feature.setId( trk.id ); feature.setValid( true ); diff --git a/src/providers/grass/qgsgrassprovidermodule.cpp b/src/providers/grass/qgsgrassprovidermodule.cpp index 23fabb660c8..87fbe4b6fde 100644 --- a/src/providers/grass/qgsgrassprovidermodule.cpp +++ b/src/providers/grass/qgsgrassprovidermodule.cpp @@ -1225,16 +1225,16 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Dir; } -QGISEXTERN QgsDataItem * dataItem( QString theDirPath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString dirPath, QgsDataItem* parentItem ) { if ( !QgsGrass::init() ) { return 0; } - if ( QgsGrass::isLocation( theDirPath ) ) + if ( QgsGrass::isLocation( dirPath ) ) { QString path; - QDir dir( theDirPath ); + QDir dir( dirPath ); QString dirName = dir.dirName(); if ( parentItem ) { @@ -1246,7 +1246,7 @@ QGISEXTERN QgsDataItem * dataItem( QString theDirPath, QgsDataItem* parentItem ) path = dir.path(); } path = path + "/" + "grass:" + dirName; - QgsGrassLocationItem * location = new QgsGrassLocationItem( parentItem, theDirPath, path ); + QgsGrassLocationItem * location = new QgsGrassLocationItem( parentItem, dirPath, path ); return location; } return 0; diff --git a/src/providers/grass/qgsgrassrasterprovider.cpp b/src/providers/grass/qgsgrassrasterprovider.cpp index afead4c9a37..3edc507f669 100644 --- a/src/providers/grass/qgsgrassrasterprovider.cpp +++ b/src/providers/grass/qgsgrassrasterprovider.cpp @@ -284,11 +284,11 @@ void QgsGrassRasterProvider::readBlock( int bandNo, QgsRectangle const & viewEx memcpy( block, data.data(), size ); } -QgsRasterBandStats QgsGrassRasterProvider::bandStatistics( int theBandNo, int theStats, const QgsRectangle & theExtent, int theSampleSize ) +QgsRasterBandStats QgsGrassRasterProvider::bandStatistics( int bandNo, int stats, const QgsRectangle & boundingBox, int sampleSize ) { - QgsDebugMsg( QString( "theBandNo = %1 theSampleSize = %2" ).arg( theBandNo ).arg( theSampleSize ) ); + QgsDebugMsg( QString( "theBandNo = %1 sampleSize = %2" ).arg( bandNo ).arg( sampleSize ) ); QgsRasterBandStats myRasterBandStats; - initStatistics( myRasterBandStats, theBandNo, theStats, theExtent, theSampleSize ); + initStatistics( myRasterBandStats, bandNo, stats, boundingBox, sampleSize ); Q_FOREACH ( const QgsRasterBandStats& stats, mStatistics ) { @@ -412,22 +412,22 @@ int QgsGrassRasterProvider::yBlockSize() const int QgsGrassRasterProvider::xSize() const { return mCols; } int QgsGrassRasterProvider::ySize() const { return mRows; } -QgsRasterIdentifyResult QgsGrassRasterProvider::identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight, int /*theDpi*/ ) +QgsRasterIdentifyResult QgsGrassRasterProvider::identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox, int width, int height, int /*dpi*/ ) { - Q_UNUSED( theExtent ); - Q_UNUSED( theWidth ); - Q_UNUSED( theHeight ); + Q_UNUSED( boundingBox ); + Q_UNUSED( width ); + Q_UNUSED( height ); QMap results; QMap noDataResults; noDataResults.insert( 1, QVariant() ); QgsRasterIdentifyResult noDataResult( QgsRaster::IdentifyFormatValue, results ); - if ( theFormat != QgsRaster::IdentifyFormatValue ) + if ( format != QgsRaster::IdentifyFormatValue ) { return QgsRasterIdentifyResult( QGS_ERROR( tr( "Format not supported" ) ) ); } - if ( !extent().contains( thePoint ) ) + if ( !extent().contains( point ) ) { return noDataResult; } @@ -437,7 +437,7 @@ QgsRasterIdentifyResult QgsGrassRasterProvider::identify( const QgsPoint & thePo // attention, value tool does his own tricks with grass identify() so it stops to refresh values outside extent or null values e.g. bool ok; - double value = mRasterValue.value( thePoint.x(), thePoint.y(), &ok ); + double value = mRasterValue.value( point.x(), point.y(), &ok ); if ( !ok ) { diff --git a/src/providers/grass/qgsgrassrasterprovider.h b/src/providers/grass/qgsgrassrasterprovider.h index 139b076c596..ac2da17183c 100644 --- a/src/providers/grass/qgsgrassrasterprovider.h +++ b/src/providers/grass/qgsgrassrasterprovider.h @@ -144,7 +144,7 @@ class GRASS_LIB_EXPORT QgsGrassRasterProvider : public QgsRasterDataProvider bool isValid() const override; - QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override; + QgsRasterIdentifyResult identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override; /** * \brief Returns the caption error text for the last error in this provider @@ -190,14 +190,14 @@ class GRASS_LIB_EXPORT QgsGrassRasterProvider : public QgsRasterDataProvider void readBlock( int bandNo, int xBlock, int yBlock, void *data ) override; void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override; - QgsRasterBandStats bandStatistics( int theBandNo, - int theStats = QgsRasterBandStats::All, - const QgsRectangle & theExtent = QgsRectangle(), - int theSampleSize = 0 ) override; + QgsRasterBandStats bandStatistics( int bandNo, + int stats = QgsRasterBandStats::All, + const QgsRectangle & boundingBox = QgsRectangle(), + int sampleSize = 0 ) override; QList colorTable( int bandNo )const override; - // void buildSupportedRasterFileFilter( QString & theFileFiltersString ); + // void buildSupportedRasterFileFilter( QString & fileFiltersString ); /** * Get metadata in a format suitable for feeding directly diff --git a/src/providers/mssql/qgsmssqlprovider.cpp b/src/providers/mssql/qgsmssqlprovider.cpp index dd5dde00c21..069b186c33a 100644 --- a/src/providers/mssql/qgsmssqlprovider.cpp +++ b/src/providers/mssql/qgsmssqlprovider.cpp @@ -1939,9 +1939,9 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Database; } -QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem ) +QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem ) { - Q_UNUSED( thePath ); + Q_UNUSED( path ); return new QgsMssqlRootItem( parentItem, QStringLiteral( "MSSQL" ), QStringLiteral( "mssql:" ) ); } diff --git a/src/providers/ogr/qgsogrdataitems.cpp b/src/providers/ogr/qgsogrdataitems.cpp index c23beee3f4b..7ba5ec3d131 100644 --- a/src/providers/ogr/qgsogrdataitems.cpp +++ b/src/providers/ogr/qgsogrdataitems.cpp @@ -204,17 +204,17 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::File | QgsDataProvider::Dir; } -QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString path, QgsDataItem* parentItem ) { - if ( thePath.isEmpty() ) + if ( path.isEmpty() ) return nullptr; - QgsDebugMsgLevel( "thePath: " + thePath, 2 ); + QgsDebugMsgLevel( "thePath: " + path, 2 ); // zip settings + info QSettings settings; QString scanZipSetting = settings.value( QStringLiteral( "/qgis/scanZipInBrowser2" ), "basic" ).toString(); - QString vsiPrefix = QgsZipItem::vsiPrefix( thePath ); + QString vsiPrefix = QgsZipItem::vsiPrefix( path ); bool is_vsizip = ( vsiPrefix == QLatin1String( "/vsizip/" ) ); bool is_vsigzip = ( vsiPrefix == QLatin1String( "/vsigzip/" ) ); bool is_vsitar = ( vsiPrefix == QLatin1String( "/vsitar/" ) ); @@ -236,16 +236,16 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) } // get suffix, removing .gz if present - QString tmpPath = thePath; //path used for testing, not for layer creation + QString tmpPath = path; //path used for testing, not for layer creation if ( is_vsigzip ) tmpPath.chop( 3 ); QFileInfo info( tmpPath ); QString suffix = info.suffix().toLower(); // extract basename with extension - info.setFile( thePath ); + info.setFile( path ); QString name = info.fileName(); - QgsDebugMsgLevel( "thePath= " + thePath + " tmpPath= " + tmpPath + " name= " + name + QgsDebugMsgLevel( "thePath= " + path + " tmpPath= " + tmpPath + " name= " + name + " suffix= " + suffix + " vsiPrefix= " + vsiPrefix, 3 ); // allow only normal files or VSIFILE items to continue @@ -257,13 +257,13 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // skip *.aux.xml files (GDAL auxiliary metadata files), // *.shp.xml files (ESRI metadata) and *.tif.xml files (TIFF metadata) // unless that extension is in the list (*.xml might be though) - if ( thePath.endsWith( QLatin1String( ".aux.xml" ), Qt::CaseInsensitive ) && + if ( path.endsWith( QLatin1String( ".aux.xml" ), Qt::CaseInsensitive ) && !myExtensions.contains( QStringLiteral( "aux.xml" ) ) ) return nullptr; - if ( thePath.endsWith( QLatin1String( ".shp.xml" ), Qt::CaseInsensitive ) && + if ( path.endsWith( QLatin1String( ".shp.xml" ), Qt::CaseInsensitive ) && !myExtensions.contains( QStringLiteral( "shp.xml" ) ) ) return nullptr; - if ( thePath.endsWith( QLatin1String( ".tif.xml" ), Qt::CaseInsensitive ) && + if ( path.endsWith( QLatin1String( ".tif.xml" ), Qt::CaseInsensitive ) && !myExtensions.contains( QStringLiteral( "tif.xml" ) ) ) return nullptr; @@ -288,7 +288,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // .dbf should probably appear if .shp is not present if ( suffix == QLatin1String( "dbf" ) ) { - QString pathShp = thePath.left( thePath.count() - 4 ) + ".shp"; + QString pathShp = path.left( path.count() - 4 ) + ".shp"; if ( QFileInfo::exists( pathShp ) ) return nullptr; } @@ -297,14 +297,14 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) if ( vsiPrefix != QLatin1String( "" ) ) { // add vsiPrefix to path if needed - if ( !thePath.startsWith( vsiPrefix ) ) - thePath = vsiPrefix + thePath; + if ( !path.startsWith( vsiPrefix ) ) + path = vsiPrefix + path; // if this is a /vsigzip/path_to_zip.zip/file_inside_zip remove the full path from the name // no need to change the name I believe #if 0 - if (( is_vsizip || is_vsitar ) && ( thePath != vsiPrefix + parentItem->path() ) ) + if (( is_vsizip || is_vsitar ) && ( path != vsiPrefix + parentItem->path() ) ) { - name = thePath; + name = path; name = name.replace( vsiPrefix + parentItem->path() + '/', "" ); } #endif @@ -325,7 +325,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // do not print errors, but write to debug CPLPushErrorHandler( CPLQuietErrorHandler ); CPLErrorReset(); - OGRDataSourceH hDataSource = OGR_Dr_Open( hDriver, thePath.toLocal8Bit().constData(), 0 ); + OGRDataSourceH hDataSource = OGR_Dr_Open( hDriver, path.toLocal8Bit().constData(), 0 ); CPLPopErrorHandler(); if ( ! hDataSource ) { @@ -337,7 +337,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) } // add the item // TODO: how to handle collections? - QgsLayerItem * item = new QgsOgrLayerItem( parentItem, name, thePath, thePath, QgsLayerItem::Vector ); + QgsLayerItem * item = new QgsOgrLayerItem( parentItem, name, path, path, QgsLayerItem::Vector ); if ( item ) return item; } @@ -348,7 +348,7 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // do not print errors, but write to debug CPLPushErrorHandler( CPLQuietErrorHandler ); CPLErrorReset(); - OGRDataSourceH hDataSource = QgsOgrProviderUtils::OGROpenWrapper( thePath.toUtf8().constData(), false, &hDriver ); + OGRDataSourceH hDataSource = QgsOgrProviderUtils::OGROpenWrapper( path.toUtf8().constData(), false, &hDriver ); CPLPopErrorHandler(); if ( ! hDataSource ) @@ -366,12 +366,12 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) if ( numLayers == 1 ) { QgsDebugMsgLevel( QString( "using name = %1" ).arg( name ), 2 ); - item = dataItemForLayer( parentItem, name, thePath, hDataSource, 0 ); + item = dataItemForLayer( parentItem, name, path, hDataSource, 0 ); } else if ( numLayers > 1 ) { QgsDebugMsgLevel( QString( "using name = %1" ).arg( name ), 2 ); - item = new QgsOgrDataCollectionItem( parentItem, name, thePath ); + item = new QgsOgrDataCollectionItem( parentItem, name, path ); } OGR_DS_Destroy( hDataSource ); diff --git a/src/providers/ogr/qgsogrprovider.cpp b/src/providers/ogr/qgsogrprovider.cpp index e796cad1d90..c5daccbbe89 100644 --- a/src/providers/ogr/qgsogrprovider.cpp +++ b/src/providers/ogr/qgsogrprovider.cpp @@ -663,35 +663,35 @@ QStringList QgsOgrProvider::subLayers() const { OGRLayerH layer = OGR_DS_GetLayer( ogrDataSource, i ); OGRFeatureDefnH fdef = OGR_L_GetLayerDefn( layer ); - QString theLayerName = QString::fromUtf8( OGR_FD_GetName( fdef ) ); + QString layerName = QString::fromUtf8( OGR_FD_GetName( fdef ) ); OGRwkbGeometryType layerGeomType = OGR_FD_GetGeomType( fdef ); // ignore this layer if a sublayer was requested and it is not this one if ( mIsSubLayer && - (( !mLayerName.isNull() && theLayerName != mLayerName ) || + (( !mLayerName.isNull() && layerName != mLayerName ) || ( mLayerName.isNull() && mLayerIndex >= 0 && i != ( unsigned int )mLayerIndex ) ) ) { - QgsDebugMsg( QString( "subLayers() ignoring layer #%1 (%2)" ).arg( i ).arg( theLayerName ) ); + QgsDebugMsg( QString( "subLayers() ignoring layer #%1 (%2)" ).arg( i ).arg( layerName ) ); continue; } - if ( !mIsSubLayer && ( theLayerName == QLatin1String( "layer_styles" ) || - theLayerName == QLatin1String( "qgis_projects" ) ) ) + if ( !mIsSubLayer && ( layerName == QLatin1String( "layer_styles" ) || + layerName == QLatin1String( "qgis_projects" ) ) ) { // Ignore layer_styles (coming from QGIS styling support) and // qgis_projects (coming from http://plugins.qgis.org/plugins/QgisGeopackage/) continue; } - QgsDebugMsg( QString( "id = %1 name = %2 layerGeomType = %3" ).arg( i ).arg( theLayerName ).arg( layerGeomType ) ); + QgsDebugMsg( QString( "id = %1 name = %2 layerGeomType = %3" ).arg( i ).arg( layerName ).arg( layerGeomType ) ); if ( wkbFlatten( layerGeomType ) != wkbUnknown ) { - int theLayerFeatureCount = OGR_L_GetFeatureCount( layer, 0 ); + int layerFeatureCount = OGR_L_GetFeatureCount( layer, 0 ); QString geom = ogrWkbGeometryTypeName( layerGeomType ); - mSubLayerList << QStringLiteral( "%1:%2:%3:%4" ).arg( i ).arg( theLayerName, theLayerFeatureCount == -1 ? tr( "Unknown" ) : QString::number( theLayerFeatureCount ), geom ); + mSubLayerList << QStringLiteral( "%1:%2:%3:%4" ).arg( i ).arg( layerName, layerFeatureCount == -1 ? tr( "Unknown" ) : QString::number( layerFeatureCount ), geom ); } else { @@ -745,7 +745,7 @@ QStringList QgsOgrProvider::subLayers() const { QString geom = ogrWkbGeometryTypeName(( bIs25D ) ? wkbSetZ( countIt.key() ) : countIt.key() ); - QString sl = QStringLiteral( "%1:%2:%3:%4" ).arg( i ).arg( theLayerName ).arg( fCount.value( countIt.key() ) ).arg( geom ); + QString sl = QStringLiteral( "%1:%2:%3:%4" ).arg( i ).arg( layerName ).arg( fCount.value( countIt.key() ) ).arg( geom ); QgsDebugMsg( "sub layer: " + sl ); mSubLayerList << sl; } @@ -1677,7 +1677,7 @@ bool QgsOgrProvider::changeGeometryValues( const QgsGeometryMap &geometry_map ) continue; } - OGRGeometryH theNewGeometry = nullptr; + OGRGeometryH newGeometry = nullptr; QByteArray wkb = it->exportToWkb(); // We might receive null geometries. It is ok, but don't go through the // OGR_G_CreateFromWkb() route then @@ -1686,28 +1686,28 @@ bool QgsOgrProvider::changeGeometryValues( const QgsGeometryMap &geometry_map ) //create an OGRGeometry if ( OGR_G_CreateFromWkb( reinterpret_cast( const_cast( wkb.constData() ) ), OGR_L_GetSpatialRef( ogrLayer ), - &theNewGeometry, + &newGeometry, wkb.length() ) != OGRERR_NONE ) { pushError( tr( "OGR error creating geometry for feature %1: %2" ).arg( it.key() ).arg( CPLGetLastErrorMsg() ) ); - OGR_G_DestroyGeometry( theNewGeometry ); - theNewGeometry = nullptr; + OGR_G_DestroyGeometry( newGeometry ); + newGeometry = nullptr; OGR_F_Destroy( theOGRFeature ); continue; } - if ( !theNewGeometry ) + if ( !newGeometry ) { pushError( tr( "OGR error in feature %1: geometry is null" ).arg( it.key() ) ); OGR_F_Destroy( theOGRFeature ); continue; } - theNewGeometry = ConvertGeometryIfNecessary( theNewGeometry ); + newGeometry = ConvertGeometryIfNecessary( newGeometry ); } //set the new geometry - if ( OGR_F_SetGeometryDirectly( theOGRFeature, theNewGeometry ) != OGRERR_NONE ) + if ( OGR_F_SetGeometryDirectly( theOGRFeature, newGeometry ) != OGRERR_NONE ) { pushError( tr( "OGR error setting geometry of feature %1: %2" ).arg( it.key() ).arg( CPLGetLastErrorMsg() ) ); // Shouldn't happen normally. If it happens, ownership of the geometry diff --git a/src/providers/oracle/qgsoracleconn.cpp b/src/providers/oracle/qgsoracleconn.cpp index 749d4cdad34..1f232b3cb4c 100644 --- a/src/providers/oracle/qgsoracleconn.cpp +++ b/src/providers/oracle/qgsoracleconn.cpp @@ -668,11 +668,11 @@ QStringList QgsOracleConn::connectionList() return settings.childGroups(); } -void QgsOracleConn::deleteConnection( QString theConnName ) +void QgsOracleConn::deleteConnection( QString connName ) { QSettings settings; - QString key = "/Oracle/connections/" + theConnName; + QString key = "/Oracle/connections/" + connName; settings.remove( key + "/host" ); settings.remove( key + "/port" ); settings.remove( key + "/database" ); @@ -702,13 +702,13 @@ void QgsOracleConn::setSelectedConnection( QString name ) return settings.setValue( "/Oracle/connections/selected", name ); } -QgsDataSourceUri QgsOracleConn::connUri( QString theConnName ) +QgsDataSourceUri QgsOracleConn::connUri( QString connName ) { - QgsDebugMsgLevel( "theConnName = " + theConnName, 3 ); + QgsDebugMsgLevel( "theConnName = " + connName, 3 ); QSettings settings; - QString key = "/Oracle/connections/" + theConnName; + QString key = "/Oracle/connections/" + connName; QString database = settings.value( key + "/database" ).toString(); @@ -748,34 +748,34 @@ QgsDataSourceUri QgsOracleConn::connUri( QString theConnName ) return uri; } -bool QgsOracleConn::userTablesOnly( QString theConnName ) +bool QgsOracleConn::userTablesOnly( QString connName ) { QSettings settings; - return settings.value( "/Oracle/connections/" + theConnName + "/userTablesOnly", false ).toBool(); + return settings.value( "/Oracle/connections/" + connName + "/userTablesOnly", false ).toBool(); } -bool QgsOracleConn::geometryColumnsOnly( QString theConnName ) +bool QgsOracleConn::geometryColumnsOnly( QString connName ) { QSettings settings; - return settings.value( "/Oracle/connections/" + theConnName + "/geometryColumnsOnly", true ).toBool(); + return settings.value( "/Oracle/connections/" + connName + "/geometryColumnsOnly", true ).toBool(); } -bool QgsOracleConn::allowGeometrylessTables( QString theConnName ) +bool QgsOracleConn::allowGeometrylessTables( QString connName ) { QSettings settings; - return settings.value( "/Oracle/connections/" + theConnName + "/allowGeometrylessTables", false ).toBool(); + return settings.value( "/Oracle/connections/" + connName + "/allowGeometrylessTables", false ).toBool(); } -bool QgsOracleConn::estimatedMetadata( QString theConnName ) +bool QgsOracleConn::estimatedMetadata( QString connName ) { QSettings settings; - return settings.value( "/Oracle/connections/" + theConnName + "/estimatedMetadata", false ).toBool(); + return settings.value( "/Oracle/connections/" + connName + "/estimatedMetadata", false ).toBool(); } -bool QgsOracleConn::onlyExistingTypes( QString theConnName ) +bool QgsOracleConn::onlyExistingTypes( QString connName ) { QSettings settings; - return settings.value( "/Oracle/connections/" + theConnName + "/onlyExistingTypes", false ).toBool(); + return settings.value( "/Oracle/connections/" + connName + "/onlyExistingTypes", false ).toBool(); } QString QgsOracleConn::databaseName( QString database, QString host, QString port ) diff --git a/src/providers/oracle/qgsoracleconn.h b/src/providers/oracle/qgsoracleconn.h index d1fa11d7106..70c6b21399e 100644 --- a/src/providers/oracle/qgsoracleconn.h +++ b/src/providers/oracle/qgsoracleconn.h @@ -155,14 +155,14 @@ class QgsOracleConn : public QObject static QStringList connectionList(); static QString selectedConnection(); - static void setSelectedConnection( QString theConnName ); - static QgsDataSourceUri connUri( QString theConnName ); - static bool userTablesOnly( QString theConnName ); - static bool geometryColumnsOnly( QString theConnName ); - static bool allowGeometrylessTables( QString theConnName ); - static bool estimatedMetadata( QString theConnName ); - static bool onlyExistingTypes( QString theConnName ); - static void deleteConnection( QString theConnName ); + static void setSelectedConnection( QString connName ); + static QgsDataSourceUri connUri( QString connName ); + static bool userTablesOnly( QString connName ); + static bool geometryColumnsOnly( QString connName ); + static bool allowGeometrylessTables( QString connName ); + static bool estimatedMetadata( QString connName ); + static bool onlyExistingTypes( QString connName ); + static void deleteConnection( QString connName ); static QString databaseName( QString database, QString host, QString port ); static QString toPoolName( const QgsDataSourceUri& uri ); diff --git a/src/providers/oracle/qgsoracleprovider.cpp b/src/providers/oracle/qgsoracleprovider.cpp index 6d9cd74f687..daa5b7f9e54 100644 --- a/src/providers/oracle/qgsoracleprovider.cpp +++ b/src/providers/oracle/qgsoracleprovider.cpp @@ -3090,9 +3090,9 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Database; } -QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem ) +QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem ) { - Q_UNUSED( thePath ); + Q_UNUSED( path ); return new QgsOracleRootItem( parentItem, "Oracle", "oracle:" ); } diff --git a/src/providers/ows/qgsowsdataitems.cpp b/src/providers/ows/qgsowsdataitems.cpp index ed5b90eb223..3c953a51419 100644 --- a/src/providers/ows/qgsowsdataitems.cpp +++ b/src/providers/ows/qgsowsdataitems.cpp @@ -255,9 +255,9 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Net; } -QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString path, QgsDataItem* parentItem ) { - if ( thePath.isEmpty() ) + if ( path.isEmpty() ) { return new QgsOWSRootItem( parentItem, QStringLiteral( "OWS" ), QStringLiteral( "ows:" ) ); } diff --git a/src/providers/postgres/qgspostgresconn.cpp b/src/providers/postgres/qgspostgresconn.cpp index 5aeec8742cb..1396e723163 100644 --- a/src/providers/postgres/qgspostgresconn.cpp +++ b/src/providers/postgres/qgspostgresconn.cpp @@ -48,11 +48,11 @@ QgsPostgresResult::~QgsPostgresResult() mRes = nullptr; } -QgsPostgresResult &QgsPostgresResult::operator=( PGresult * theResult ) +QgsPostgresResult &QgsPostgresResult::operator=( PGresult * result ) { if ( mRes ) ::PQclear( mRes ); - mRes = theResult; + mRes = result; return *this; } @@ -1712,13 +1712,13 @@ void QgsPostgresConn::setSelectedConnection( const QString& name ) return settings.setValue( QStringLiteral( "/PostgreSQL/connections/selected" ), name ); } -QgsDataSourceUri QgsPostgresConn::connUri( const QString& theConnName ) +QgsDataSourceUri QgsPostgresConn::connUri( const QString& connName ) { - QgsDebugMsg( "theConnName = " + theConnName ); + QgsDebugMsg( "theConnName = " + connName ); QSettings settings; - QString key = "/PostgreSQL/connections/" + theConnName; + QString key = "/PostgreSQL/connections/" + connName; QString service = settings.value( key + "/service" ).toString(); QString host = settings.value( key + "/host" ).toString(); @@ -1777,37 +1777,37 @@ QgsDataSourceUri QgsPostgresConn::connUri( const QString& theConnName ) return uri; } -bool QgsPostgresConn::publicSchemaOnly( const QString& theConnName ) +bool QgsPostgresConn::publicSchemaOnly( const QString& connName ) { QSettings settings; - return settings.value( "/PostgreSQL/connections/" + theConnName + "/publicOnly", false ).toBool(); + return settings.value( "/PostgreSQL/connections/" + connName + "/publicOnly", false ).toBool(); } -bool QgsPostgresConn::geometryColumnsOnly( const QString& theConnName ) +bool QgsPostgresConn::geometryColumnsOnly( const QString& connName ) { QSettings settings; - return settings.value( "/PostgreSQL/connections/" + theConnName + "/geometryColumnsOnly", false ).toBool(); + return settings.value( "/PostgreSQL/connections/" + connName + "/geometryColumnsOnly", false ).toBool(); } -bool QgsPostgresConn::dontResolveType( const QString& theConnName ) +bool QgsPostgresConn::dontResolveType( const QString& connName ) { QSettings settings; - return settings.value( "/PostgreSQL/connections/" + theConnName + "/dontResolveType", false ).toBool(); + return settings.value( "/PostgreSQL/connections/" + connName + "/dontResolveType", false ).toBool(); } -bool QgsPostgresConn::allowGeometrylessTables( const QString& theConnName ) +bool QgsPostgresConn::allowGeometrylessTables( const QString& connName ) { QSettings settings; - return settings.value( "/PostgreSQL/connections/" + theConnName + "/allowGeometrylessTables", false ).toBool(); + return settings.value( "/PostgreSQL/connections/" + connName + "/allowGeometrylessTables", false ).toBool(); } -void QgsPostgresConn::deleteConnection( const QString& theConnName ) +void QgsPostgresConn::deleteConnection( const QString& connName ) { QSettings settings; - QString key = "/PostgreSQL/connections/" + theConnName; + QString key = "/PostgreSQL/connections/" + connName; settings.remove( key + "/service" ); settings.remove( key + "/host" ); settings.remove( key + "/port" ); diff --git a/src/providers/postgres/qgspostgresconn.h b/src/providers/postgres/qgspostgresconn.h index 178bbad1215..ff22bfd6b41 100644 --- a/src/providers/postgres/qgspostgresconn.h +++ b/src/providers/postgres/qgspostgresconn.h @@ -151,10 +151,10 @@ struct QgsPostgresLayerProperty class QgsPostgresResult { public: - explicit QgsPostgresResult( PGresult *theResult = nullptr ) : mRes( theResult ) {} + explicit QgsPostgresResult( PGresult *result = nullptr ) : mRes( result ) {} ~QgsPostgresResult(); - QgsPostgresResult &operator=( PGresult *theResult ); + QgsPostgresResult &operator=( PGresult *result ); QgsPostgresResult &operator=( const QgsPostgresResult &src ); ExecStatusType PQresultStatus(); @@ -327,13 +327,13 @@ class QgsPostgresConn : public QObject static QStringList connectionList(); static QString selectedConnection(); - static void setSelectedConnection( const QString& theConnName ); - static QgsDataSourceUri connUri( const QString& theConnName ); - static bool publicSchemaOnly( const QString& theConnName ); - static bool geometryColumnsOnly( const QString& theConnName ); - static bool dontResolveType( const QString& theConnName ); - static bool allowGeometrylessTables( const QString& theConnName ); - static void deleteConnection( const QString& theConnName ); + static void setSelectedConnection( const QString& connName ); + static QgsDataSourceUri connUri( const QString& connName ); + static bool publicSchemaOnly( const QString& connName ); + static bool geometryColumnsOnly( const QString& connName ); + static bool dontResolveType( const QString& connName ); + static bool allowGeometrylessTables( const QString& connName ); + static void deleteConnection( const QString& connName ); //! A connection needs to be locked when it uses transactions, see QgsPostgresConn::{begin,commit,rollback} void lock() { mLock.lock(); } diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index d8b16ee88a4..92bb38cb793 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -4249,9 +4249,9 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Database; } -QGISEXTERN QgsDataItem *dataItem( QString thePath, QgsDataItem *parentItem ) +QGISEXTERN QgsDataItem *dataItem( QString path, QgsDataItem *parentItem ) { - Q_UNUSED( thePath ); + Q_UNUSED( path ); return new QgsPGRootItem( parentItem, QStringLiteral( "PostGIS" ), QStringLiteral( "pg:" ) ); } diff --git a/src/providers/spatialite/qgsspatialitedataitems.cpp b/src/providers/spatialite/qgsspatialitedataitems.cpp index ac48cafb40d..03ae503a81c 100644 --- a/src/providers/spatialite/qgsspatialitedataitems.cpp +++ b/src/providers/spatialite/qgsspatialitedataitems.cpp @@ -371,8 +371,8 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Database; } -QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString path, QgsDataItem* parentItem ) { - Q_UNUSED( thePath ); + Q_UNUSED( path ); return new QgsSLRootItem( parentItem, QStringLiteral( "SpatiaLite" ), QStringLiteral( "spatialite:" ) ); } diff --git a/src/providers/wcs/qgswcscapabilities.cpp b/src/providers/wcs/qgswcscapabilities.cpp index 0c29a92dce1..59ecd6e8f80 100644 --- a/src/providers/wcs/qgswcscapabilities.cpp +++ b/src/providers/wcs/qgswcscapabilities.cpp @@ -48,8 +48,8 @@ #include #endif -QgsWcsCapabilities::QgsWcsCapabilities( QgsDataSourceUri const &theUri ) - : mUri( theUri ) +QgsWcsCapabilities::QgsWcsCapabilities( QgsDataSourceUri const &uri ) + : mUri( uri ) , mCapabilitiesReply( nullptr ) , mCoverageCount( 0 ) , mCacheLoadControl( QNetworkRequest::PreferNetwork ) @@ -89,9 +89,9 @@ void QgsWcsCapabilities::parseUri() } // TODO: return if successful -void QgsWcsCapabilities::setUri( QgsDataSourceUri const &theUri ) +void QgsWcsCapabilities::setUri( QgsDataSourceUri const &uri ) { - mUri = theUri; + mUri = uri; clear(); @@ -1221,9 +1221,9 @@ void QgsWcsCapabilities::showMessageBox( const QString& title, const QString& te message->showMessage(); } -QgsWcsCoverageSummary QgsWcsCapabilities::coverage( QString const & theIdentifier ) +QgsWcsCoverageSummary QgsWcsCapabilities::coverage( QString const & identifier ) { - QgsWcsCoverageSummary * cp = coverageSummary( theIdentifier ); + QgsWcsCoverageSummary * cp = coverageSummary( identifier ); if ( cp ) return *cp; QgsWcsCoverageSummary c; @@ -1231,9 +1231,9 @@ QgsWcsCoverageSummary QgsWcsCapabilities::coverage( QString const & theIdentifie return c; } -QgsWcsCoverageSummary* QgsWcsCapabilities::coverageSummary( QString const & theIdentifier, QgsWcsCoverageSummary* parent ) +QgsWcsCoverageSummary* QgsWcsCapabilities::coverageSummary( QString const & identifier, QgsWcsCoverageSummary* parent ) { - QgsDebugMsgLevel( "theIdentifier = " + theIdentifier, 5 ); + QgsDebugMsgLevel( "theIdentifier = " + identifier, 5 ); if ( !parent ) { parent = &( mCapabilities.contents ); @@ -1241,14 +1241,14 @@ QgsWcsCoverageSummary* QgsWcsCapabilities::coverageSummary( QString const & theI for ( QVector::iterator c = parent->coverageSummary.begin(); c != parent->coverageSummary.end(); ++c ) { - if ( c->identifier == theIdentifier ) + if ( c->identifier == identifier ) { return c; } else { // search sub coverages - QgsWcsCoverageSummary * sc = coverageSummary( theIdentifier, c ); + QgsWcsCoverageSummary * sc = coverageSummary( identifier, c ); if ( sc ) { return sc; diff --git a/src/providers/wcs/qgswcscapabilities.h b/src/providers/wcs/qgswcscapabilities.h index 597f6945106..79a49addf1b 100644 --- a/src/providers/wcs/qgswcscapabilities.h +++ b/src/providers/wcs/qgswcscapabilities.h @@ -97,13 +97,13 @@ class QgsWcsCapabilities : public QObject * otherwise we contact the host directly. * */ - explicit QgsWcsCapabilities( QgsDataSourceUri const & theUri ); + explicit QgsWcsCapabilities( QgsDataSourceUri const & uri ); QgsWcsCapabilities(); ~QgsWcsCapabilities(); - void setUri( QgsDataSourceUri const &theUri ); + void setUri( QgsDataSourceUri const &uri ); QgsWcsCapabilitiesProperty capabilities(); @@ -123,7 +123,7 @@ class QgsWcsCapabilities : public QObject void coverageParents( QMap &parents, QMap &parentNames ) const; //! Get coverage summary for identifier - QgsWcsCoverageSummary coverage( QString const & theIdentifier ); + QgsWcsCoverageSummary coverage( QString const & identifier ); //! Get list of all coverage summaries QList coverages(); @@ -218,10 +218,10 @@ class QgsWcsCapabilities : public QObject signals: //! \brief emit a signal to notify of a progress event - void progressChanged( int theProgress, int theTotalSteps ); + void progressChanged( int progress, int totalSteps ); //! \brief emit a signal to be caught by qgisapp and display a msg on status bar - void statusChanged( QString const & theStatusQString ); + void statusChanged( QString const & statusQString ); void downloadFinished(); @@ -233,7 +233,7 @@ class QgsWcsCapabilities : public QObject void parseUri(); //! Get coverage summary for identifier - QgsWcsCoverageSummary * coverageSummary( QString const & theIdentifier, QgsWcsCoverageSummary* parent = nullptr ); + QgsWcsCoverageSummary * coverageSummary( QString const & identifier, QgsWcsCoverageSummary* parent = nullptr ); // ! Get list of all sub coverages QList coverageSummaries( QgsWcsCoverageSummary* parent = nullptr ); diff --git a/src/providers/wcs/qgswcsdataitems.cpp b/src/providers/wcs/qgswcsdataitems.cpp index 7eae84e786a..2b72eb1b8c7 100644 --- a/src/providers/wcs/qgswcsdataitems.cpp +++ b/src/providers/wcs/qgswcsdataitems.cpp @@ -280,23 +280,23 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Net; } -QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString path, QgsDataItem* parentItem ) { - QgsDebugMsg( "thePath = " + thePath ); - if ( thePath.isEmpty() ) + QgsDebugMsg( "thePath = " + path ); + if ( path.isEmpty() ) { // Top level WCS return new QgsWCSRootItem( parentItem, QStringLiteral( "WCS" ), QStringLiteral( "wcs:" ) ); } // path schema: wcs:/connection name (used by OWS) - if ( thePath.startsWith( QLatin1String( "wcs:/" ) ) ) + if ( path.startsWith( QLatin1String( "wcs:/" ) ) ) { - QString connectionName = thePath.split( '/' ).last(); + QString connectionName = path.split( '/' ).last(); if ( QgsOwsConnection::connectionList( QStringLiteral( "WCS" ) ).contains( connectionName ) ) { QgsOwsConnection connection( QStringLiteral( "WCS" ), connectionName ); - return new QgsWCSConnectionItem( parentItem, QStringLiteral( "WCS" ), thePath, connection.uri().encodedUri() ); + return new QgsWCSConnectionItem( parentItem, QStringLiteral( "WCS" ), path, connection.uri().encodedUri() ); } } diff --git a/src/providers/wcs/qgswcsprovider.cpp b/src/providers/wcs/qgswcsprovider.cpp index a249ba1249e..bdf8cbc5440 100644 --- a/src/providers/wcs/qgswcsprovider.cpp +++ b/src/providers/wcs/qgswcsprovider.cpp @@ -634,8 +634,8 @@ void QgsWcsProvider::getCache( int bandNo, QgsRectangle const & viewExtent, int if ( !mIgnoreAxisOrientation && ( mCapabilities.version().startsWith( QLatin1String( "1.1" ) ) ) ) { //create CRS from string - QgsCoordinateReferenceSystem theSrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( crs ); - if ( theSrs.isValid() && theSrs.hasAxisInverted() ) + QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( crs ); + if ( srs.isValid() && srs.hasAxisInverted() ) { changeXY = true; } @@ -809,7 +809,7 @@ void QgsWcsProvider::getCache( int bandNo, QgsRectangle const & viewExtent, int // For stats only, maybe change QgsRasterDataProvider::bandStatistics() to // use standard readBlock with extent -void QgsWcsProvider::readBlock( int theBandNo, int xBlock, int yBlock, void *block ) +void QgsWcsProvider::readBlock( int bandNo, int xBlock, int yBlock, void *block ) { QgsDebugMsg( QString( "xBlock = %1 yBlock = %2" ).arg( xBlock ).arg( yBlock ) ); @@ -829,7 +829,7 @@ void QgsWcsProvider::readBlock( int theBandNo, int xBlock, int yBlock, void *blo QgsRectangle extent( xMin, yMin, xMax, yMax ); - readBlock( theBandNo, extent, mXBlockSize, mYBlockSize, block, nullptr ); + readBlock( bandNo, extent, mXBlockSize, mYBlockSize, block, nullptr ); } @@ -895,9 +895,9 @@ void QgsWcsProvider::clearCache() const QgsDebugMsg( "Cleared" ); } -QList QgsWcsProvider::colorTable( int theBandNumber )const +QList QgsWcsProvider::colorTable( int bandNumber )const { - return mColorTables.value( theBandNumber - 1 ); + return mColorTables.value( bandNumber - 1 ); } int QgsWcsProvider::colorInterpretation( int bandNo ) const @@ -1338,19 +1338,19 @@ QString QgsWcsProvider:: htmlRow( const QString &text1, const QString &text2 ) return "
" + htmlCell( text1 ) + htmlCell( text2 ) + ""; } -QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight , int /*theDpi*/ ) +QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox, int width, int height , int /*dpi*/ ) { - QgsDebugMsg( QString( "thePoint = %1 %2" ).arg( thePoint.x(), 0, 'g', 10 ).arg( thePoint.y(), 0, 'g', 10 ) ); - QgsDebugMsg( QString( "theWidth = %1 theHeight = %2" ).arg( theWidth ).arg( theHeight ) ); - QgsDebugMsg( "theExtent = " + theExtent.toString() ); + QgsDebugMsg( QString( "thePoint = %1 %2" ).arg( point.x(), 0, 'g', 10 ).arg( point.y(), 0, 'g', 10 ) ); + QgsDebugMsg( QString( "theWidth = %1 height = %2" ).arg( width ).arg( height ) ); + QgsDebugMsg( "boundingBox = " + boundingBox.toString() ); QMap results; - if ( theFormat != QgsRaster::IdentifyFormatValue ) + if ( format != QgsRaster::IdentifyFormatValue ) { return QgsRasterIdentifyResult( QGS_ERROR( tr( "Format not supported" ) ) ); } - if ( !extent().contains( thePoint ) ) + if ( !extent().contains( point ) ) { // Outside the raster for ( int i = 1; i <= bandCount(); i++ ) @@ -1360,7 +1360,7 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs return QgsRasterIdentifyResult( QgsRaster::IdentifyFormatValue, results ); } - QgsRectangle myExtent = theExtent; + QgsRectangle finalExtent = boundingBox; int maxSize = 2000; int cacheSize = 1000; // tile cache size if context is not defined or small double relResTol = 0.1; // relative resolution tolerance (10%) @@ -1373,8 +1373,8 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs // if context size is to large we have to cut it, in that case caching big // big part does not make sense - if ( myExtent.isEmpty() || theWidth == 0 || theHeight == 0 || - theWidth > maxSize || theHeight > maxSize ) + if ( finalExtent.isEmpty() || width == 0 || height == 0 || + width > maxSize || height > maxSize ) { // context missing, use a small area around the point and highest resolution if known @@ -1405,24 +1405,24 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs yRes = xRes; } - theWidth = cacheSize; - theHeight = cacheSize; + width = cacheSize; + height = cacheSize; - myExtent = QgsRectangle( thePoint.x() - xRes * theWidth / 2, - thePoint.y() - yRes * theHeight / 2, - thePoint.x() + xRes * theWidth / 2, - thePoint.y() + yRes * theHeight / 2 ); + finalExtent = QgsRectangle( point.x() - xRes * width / 2, + point.y() - yRes * height / 2, + point.x() + xRes * width / 2, + point.y() + yRes * height / 2 ); double xResDiff = qAbs( mCachedViewExtent.width() / mCachedViewWidth - xRes ); double yResDiff = qAbs( mCachedViewExtent.height() / mCachedViewHeight - yRes ); if ( !mCachedGdalDataset || - !mCachedViewExtent.contains( thePoint ) || + !mCachedViewExtent.contains( point ) || mCachedViewWidth == 0 || mCachedViewHeight == 0 || xResDiff / xRes > relResTol || yResDiff / yRes > relResTol ) { - getCache( 1, myExtent, theWidth, theHeight ); + getCache( 1, finalExtent, width, height ); } } else @@ -1431,14 +1431,14 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs QgsDebugMsg( "Using context extent and resolution" ); // To use the cache it is sufficient to have point within cache and // similar resolution - double xRes = myExtent.width() / theWidth; - double yRes = myExtent.height() / theHeight; - QgsDebugMsg( QString( "width = %1 height = %2 xRes = %3 yRes = %4" ).arg( myExtent.width() ).arg( myExtent.height() ).arg( xRes ).arg( yRes ) ); + double xRes = finalExtent.width() / width; + double yRes = finalExtent.height() / height; + QgsDebugMsg( QString( "width = %1 height = %2 xRes = %3 yRes = %4" ).arg( finalExtent.width() ).arg( finalExtent.height() ).arg( xRes ).arg( yRes ) ); double xResDiff = qAbs( mCachedViewExtent.width() / mCachedViewWidth - xRes ); double yResDiff = qAbs( mCachedViewExtent.height() / mCachedViewHeight - yRes ); QgsDebugMsg( QString( "xRes diff = %1 yRes diff = %2 relative xResDiff = %3 relative yResDiff = %4" ).arg( xResDiff ).arg( yResDiff ).arg( xResDiff / xRes ).arg( yResDiff / yRes ) ); if ( !mCachedGdalDataset || - !mCachedViewExtent.contains( thePoint ) || + !mCachedViewExtent.contains( point ) || xResDiff / xRes > relResTol || yResDiff / yRes > relResTol ) { @@ -1446,33 +1446,33 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs // features from WMS. In such case we enlarge the extent to get data cached // for next queries around. // BTW: UMN Mapserver (6.0.3) seems to be buggy with 1x1 pixels request (returns 'no data' value - if ( theWidth < cacheSize ) + if ( width < cacheSize ) { - int buffer = ( cacheSize - theWidth ) / 2; - theWidth += 2 * buffer; - myExtent.setXMinimum( myExtent.xMinimum() - xRes * buffer ); - myExtent.setXMaximum( myExtent.xMaximum() + xRes * buffer ); + int buffer = ( cacheSize - width ) / 2; + width += 2 * buffer; + finalExtent.setXMinimum( finalExtent.xMinimum() - xRes * buffer ); + finalExtent.setXMaximum( finalExtent.xMaximum() + xRes * buffer ); } - if ( theHeight < cacheSize ) + if ( height < cacheSize ) { - int buffer = ( cacheSize - theHeight ) / 2; - theHeight += 2 * buffer; - myExtent.setYMinimum( myExtent.yMinimum() - yRes * buffer ); - myExtent.setYMaximum( myExtent.yMaximum() + yRes * buffer ); + int buffer = ( cacheSize - height ) / 2; + height += 2 * buffer; + finalExtent.setYMinimum( finalExtent.yMinimum() - yRes * buffer ); + finalExtent.setYMaximum( finalExtent.yMaximum() + yRes * buffer ); } - getCache( 1, myExtent, theWidth, theHeight ); + getCache( 1, finalExtent, width, height ); } } if ( !mCachedGdalDataset || - !mCachedViewExtent.contains( thePoint ) ) + !mCachedViewExtent.contains( point ) ) { return QgsRasterIdentifyResult( QGS_ERROR( tr( "Read data error" ) ) ); } - double x = thePoint.x(); - double y = thePoint.y(); + double x = point.x(); + double y = point.y(); // Calculate the row / column where the point falls double xRes = mCachedViewExtent.width() / mCachedViewWidth; diff --git a/src/providers/wcs/qgswcsprovider.h b/src/providers/wcs/qgswcsprovider.h index 865731d1b72..20b83c85f26 100644 --- a/src/providers/wcs/qgswcsprovider.h +++ b/src/providers/wcs/qgswcsprovider.h @@ -144,7 +144,7 @@ class QgsWcsProvider : public QgsRasterDataProvider, QgsGdalProviderBase void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override; - void readBlock( int theBandNo, int xBlock, int yBlock, void *block ) override; + void readBlock( int bandNo, int xBlock, int yBlock, void *block ) override; //! Download cache void getCache( int bandNo, QgsRectangle const & viewExtent, int width, int height, QString crs = QString(), QgsRasterBlockFeedback* feedback = nullptr ) const; @@ -171,7 +171,7 @@ class QgsWcsProvider : public QgsRasterDataProvider, QgsGdalProviderBase int xSize() const override; int ySize() const override; QString metadata() override; - QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override; + QgsRasterIdentifyResult identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override; QString lastErrorTitle() override; QString lastError() override; QString lastErrorFormat() override; @@ -195,7 +195,7 @@ class QgsWcsProvider : public QgsRasterDataProvider, QgsGdalProviderBase signals: //! \brief emit a signal to notify of a progress event - void progressChanged( int theProgress, int theTotalSteps ); + void progressChanged( int progress, int totalSteps ); void dataChanged(); diff --git a/src/providers/wfs/qgswfscapabilities.cpp b/src/providers/wfs/qgswfscapabilities.cpp index 6257a690354..44da69c9fdc 100644 --- a/src/providers/wfs/qgswfscapabilities.cpp +++ b/src/providers/wfs/qgswfscapabilities.cpp @@ -25,8 +25,8 @@ #include #include -QgsWfsCapabilities::QgsWfsCapabilities( const QString& theUri ) - : QgsWfsRequest( theUri ) +QgsWfsCapabilities::QgsWfsCapabilities( const QString& uri ) + : QgsWfsRequest( uri ) { connect( this, SIGNAL( downloadFinished() ), this, SLOT( capabilitiesReplyFinished() ) ); } diff --git a/src/providers/wfs/qgswfscapabilities.h b/src/providers/wfs/qgswfscapabilities.h index 9e3a029a72f..129de5dae4a 100644 --- a/src/providers/wfs/qgswfscapabilities.h +++ b/src/providers/wfs/qgswfscapabilities.h @@ -26,7 +26,7 @@ class QgsWfsCapabilities : public QgsWfsRequest { Q_OBJECT public: - explicit QgsWfsCapabilities( const QString& theUri ); + explicit QgsWfsCapabilities( const QString& uri ); virtual ~QgsWfsCapabilities(); //! start network connection to get capabilities diff --git a/src/providers/wfs/qgswfsconnection.cpp b/src/providers/wfs/qgswfsconnection.cpp index 842b7d77606..cbda952c6b2 100644 --- a/src/providers/wfs/qgswfsconnection.cpp +++ b/src/providers/wfs/qgswfsconnection.cpp @@ -19,8 +19,8 @@ #include -QgsWfsConnection::QgsWfsConnection( const QString & theConnName ) - : QgsOwsConnection( QStringLiteral( "WFS" ), theConnName ) +QgsWfsConnection::QgsWfsConnection( const QString & connName ) + : QgsOwsConnection( QStringLiteral( "WFS" ), connName ) { const QString& key = QgsWFSConstants::CONNECTIONS_WFS + mConnName; diff --git a/src/providers/wfs/qgswfsconnection.h b/src/providers/wfs/qgswfsconnection.h index 95b7c2c2d39..cb6d7989f72 100644 --- a/src/providers/wfs/qgswfsconnection.h +++ b/src/providers/wfs/qgswfsconnection.h @@ -24,9 +24,9 @@ class QgsWfsConnection : public QgsOwsConnection /** * Constructor - * @param theConnName connection name + * @param connName connection name */ - explicit QgsWfsConnection( const QString & theConnName ); + explicit QgsWfsConnection( const QString & connName ); static QStringList connectionList(); diff --git a/src/providers/wfs/qgswfsdataitems.cpp b/src/providers/wfs/qgswfsdataitems.cpp index 7ddbfa9e211..d6aa5f2e0fd 100644 --- a/src/providers/wfs/qgswfsdataitems.cpp +++ b/src/providers/wfs/qgswfsdataitems.cpp @@ -197,22 +197,22 @@ QGISEXTERN int dataCapabilities() return QgsDataProvider::Net; } -QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) +QGISEXTERN QgsDataItem * dataItem( QString path, QgsDataItem* parentItem ) { - QgsDebugMsg( "thePath = " + thePath ); - if ( thePath.isEmpty() ) + QgsDebugMsg( "thePath = " + path ); + if ( path.isEmpty() ) { return new QgsWfsRootItem( parentItem, QStringLiteral( "WFS" ), QStringLiteral( "wfs:" ) ); } // path schema: wfs:/connection name (used by OWS) - if ( thePath.startsWith( QLatin1String( "wfs:/" ) ) ) + if ( path.startsWith( QLatin1String( "wfs:/" ) ) ) { - QString connectionName = thePath.split( '/' ).last(); + QString connectionName = path.split( '/' ).last(); if ( QgsWfsConnection::connectionList().contains( connectionName ) ) { QgsWfsConnection connection( connectionName ); - return new QgsWfsConnectionItem( parentItem, QStringLiteral( "WFS" ), thePath, connection.uri().uri() ); + return new QgsWfsConnectionItem( parentItem, QStringLiteral( "WFS" ), path, connection.uri().uri() ); } } diff --git a/src/providers/wfs/qgswfsdescribefeaturetype.cpp b/src/providers/wfs/qgswfsdescribefeaturetype.cpp index bd7aba60b3e..6cf1392785e 100644 --- a/src/providers/wfs/qgswfsdescribefeaturetype.cpp +++ b/src/providers/wfs/qgswfsdescribefeaturetype.cpp @@ -15,8 +15,8 @@ #include "qgswfsdescribefeaturetype.h" -QgsWFSDescribeFeatureType::QgsWFSDescribeFeatureType( const QString& theUri ) - : QgsWfsRequest( theUri ) +QgsWFSDescribeFeatureType::QgsWFSDescribeFeatureType( const QString& uri ) + : QgsWfsRequest( uri ) { } diff --git a/src/providers/wfs/qgswfsdescribefeaturetype.h b/src/providers/wfs/qgswfsdescribefeaturetype.h index 16e82489118..4f8cf0ce3ef 100644 --- a/src/providers/wfs/qgswfsdescribefeaturetype.h +++ b/src/providers/wfs/qgswfsdescribefeaturetype.h @@ -22,7 +22,7 @@ class QgsWFSDescribeFeatureType : public QgsWfsRequest { Q_OBJECT public: - explicit QgsWFSDescribeFeatureType( const QString& theUri ); + explicit QgsWFSDescribeFeatureType( const QString& uri ); //! Issue the request bool requestFeatureType( const QString& WFSVersion, const QString& typeName ); diff --git a/src/providers/wfs/qgswfsrequest.cpp b/src/providers/wfs/qgswfsrequest.cpp index 296df455290..f61f79cb8a8 100644 --- a/src/providers/wfs/qgswfsrequest.cpp +++ b/src/providers/wfs/qgswfsrequest.cpp @@ -25,8 +25,8 @@ #include #include // just for testin file:// fake_qgis_http_endpoint hack -QgsWfsRequest::QgsWfsRequest( const QString& theUri ) - : mUri( theUri ) +QgsWfsRequest::QgsWfsRequest( const QString& uri ) + : mUri( uri ) , mReply( nullptr ) , mErrorCode( QgsWfsRequest::NoError ) , mIsAborted( false ) @@ -34,7 +34,7 @@ QgsWfsRequest::QgsWfsRequest( const QString& theUri ) , mTimedout( false ) , mGotNonEmptyResponse( false ) { - QgsDebugMsg( "theUri = " + theUri ); + QgsDebugMsg( "theUri = " + uri ); connect( QgsNetworkAccessManager::instance(), SIGNAL( requestTimedOut( QNetworkReply* ) ), this, SLOT( requestTimedOut( QNetworkReply* ) ) ); } diff --git a/src/providers/wfs/qgswfsrequest.h b/src/providers/wfs/qgswfsrequest.h index 4304eeb1349..eef7f479f40 100644 --- a/src/providers/wfs/qgswfsrequest.h +++ b/src/providers/wfs/qgswfsrequest.h @@ -27,7 +27,7 @@ class QgsWfsRequest : public QObject { Q_OBJECT public: - explicit QgsWfsRequest( const QString& theUri ); + explicit QgsWfsRequest( const QString& uri ); virtual ~QgsWfsRequest(); diff --git a/src/providers/wfs/qgswfstransactionrequest.cpp b/src/providers/wfs/qgswfstransactionrequest.cpp index 60cdf188644..14e83244576 100644 --- a/src/providers/wfs/qgswfstransactionrequest.cpp +++ b/src/providers/wfs/qgswfstransactionrequest.cpp @@ -16,8 +16,8 @@ #include "qgswfstransactionrequest.h" #include "qgslogger.h" -QgsWFSTransactionRequest::QgsWFSTransactionRequest( const QString& theUri ) - : QgsWfsRequest( theUri ) +QgsWFSTransactionRequest::QgsWFSTransactionRequest( const QString& uri ) + : QgsWfsRequest( uri ) { } diff --git a/src/providers/wfs/qgswfstransactionrequest.h b/src/providers/wfs/qgswfstransactionrequest.h index b2c23859e20..7fa4de19313 100644 --- a/src/providers/wfs/qgswfstransactionrequest.h +++ b/src/providers/wfs/qgswfstransactionrequest.h @@ -22,7 +22,7 @@ class QgsWFSTransactionRequest : public QgsWfsRequest { Q_OBJECT public: - explicit QgsWFSTransactionRequest( const QString& theUri ); + explicit QgsWFSTransactionRequest( const QString& uri ); //! Send the transaction document and return the server response bool send( const QDomDocument& doc, QDomDocument& serverResponse ); diff --git a/src/providers/wms/qgstilescalewidget.cpp b/src/providers/wms/qgstilescalewidget.cpp index 33e2cab001e..7edc157df18 100644 --- a/src/providers/wms/qgstilescalewidget.cpp +++ b/src/providers/wms/qgstilescalewidget.cpp @@ -121,7 +121,7 @@ void QgsTileScaleWidget::showTileScale( QMainWindow *mainWindow ) QgsDebugMsg( QString( "canvas:%1 [%2]" ).arg(( quint64 ) canvas, 0, 16 ).arg( canvas ? canvas->objectName() : "" ) ); if ( !canvas ) { - QgsDebugMsg( "map canvas theMapCanvas not found" ); + QgsDebugMsg( "map canvas mapCanvas not found" ); return; } diff --git a/src/providers/wms/qgswmscapabilities.cpp b/src/providers/wms/qgswmscapabilities.cpp index e21919ba0f7..31e566a819a 100644 --- a/src/providers/wms/qgswmscapabilities.cpp +++ b/src/providers/wms/qgswmscapabilities.cpp @@ -1875,8 +1875,8 @@ bool QgsWmsCapabilities::shouldInvertAxisOrientation( const QString& ogcCrs ) } //create CRS from string - QgsCoordinateReferenceSystem theSrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( ogcCrs ); - if ( theSrs.isValid() && theSrs.hasAxisInverted() ) + QgsCoordinateReferenceSystem srs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( ogcCrs ); + if ( srs.isValid() && srs.hasAxisInverted() ) { changeXY = true; } diff --git a/src/providers/wms/qgswmscapabilities.h b/src/providers/wms/qgswmscapabilities.h index aa5900ddf58..1f2bb624f1c 100644 --- a/src/providers/wms/qgswmscapabilities.h +++ b/src/providers/wms/qgswmscapabilities.h @@ -782,7 +782,7 @@ class QgsWmsCapabilitiesDownload : public QObject signals: //! \brief emit a signal to be caught by qgisapp and display a msg on status bar - void statusChanged( QString const & theStatusQString ); + void statusChanged( QString const & statusQString ); //! \brief emit a signal once the download is finished void downloadFinished(); diff --git a/src/providers/wms/qgswmsconnection.cpp b/src/providers/wms/qgswmsconnection.cpp index c46354223ac..3484c613703 100644 --- a/src/providers/wms/qgswmsconnection.cpp +++ b/src/providers/wms/qgswmsconnection.cpp @@ -36,10 +36,10 @@ #include #include -QgsWMSConnection::QgsWMSConnection( const QString& theConnName ) - : mConnName( theConnName ) +QgsWMSConnection::QgsWMSConnection( const QString& connName ) + : mConnName( connName ) { - QgsDebugMsg( "theConnName = " + theConnName ); + QgsDebugMsg( "theConnName = " + connName ); QSettings settings; diff --git a/src/providers/wms/qgswmsconnection.h b/src/providers/wms/qgswmsconnection.h index 4820c30ea16..bc358d79813 100644 --- a/src/providers/wms/qgswmsconnection.h +++ b/src/providers/wms/qgswmsconnection.h @@ -31,7 +31,7 @@ class QgsWMSConnection : public QObject public: //! Constructor - explicit QgsWMSConnection( const QString& theConnName ); + explicit QgsWMSConnection( const QString& connName ); ~QgsWMSConnection(); diff --git a/src/providers/wms/qgswmsdataitems.cpp b/src/providers/wms/qgswmsdataitems.cpp index eb273a8edf2..23ab8d1e69c 100644 --- a/src/providers/wms/qgswmsdataitems.cpp +++ b/src/providers/wms/qgswmsdataitems.cpp @@ -443,22 +443,22 @@ QGISEXTERN QgsWMSSourceSelect * selectWidget( QWidget * parent, Qt::WindowFlags } -QgsDataItem* QgsWmsDataItemProvider::createDataItem( const QString& thePath, QgsDataItem *parentItem ) +QgsDataItem* QgsWmsDataItemProvider::createDataItem( const QString& path, QgsDataItem *parentItem ) { - QgsDebugMsg( "thePath = " + thePath ); - if ( thePath.isEmpty() ) + QgsDebugMsg( "thePath = " + path ); + if ( path.isEmpty() ) { return new QgsWMSRootItem( parentItem, QStringLiteral( "WMS" ), QStringLiteral( "wms:" ) ); } // path schema: wms:/connection name (used by OWS) - if ( thePath.startsWith( QLatin1String( "wms:/" ) ) ) + if ( path.startsWith( QLatin1String( "wms:/" ) ) ) { - QString connectionName = thePath.split( '/' ).last(); + QString connectionName = path.split( '/' ).last(); if ( QgsWMSConnection::connectionList().contains( connectionName ) ) { QgsWMSConnection connection( connectionName ); - return new QgsWMSConnectionItem( parentItem, QStringLiteral( "WMS" ), thePath, connection.uri().encodedUri() ); + return new QgsWMSConnectionItem( parentItem, QStringLiteral( "WMS" ), path, connection.uri().encodedUri() ); } } diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp index f4a517a3c02..df0c433d7de 100644 --- a/src/providers/wms/qgswmsprovider.cpp +++ b/src/providers/wms/qgswmsprovider.cpp @@ -2364,38 +2364,38 @@ QString QgsWmsProvider::metadata() return metadata; } -QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent, int theWidth, int theHeight , int /*theDpi*/ ) +QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox, int width, int height , int /*dpi*/ ) { - QgsDebugMsg( QString( "theFormat = %1" ).arg( theFormat ) ); + QgsDebugMsg( QString( "format = %1" ).arg( format ) ); - QString format; - format = mCaps.mIdentifyFormats.value( theFormat ); - if ( format.isEmpty() ) + QString formatStr; + formatStr = mCaps.mIdentifyFormats.value( format ); + if ( formatStr.isEmpty() ) { return QgsRasterIdentifyResult( QGS_ERROR( tr( "Format not supported" ) ) ); } - QgsDebugMsg( QString( "theFormat = %1 format = %2" ).arg( theFormat ).arg( format ) ); + QgsDebugMsg( QString( "format = %1 format = %2" ).arg( format ).arg( formatStr ) ); QMap results; - if ( !extent().contains( thePoint ) ) + if ( !extent().contains( point ) ) { results.insert( 1, "" ); - return QgsRasterIdentifyResult( theFormat, results ); + return QgsRasterIdentifyResult( format, results ); } - QgsRectangle myExtent = theExtent; + QgsRectangle myExtent = boundingBox; if ( !myExtent.isEmpty() ) { - // we cannot reliably identify WMS if theExtent is specified but theWidth or theHeight + // we cannot reliably identify WMS if boundingBox is specified but width or theHeight // are not, because we don't know original resolution - if ( theWidth == 0 || theHeight == 0 ) + if ( width == 0 || height == 0 ) { return QgsRasterIdentifyResult( QGS_ERROR( tr( "Context not fully specified (extent was defined but width and/or height was not)." ) ) ); } } - else // context (theExtent, theWidth, theHeight) not defined + else // context (boundingBox, width, height) not defined { // We don't know original source resolution, so we take some small extent around the point. @@ -2432,43 +2432,43 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs // 1x1 should be sufficient but at least we know that GDAL ECW was very unefficient // so we use 2x2 (until we find that it is too small for some server) - theWidth = theHeight = 2; + width = height = 2; - myExtent = QgsRectangle( thePoint.x() - xRes, thePoint.y() - yRes, - thePoint.x() + xRes, thePoint.y() + yRes ); + myExtent = QgsRectangle( point.x() - xRes, point.y() - yRes, + point.x() + xRes, point.y() + yRes ); } // Point in BBOX/WIDTH/HEIGHT coordinates // No need to fiddle with extent origin not covered by layer extent, I believe - double xRes = myExtent.width() / theWidth; - double yRes = myExtent.height() / theHeight; + double xRes = myExtent.width() / width; + double yRes = myExtent.height() / height; // Mapserver (6.0.3, for example) does not seem to work with 1x1 pixel box // (seems to be a different issue, not the slownes of GDAL with ECW mentioned above) // so we have to enlarge it a bit - if ( theWidth == 1 ) + if ( width == 1 ) { - theWidth += 1; + width += 1; myExtent.setXMaximum( myExtent.xMaximum() + xRes ); } - if ( theHeight == 1 ) + if ( height == 1 ) { - theHeight += 1; + height += 1; myExtent.setYMaximum( myExtent.yMaximum() + yRes ); } QgsDebugMsg( "myExtent = " + myExtent.toString() ); - QgsDebugMsg( QString( "theWidth = %1 theHeight = %2" ).arg( theWidth ).arg( theHeight ) ); + QgsDebugMsg( QString( "theWidth = %1 height = %2" ).arg( width ).arg( height ) ); QgsDebugMsg( QString( "xRes = %1 yRes = %2" ).arg( xRes ).arg( yRes ) ); - QgsPoint point; - point.setX( floor(( thePoint.x() - myExtent.xMinimum() ) / xRes ) ); - point.setY( floor(( myExtent.yMaximum() - thePoint.y() ) / yRes ) ); + QgsPoint finalPoint; + finalPoint.setX( floor(( finalPoint.x() - myExtent.xMinimum() ) / xRes ) ); + finalPoint.setY( floor(( myExtent.yMaximum() - finalPoint.y() ) / yRes ) ); - QgsDebugMsg( QString( "point = %1 %2" ).arg( point.x() ).arg( point.y() ) ); + QgsDebugMsg( QString( "point = %1 %2" ).arg( finalPoint.x() ).arg( finalPoint.y() ) ); - QgsDebugMsg( QString( "recalculated orig point (corner) = %1 %2" ).arg( myExtent.xMinimum() + point.x()*xRes ).arg( myExtent.yMaximum() - point.y()*yRes ) ); + QgsDebugMsg( QString( "recalculated orig point (corner) = %1 %2" ).arg( myExtent.xMinimum() + finalPoint.x()*xRes ).arg( myExtent.yMaximum() - finalPoint.y()*yRes ) ); // Collect which layers to query on //according to the WMS spec for 1.3, the order of x - and y - coordinates is inverted for geographical CRS @@ -2527,23 +2527,23 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs setQueryItem( requestUrl, QStringLiteral( "REQUEST" ), QStringLiteral( "GetFeatureInfo" ) ); setQueryItem( requestUrl, QStringLiteral( "BBOX" ), bbox ); setSRSQueryItem( requestUrl ); - setQueryItem( requestUrl, QStringLiteral( "WIDTH" ), QString::number( theWidth ) ); - setQueryItem( requestUrl, QStringLiteral( "HEIGHT" ), QString::number( theHeight ) ); + setQueryItem( requestUrl, QStringLiteral( "WIDTH" ), QString::number( width ) ); + setQueryItem( requestUrl, QStringLiteral( "HEIGHT" ), QString::number( height ) ); setQueryItem( requestUrl, QStringLiteral( "LAYERS" ), *layers ); setQueryItem( requestUrl, QStringLiteral( "STYLES" ), *styles ); setFormatQueryItem( requestUrl ); setQueryItem( requestUrl, QStringLiteral( "QUERY_LAYERS" ), *layers ); - setQueryItem( requestUrl, QStringLiteral( "INFO_FORMAT" ), format ); + setQueryItem( requestUrl, QStringLiteral( "INFO_FORMAT" ), formatStr ); if ( mCaps.mCapabilities.version == QLatin1String( "1.3.0" ) || mCaps.mCapabilities.version == QLatin1String( "1.3" ) ) { - setQueryItem( requestUrl, QStringLiteral( "I" ), QString::number( point.x() ) ); - setQueryItem( requestUrl, QStringLiteral( "J" ), QString::number( point.y() ) ); + setQueryItem( requestUrl, QStringLiteral( "I" ), QString::number( finalPoint.x() ) ); + setQueryItem( requestUrl, QStringLiteral( "J" ), QString::number( finalPoint.y() ) ); } else { - setQueryItem( requestUrl, QStringLiteral( "X" ), QString::number( point.x() ) ); - setQueryItem( requestUrl, QStringLiteral( "Y" ), QString::number( point.y() ) ); + setQueryItem( requestUrl, QStringLiteral( "X" ), QString::number( finalPoint.x() ) ); + setQueryItem( requestUrl, QStringLiteral( "Y" ), QString::number( finalPoint.y() ) ); } if ( mSettings.mFeatureCount > 0 ) @@ -2558,7 +2558,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs else if ( mTileLayer && mTileLayer->tileMode == WMTS ) { // WMTS FeatureInfo - double vres = theExtent.width() / theWidth; + double vres = boundingBox.width() / width; double tres = vres; const QgsWmtsTileMatrix *tm = nullptr; @@ -2595,10 +2595,10 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs ); QgsDebugMsg( QString( "view extent: %1,%2 %3x%4 res:%5" ) - .arg( qgsDoubleToString( theExtent.xMinimum() ), - qgsDoubleToString( theExtent.yMinimum() ) ) - .arg( theExtent.width() ) - .arg( theExtent.height() ) + .arg( qgsDoubleToString( boundingBox.xMinimum() ), + qgsDoubleToString( boundingBox.yMinimum() ) ) + .arg( boundingBox.width() ) + .arg( boundingBox.height() ) .arg( vres, 0, 'f' ) ); @@ -2614,19 +2614,19 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs double thMap = tm->tileHeight * tres; QgsDebugMsg( QString( "tile map size: %1,%2" ).arg( qgsDoubleToString( twMap ), qgsDoubleToString( thMap ) ) ); - int col = ( int ) floor(( thePoint.x() - tm->topLeft.x() ) / twMap ); - int row = ( int ) floor(( tm->topLeft.y() - thePoint.y() ) / thMap ); + int col = ( int ) floor(( point.x() - tm->topLeft.x() ) / twMap ); + int row = ( int ) floor(( tm->topLeft.y() - point.y() ) / thMap ); double tx = tm->topLeft.x() + col * twMap; double ty = tm->topLeft.y() - row * thMap; - int i = ( thePoint.x() - tx ) / tres; - int j = ( ty - thePoint.y() ) / tres; + int i = ( point.x() - tx ) / tres; + int j = ( ty - point.y() ) / tres; QgsDebugMsg( QString( "col=%1 row=%2 i=%3 j=%4 tx=%5 ty=%6" ).arg( col ).arg( row ).arg( i ).arg( j ).arg( tx, 0, 'f', 1 ).arg( ty, 0, 'f', 1 ) ); - if ( mTileLayer->getFeatureInfoURLs.contains( format ) ) + if ( mTileLayer->getFeatureInfoURLs.contains( formatStr ) ) { // REST - QString url = mTileLayer->getFeatureInfoURLs[ format ]; + QString url = mTileLayer->getFeatureInfoURLs[ formatStr ]; url.replace( QLatin1String( "{layer}" ), mSettings.mActiveSubLayers[0], Qt::CaseInsensitive ); url.replace( QLatin1String( "{style}" ), mSettings.mActiveSubStyles[0], Qt::CaseInsensitive ); @@ -2656,7 +2656,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs setQueryItem( url, QStringLiteral( "VERSION" ), mCaps.mCapabilities.version ); setQueryItem( url, QStringLiteral( "LAYER" ), mSettings.mActiveSubLayers[0] ); setQueryItem( url, QStringLiteral( "STYLE" ), mSettings.mActiveSubStyles[0] ); - setQueryItem( url, QStringLiteral( "INFOFORMAT" ), format ); + setQueryItem( url, QStringLiteral( "INFOFORMAT" ), formatStr ); setQueryItem( url, QStringLiteral( "TILEMATRIXSET" ), mTileMatrixSet->identifier ); setQueryItem( url, QStringLiteral( "TILEMATRIX" ), tm->identifier ); @@ -2675,7 +2675,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs } else { - QgsDebugMsg( QString( "No KVP and no feature info url for format %1" ).arg( format ) ); + QgsDebugMsg( QString( "No KVP and no feature info url for format %1" ).arg( formatStr ) ); } } @@ -2736,11 +2736,11 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs } } - if ( theFormat == QgsRaster::IdentifyFormatHtml || theFormat == QgsRaster::IdentifyFormatText ) + if ( format == QgsRaster::IdentifyFormatHtml || format == QgsRaster::IdentifyFormatText ) { results.insert( results.size(), QString::fromUtf8( mIdentifyResultBodies.value( 0 ) ) ); } - else if ( theFormat == QgsRaster::IdentifyFormatFeature ) // GML + else if ( format == QgsRaster::IdentifyFormatFeature ) // GML { // The response maybe // 1) simple GML @@ -3089,7 +3089,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs } } - return QgsRasterIdentifyResult( theFormat, results ); + return QgsRasterIdentifyResult( format, results ); } void QgsWmsProvider::identifyReplyFinished() diff --git a/src/providers/wms/qgswmsprovider.h b/src/providers/wms/qgswmsprovider.h index e5a0f5ce1b1..b27691ad1fc 100644 --- a/src/providers/wms/qgswmsprovider.h +++ b/src/providers/wms/qgswmsprovider.h @@ -146,7 +146,7 @@ class QgsWmsProvider : public QgsRasterDataProvider void setConnectionName( QString const & connName ); void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, void *data, QgsRasterBlockFeedback* feedback = nullptr ) override; - //void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, QgsCoordinateReferenceSystem theSrcCRS, QgsCoordinateReferenceSystem theDestCRS, void *data ); + //void readBlock( int bandNo, QgsRectangle const & viewExtent, int width, int height, QgsCoordinateReferenceSystem srcCRS, QgsCoordinateReferenceSystem destCRS, void *data ); virtual QgsRectangle extent() const override; @@ -200,7 +200,7 @@ class QgsWmsProvider : public QgsRasterDataProvider Qgis::DataType sourceDataType( int bandNo ) const override; int bandCount() const override; QString metadata() override; - QgsRasterIdentifyResult identify( const QgsPoint & thePoint, QgsRaster::IdentifyFormat theFormat, const QgsRectangle &theExtent = QgsRectangle(), int theWidth = 0, int theHeight = 0, int theDpi = 96 ) override; + QgsRasterIdentifyResult identify( const QgsPoint & point, QgsRaster::IdentifyFormat format, const QgsRectangle &boundingBox = QgsRectangle(), int width = 0, int height = 0, int dpi = 96 ) override; QString lastErrorTitle() override; QString lastError() override; QString lastErrorFormat() override; @@ -256,7 +256,7 @@ class QgsWmsProvider : public QgsRasterDataProvider signals: //! \brief emit a signal to notify of a progress event - void progressChanged( int theProgress, int theTotalSteps ); + void progressChanged( int progress, int totalSteps ); void dataChanged(); diff --git a/src/providers/wms/qgswmssourceselect.cpp b/src/providers/wms/qgswmssourceselect.cpp index 0fd8f1aea84..dd389669111 100644 --- a/src/providers/wms/qgswmssourceselect.cpp +++ b/src/providers/wms/qgswmssourceselect.cpp @@ -1049,9 +1049,9 @@ void QgsWMSSourceSelect::setConnectionListPosition() } } -void QgsWMSSourceSelect::showStatusMessage( QString const &theMessage ) +void QgsWMSSourceSelect::showStatusMessage( QString const &message ) { - labelStatus->setText( theMessage ); + labelStatus->setText( message ); // update the display of this widget update(); diff --git a/src/providers/wms/qgswmssourceselect.h b/src/providers/wms/qgswmssourceselect.h index ddab7b6a04a..8c8f9aa77e1 100644 --- a/src/providers/wms/qgswmssourceselect.h +++ b/src/providers/wms/qgswmssourceselect.h @@ -84,7 +84,7 @@ class QgsWMSSourceSelect : public QDialog, private Ui::QgsWMSSourceSelectBase void on_lstLayers_itemSelectionChanged(); //! Set status message to theMessage - void showStatusMessage( QString const &theMessage ); + void showStatusMessage( QString const &message ); //! show whatever error is exposed by the QgsWmsProvider. void showError( QgsWmsProvider *wms ); diff --git a/src/server/qgsconfigparserutils.cpp b/src/server/qgsconfigparserutils.cpp index 116d0e28f4b..be5cf7c4ed9 100644 --- a/src/server/qgsconfigparserutils.cpp +++ b/src/server/qgsconfigparserutils.cpp @@ -266,7 +266,7 @@ void QgsConfigParserUtils::appendLayerBoundingBox( QDomElement& layerElem, QDomD } } -QStringList QgsConfigParserUtils::createCrsListForLayer( QgsMapLayer* theMapLayer ) +QStringList QgsConfigParserUtils::createCrsListForLayer( QgsMapLayer* mapLayer ) { QStringList crsNumbers; QString myDatabaseFileName = QgsApplication::srsDatabaseFilePath(); @@ -277,10 +277,10 @@ QStringList QgsConfigParserUtils::createCrsListForLayer( QgsMapLayer* theMapLaye //check the db is available myResult = sqlite3_open( myDatabaseFileName.toLocal8Bit().data(), &myDatabase ); - if ( myResult && theMapLayer ) + if ( myResult && mapLayer ) { //if the database cannot be opened, add at least the epsg number of the source coordinate system - crsNumbers.push_back( theMapLayer->crs().authid() ); + crsNumbers.push_back( mapLayer->crs().authid() ); return crsNumbers; }; QString mySql = QStringLiteral( "select upper(auth_name||':'||auth_id) from tbl_srs" ); diff --git a/src/server/qgsconfigparserutils.h b/src/server/qgsconfigparserutils.h index 9cb8636fd1b..49b8a063594 100644 --- a/src/server/qgsconfigparserutils.h +++ b/src/server/qgsconfigparserutils.h @@ -41,7 +41,7 @@ class QgsConfigParserUtils static void appendLayerBoundingBox( QDomElement& layerElem, QDomDocument& doc, const QgsRectangle& layerExtent, const QgsCoordinateReferenceSystem& layerCRS, const QString& crsText ); //! Returns a list of supported EPSG coordinate system numbers from a layer - static QStringList createCrsListForLayer( QgsMapLayer* theMapLayer ); + static QStringList createCrsListForLayer( QgsMapLayer* mapLayer ); //! Returns default service capabilities from wms_metadata.xml if nothing else is defined static void fallbackServiceCapabilities( QDomElement& parentElement, QDomDocument& doc ); diff --git a/src/server/qgshttptransaction.h b/src/server/qgshttptransaction.h index c7a1d9cde9f..879ab9e8892 100644 --- a/src/server/qgshttptransaction.h +++ b/src/server/qgshttptransaction.h @@ -128,12 +128,12 @@ class QgsHttpTransaction : public QObject void setProgress( int done, int total ); //! Signal for progress update - void dataReadProgress( int theProgress ); + void dataReadProgress( int progress ); //! Signal for adjusted number of steps - void totalSteps( int theTotalSteps ); + void totalSteps( int totalSteps ); //! \brief emit a signal to be caught by qgisapp and display a msg on status bar - void statusChanged( const QString& theStatusQString ); + void statusChanged( const QString& statusQString ); private: diff --git a/src/server/qgsinterpolationlayerbuilder.cpp b/src/server/qgsinterpolationlayerbuilder.cpp index f87211dd8e0..627be126cc0 100644 --- a/src/server/qgsinterpolationlayerbuilder.cpp +++ b/src/server/qgsinterpolationlayerbuilder.cpp @@ -63,7 +63,7 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement &el QDomNodeList tinList = interpolationElem.elementsByTagName( QStringLiteral( "TINMethod" ) ); QDomNodeList idwList = interpolationElem.elementsByTagName( QStringLiteral( "IDWMethod" ) ); - QgsInterpolator* theInterpolator = nullptr; + QgsInterpolator* interpolator = nullptr; QList layerDataList; QgsInterpolator::LayerData currentLayerData; currentLayerData.vectorLayer = mVectorLayer; @@ -96,13 +96,13 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement &el if ( !idwList.isEmpty() ) //inverse distance interpolator { - theInterpolator = new QgsIDWInterpolator( layerDataList ); + interpolator = new QgsIDWInterpolator( layerDataList ); //todo: parse } else //tin is default { - theInterpolator = new QgsTINInterpolator( layerDataList ); + interpolator = new QgsTINInterpolator( layerDataList ); //todo: parse } @@ -124,7 +124,7 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement &el if ( nCols == 0 || nRows == 0 ) { QgsDebugMsg( "Reading of resolution failed" ); - delete theInterpolator; + delete interpolator; return nullptr; } } @@ -134,12 +134,12 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement &el { QgsDebugMsg( "Opening temporary file failed" ); delete tmpFile; - delete theInterpolator; + delete interpolator; return nullptr; } QgsRectangle extent = mVectorLayer->extent(); - QgsGridFileWriter gridWriter( theInterpolator, tmpFile->fileName(), extent, nCols, nRows, extent.width() / nCols, extent.height() / nRows ); + QgsGridFileWriter gridWriter( interpolator, tmpFile->fileName(), extent, nCols, nRows, extent.width() / nCols, extent.height() / nRows ); if ( gridWriter.writeFile( false ) != 0 ) { QgsDebugMsg( "Interpolation of raster failed" ); @@ -147,7 +147,7 @@ QgsMapLayer* QgsInterpolationLayerBuilder::createMapLayer( const QDomElement &el } filesToRemove.push_back( tmpFile ); //store raster in temporary file and remove after request - QgsRasterLayer* theRaster = new QgsRasterLayer( tmpFile->fileName() ); - layersToRemove.push_back( theRaster ); - return theRaster; + QgsRasterLayer* raster = new QgsRasterLayer( tmpFile->fileName() ); + layersToRemove.push_back( raster ); + return raster; } diff --git a/src/server/qgsremotedatasourcebuilder.cpp b/src/server/qgsremotedatasourcebuilder.cpp index 2ceb494d25e..5b47cd08675 100644 --- a/src/server/qgsremotedatasourcebuilder.cpp +++ b/src/server/qgsremotedatasourcebuilder.cpp @@ -30,20 +30,20 @@ QgsRemoteDataSourceBuilder::QgsRemoteDataSourceBuilder(): QgsMSLayerBuilder() QgsMapLayer* QgsRemoteDataSourceBuilder::createMapLayer( const QDomElement& elem, const QString& layerName, QList& filesToRemove, QList& layersToRemove, bool allowCaching ) const { - QgsMapLayer* theLayer = nullptr; + QgsMapLayer* layer = nullptr; if ( elem.tagName() == QLatin1String( "RemoteRDS" ) ) { - theLayer = rasterLayerFromRemoteRDS( elem, layerName, filesToRemove, layersToRemove, allowCaching ); + layer = rasterLayerFromRemoteRDS( elem, layerName, filesToRemove, layersToRemove, allowCaching ); } else if ( elem.tagName() == QLatin1String( "RemoteVDS" ) ) { - theLayer = vectorLayerFromRemoteVDS( elem, layerName, filesToRemove, layersToRemove, allowCaching ); + layer = vectorLayerFromRemoteVDS( elem, layerName, filesToRemove, layersToRemove, allowCaching ); } else { return nullptr; } - return theLayer; + return layer; } QgsRasterLayer* QgsRemoteDataSourceBuilder::rasterLayerFromRemoteRDS( const QDomElement& remoteRDSElem, diff --git a/src/server/qgssentdatasourcebuilder.cpp b/src/server/qgssentdatasourcebuilder.cpp index 5b884613a11..373036267d3 100644 --- a/src/server/qgssentdatasourcebuilder.cpp +++ b/src/server/qgssentdatasourcebuilder.cpp @@ -65,21 +65,21 @@ QgsVectorLayer* QgsSentDataSourceBuilder::vectorLayerFromSentVDS( const QDomElem return nullptr; } - QgsVectorLayer* theVectorLayer = new QgsVectorLayer( tmpFile->fileName(), layerNameFromUri( tmpFile->fileName() ), QStringLiteral( "WFS" ) ); - if ( !theVectorLayer || !theVectorLayer->isValid() ) + QgsVectorLayer* vectorLayer = new QgsVectorLayer( tmpFile->fileName(), layerNameFromUri( tmpFile->fileName() ), QStringLiteral( "WFS" ) ); + if ( !vectorLayer || !vectorLayer->isValid() ) { QgsDebugMsg( "invalid maplayer" ); return nullptr; } QgsDebugMsg( "returning maplayer" ); - layersToRemove.push_back( theVectorLayer ); //make sure the layer gets deleted after each request + layersToRemove.push_back( vectorLayer ); //make sure the layer gets deleted after each request - if ( !theVectorLayer || !theVectorLayer->isValid() ) + if ( !vectorLayer || !vectorLayer->isValid() ) { return nullptr; } - return theVectorLayer; + return vectorLayer; } return nullptr; } diff --git a/src/server/qgsserver.cpp b/src/server/qgsserver.cpp index 9f531662887..a362caa9479 100644 --- a/src/server/qgsserver.cpp +++ b/src/server/qgsserver.cpp @@ -316,32 +316,32 @@ void QgsServer::handleRequest( QgsServerRequest& request, QgsServerResponse& res time.start(); } - //Pass the filters to the requestHandler, this is needed for the following reasons: + // Pass the filters to the requestHandler, this is needed for the following reasons: // Allow server request to call sendResponse plugin hook if enabled - QgsFilterResponseDecorator theResponse( sServerInterface->filters(), response ); + QgsFilterResponseDecorator responseDecorator( sServerInterface->filters(), response ); //Request handler - QgsRequestHandler theRequestHandler( request, theResponse ); + QgsRequestHandler requestHandler( request, response ); try { // TODO: split parse input into plain parse and processing from specific services - theRequestHandler.parseInput(); + requestHandler.parseInput(); } catch ( QgsMapServiceException& e ) { QgsMessageLog::logMessage( "Parse input exception: " + e.message(), QStringLiteral( "Server" ), QgsMessageLog::CRITICAL ); - theRequestHandler.setServiceException( e ); + requestHandler.setServiceException( e ); } // Set the request handler into the interface for plugins to manipulate it - sServerInterface->setRequestHandler( &theRequestHandler ); + sServerInterface->setRequestHandler( &requestHandler ); // Call requestReady() method (if enabled) - theResponse.start(); + responseDecorator.start(); // Plugins may have set exceptions - if ( !theRequestHandler.exceptionRaised() ) + if ( !requestHandler.exceptionRaised() ) { try { @@ -389,14 +389,14 @@ void QgsServer::handleRequest( QgsServerRequest& request, QgsServerResponse& res QString outputFileName = parameterMap.value( QStringLiteral( "FILE_NAME" ) ); if ( !outputFileName.isEmpty() ) { - theRequestHandler.setHeader( QStringLiteral( "Content-Disposition" ), "attachment; filename=\"" + outputFileName + "\"" ); + requestHandler.setHeader( QStringLiteral( "Content-Disposition" ), "attachment; filename=\"" + outputFileName + "\"" ); } // Lookup for service QgsService* service = sServiceRegistry.getService( serviceString, versionString ); if ( service ) { - service->executeRequest( request, theResponse, projectIt.value() ); + service->executeRequest( request, responseDecorator, projectIt.value() ); } else { @@ -406,18 +406,18 @@ void QgsServer::handleRequest( QgsServerRequest& request, QgsServerResponse& res } catch ( QgsServerException& ex ) { - theResponse.write( ex ); + responseDecorator.write( ex ); } catch ( QgsException& ex ) { // Internal server error - theResponse.sendError( 500, ex.what() ); + response.sendError( 500, ex.what() ); } } // Terminate the response - theResponse.finish(); + responseDecorator.finish(); - // We are done using theRequestHandler in plugins, make sure we don't access + // We are done using requestHandler in plugins, make sure we don't access // to a deleted request handler from Python bindings sServerInterface->clearRequestHandler(); diff --git a/src/server/qgssldconfigparser.cpp b/src/server/qgssldconfigparser.cpp index 69b0e0dfa60..604ee8409c5 100644 --- a/src/server/qgssldconfigparser.cpp +++ b/src/server/qgssldconfigparser.cpp @@ -149,18 +149,18 @@ void QgsSLDConfigParser::layersAndStylesCapabilities( QDomElement& parentElement } //get only the first layer since we don't want to have the other ones in the capabilities document - QgsMapLayer* theMapLayer = layerList.at( 0 ); - if ( !theMapLayer )//error while generating the layer + QgsMapLayer* mapLayer = layerList.at( 0 ); + if ( !mapLayer )//error while generating the layer { QgsDebugMsg( "Error, QgsMapLayer object is 0" ); continue; } //append geographic bbox and the CRS elements - QStringList crsNumbers = QgsConfigParserUtils::createCrsListForLayer( theMapLayer ); + QStringList crsNumbers = QgsConfigParserUtils::createCrsListForLayer( mapLayer ); QStringList crsRestriction; //no crs restrictions in SLD parser QgsConfigParserUtils::appendCrsElementsToLayer( layerElement, doc, crsNumbers, crsRestriction ); - QgsConfigParserUtils::appendLayerBoundingBoxes( layerElement, doc, theMapLayer->extent(), theMapLayer->crs(), crsNumbers, crsRestriction ); + QgsConfigParserUtils::appendLayerBoundingBoxes( layerElement, doc, mapLayer->extent(), mapLayer->crs(), crsNumbers, crsRestriction ); //iterate over all nodes within a user layer QDomNodeList userStyleList = layerNodeList.item( i ).toElement().elementsByTagName( QStringLiteral( "UserStyle" ) ); @@ -280,25 +280,25 @@ QList QgsSLDConfigParser::mapLayerFromStyle( const QString& lName, QDomElement userStyleElement = findUserStyleElement( userLayerElement, styleName ); - QgsMapLayer* theMapLayer = mapLayerFromUserLayer( userLayerElement, lName, useCache ); - if ( !theMapLayer ) + QgsMapLayer* mapLayer = mapLayerFromUserLayer( userLayerElement, lName, useCache ); + if ( !mapLayer ) { return resultList; } - QgsFeatureRenderer* theRenderer = nullptr; + QgsFeatureRenderer* renderer = nullptr; - QgsRasterLayer* theRasterLayer = dynamic_cast( theMapLayer ); - if ( theRasterLayer ) + QgsRasterLayer* rasterLayer = dynamic_cast( mapLayer ); + if ( rasterLayer ) { QgsDebugMsg( "Layer is a rasterLayer" ); if ( !userStyleElement.isNull() ) { QgsDebugMsg( "Trying to add raster symbology" ); - rasterSymbologyFromUserStyle( userStyleElement, theRasterLayer ); + rasterSymbologyFromUserStyle( userStyleElement, rasterLayer ); //todo: possibility to have vector layer or raster layer QgsDebugMsg( "Trying to find contour symbolizer" ); - QgsVectorLayer* v = contourLayerFromRaster( userStyleElement, theRasterLayer ); + QgsVectorLayer* v = contourLayerFromRaster( userStyleElement, rasterLayer ); if ( v ) { QgsDebugMsg( "Returning vector layer" ); @@ -306,34 +306,34 @@ QList QgsSLDConfigParser::mapLayerFromStyle( const QString& lName, mLayersToRemove.push_back( v ); } } - resultList.push_back( theMapLayer ); + resultList.push_back( mapLayer ); return resultList; } - QgsVectorLayer* theVectorLayer = dynamic_cast( theMapLayer ); + QgsVectorLayer* vectorLayer = dynamic_cast( mapLayer ); if ( userStyleElement.isNull() )//apply a default style { - QgsSymbol* symbol = QgsSymbol::defaultSymbol( theVectorLayer->geometryType() ); - theRenderer = new QgsSingleSymbolRenderer( symbol ); + QgsSymbol* symbol = QgsSymbol::defaultSymbol( vectorLayer->geometryType() ); + renderer = new QgsSingleSymbolRenderer( symbol ); } else { QgsDebugMsg( "Trying to get a renderer from the user style" ); - theRenderer = rendererFromUserStyle( userStyleElement, theVectorLayer ); + renderer = rendererFromUserStyle( userStyleElement, vectorLayer ); //apply labels if tag is present - labelSettingsFromUserStyle( userStyleElement, theVectorLayer ); + labelSettingsFromUserStyle( userStyleElement, vectorLayer ); } - if ( !theRenderer ) + if ( !renderer ) { QgsDebugMsg( "Error, could not create a renderer" ); - delete theVectorLayer; + delete vectorLayer; return resultList; } - theVectorLayer->setRenderer( theRenderer ); + vectorLayer->setRenderer( renderer ); QgsDebugMsg( "Returning the vectorlayer" ); - resultList.push_back( theVectorLayer ); + resultList.push_back( vectorLayer ); return resultList; } @@ -1127,8 +1127,8 @@ QgsVectorLayer* QgsSLDConfigParser::contourLayerFromRaster( const QDomElement& u QgsVectorLayer* contourLayer = new QgsVectorLayer( tmpFileName, QStringLiteral( "layer" ), QStringLiteral( "ogr" ) ); //create renderer - QgsFeatureRenderer* theRenderer = rendererFromUserStyle( userStyleElem, contourLayer ); - contourLayer->setRenderer( theRenderer ); + QgsFeatureRenderer* renderer = rendererFromUserStyle( userStyleElem, contourLayer ); + contourLayer->setRenderer( renderer ); //add labeling if requested labelSettingsFromUserStyle( userStyleElem, contourLayer ); @@ -1240,14 +1240,14 @@ QgsMapLayer* QgsSLDConfigParser::mapLayerFromUserLayer( const QDomElement& userL return nullptr; } - QgsMapLayer* theMapLayer = layerBuilder->createMapLayer( builderRootElement, layerName, mFilesToRemove, mLayersToRemove, allowCaching ); - if ( theMapLayer ) + QgsMapLayer* mapLayer = layerBuilder->createMapLayer( builderRootElement, layerName, mFilesToRemove, mLayersToRemove, allowCaching ); + if ( mapLayer ) { - setCrsForLayer( builderRootElement, theMapLayer ); //consider attributes "epsg" and "proj" + setCrsForLayer( builderRootElement, mapLayer ); //consider attributes "epsg" and "proj" } //maybe the datasource is defined in the fallback SLD? - if ( !theMapLayer && mFallbackParser ) + if ( !mapLayer && mFallbackParser ) { QList fallbackList = mFallbackParser->mapLayerFromStyle( layerName, QLatin1String( "" ), allowCaching ); if ( !fallbackList.isEmpty() ) @@ -1255,21 +1255,21 @@ QgsMapLayer* QgsSLDConfigParser::mapLayerFromUserLayer( const QDomElement& userL QgsMapLayer* fallbackLayer = fallbackList.at( 0 ); //todo: prevent crash if layer list is empty if ( fallbackLayer ) { - theMapLayer = dynamic_cast( fallbackLayer ); + mapLayer = dynamic_cast( fallbackLayer ); } } } #if 0 //todo: fixme //GML from outside the SLD? - if ( !theMapLayer ) + if ( !mapLayer ) { QMap::const_iterator gmlIt = mExternalGMLDatasets.find( layerName ); if ( gmlIt != mExternalGMLDatasets.end() ) { QgsDebugMsg( "Trying to get maplayer from external GML" ); - theMapLayer = vectorLayerFromGML( gmlIt.value()->documentElement() ); + mapLayer = vectorLayerFromGML( gmlIt.value()->documentElement() ); } } #endif //0 @@ -1279,16 +1279,16 @@ QgsMapLayer* QgsSLDConfigParser::mapLayerFromUserLayer( const QDomElement& userL QDomNode rasterInterpolationNode = userLayerElem.namedItem( QStringLiteral( "RasterInterpolation" ) ); if ( !rasterInterpolationNode.isNull() ) { - QgsVectorLayer* vectorCast = dynamic_cast( theMapLayer ); + QgsVectorLayer* vectorCast = dynamic_cast( mapLayer ); if ( vectorCast ) { builderRootElement = rasterInterpolationNode.toElement(); layerBuilder = new QgsInterpolationLayerBuilder( vectorCast ); - theMapLayer = layerBuilder->createMapLayer( builderRootElement, layerName, mFilesToRemove, mLayersToRemove, allowCaching ); + mapLayer = layerBuilder->createMapLayer( builderRootElement, layerName, mFilesToRemove, mLayersToRemove, allowCaching ); } } - return theMapLayer; + return mapLayer; } void QgsSLDConfigParser::setCrsForLayer( const QDomElement& layerElem, QgsMapLayer* ml ) const diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index 7451e3fac6c..fcdb175ffdc 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -554,12 +554,12 @@ namespace QgsWms { QStringList layersList, stylesList, layerIdList; QgsMapSettings mapSettings; - QImage* theImage = initializeRendering( layersList, stylesList, layerIdList, mapSettings ); - if ( !theImage ) + QImage* image = initializeRendering( layersList, stylesList, layerIdList, mapSettings ); + if ( !image ) { return nullptr; } - delete theImage; + delete image; #ifdef HAVE_SERVER_PYTHON_PLUGINS Q_FOREACH ( QgsMapLayer *layer, QgsProject::instance()->mapLayers() ) @@ -709,7 +709,7 @@ namespace QgsWms QStringLiteral( "The requested map size is too large" ) ); } QStringList layersList, stylesList, layerIdList; - QImage* theImage = initializeRendering( layersList, stylesList, layerIdList, mapSettings ); + QImage* image = initializeRendering( layersList, stylesList, layerIdList, mapSettings ); QStringList layerSetIds = mapSettings.layerIds(); @@ -763,14 +763,14 @@ namespace QgsWms mAccessControl->resolveFilterFeatures( mapSettings.layers() ); #endif QgsMapRendererJobProxy renderJob( mSettings.parallelRendering(), mSettings.maxThreads(), mAccessControl ); - renderJob.render( mapSettings, theImage ); + renderJob.render( mapSettings, image ); painter.reset( renderJob.takePainter() ); } if ( mConfigParser ) { //draw configuration format specific overlay items - mConfigParser->drawOverlays( painter.get(), theImage->dotsPerMeterX() / 1000.0 * 25.4, theImage->width(), theImage->height() ); + mConfigParser->drawOverlays( painter.get(), image->dotsPerMeterX() / 1000.0 * 25.4, image->width(), image->height() ); } restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies ); @@ -785,13 +785,13 @@ namespace QgsWms //test if width / height ratio of image is the same as the ratio of WIDTH / HEIGHT parameters. If not, the image has to be scaled (required by WMS spec) int widthParam = mParameters.value( "WIDTH", "0" ).toInt(); int heightParam = mParameters.value( "HEIGHT", "0" ).toInt(); - if ( widthParam != theImage->width() || heightParam != theImage->height() ) + if ( widthParam != image->width() || heightParam != image->height() ) { //scale image - *theImage = theImage->scaled( widthParam, heightParam, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); + *image = image->scaled( widthParam, heightParam, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ); } - return theImage; + return image; } static void infoPointToMapCoordinates( int i, int j, QgsPoint* infoPoint, const QgsMapSettings& mapSettings ) @@ -1151,14 +1151,14 @@ namespace QgsWms } } - std::unique_ptr theImage( createImage() ); + std::unique_ptr image( createImage() ); - configureMapSettings( theImage.get(), mapSettings ); + configureMapSettings( image.get(), mapSettings ); //find out the current scale denominater and set it to the SLD parser - QgsScaleCalculator scaleCalc(( theImage->logicalDpiX() + theImage->logicalDpiY() ) / 2, mapSettings.destinationCrs().mapUnits() ); + QgsScaleCalculator scaleCalc(( image->logicalDpiX() + image->logicalDpiY() ) / 2, mapSettings.destinationCrs().mapUnits() ); QgsRectangle mapExtent = mapSettings.extent(); - mConfigParser->setScaleDenominator( scaleCalc.calculate( mapExtent, theImage->width() ) ); + mConfigParser->setScaleDenominator( scaleCalc.calculate( mapExtent, image->width() ) ); layerIdList = layerSet( layersList, stylesList, mapSettings.destinationCrs() ); #ifdef QGISDEBUG @@ -1175,7 +1175,7 @@ namespace QgsWms // load label settings mConfigParser->loadLabelSettings(); - return theImage.release(); + return image.release(); } QImage* QgsRenderer::createImage( int width, int height, bool useBbox ) const @@ -1241,7 +1241,7 @@ namespace QgsWms throw QgsException( QStringLiteral( "createImage: Invalid width / height parameters" ) ); } - QImage* theImage = nullptr; + QImage* image = nullptr; //Define the image background color in case of map settings is not used //is format jpeg? @@ -1269,13 +1269,13 @@ namespace QgsWms //use alpha channel only if necessary because it slows down performance if ( transparent && !jpeg ) { - theImage = new QImage( width, height, QImage::Format_ARGB32_Premultiplied ); - theImage->fill( 0 ); + image = new QImage( width, height, QImage::Format_ARGB32_Premultiplied ); + image->fill( 0 ); } else { - theImage = new QImage( width, height, QImage::Format_RGB32 ); - theImage->fill( backgroundColor ); + image = new QImage( width, height, QImage::Format_RGB32 ); + image->fill( backgroundColor ); } //apply DPI parameter if present. This is an extension of Qgis Mapserver compared to WMS 1.3. @@ -1290,9 +1290,9 @@ namespace QgsWms dpm = dpi / 0.0254; } } - theImage->setDotsPerMeterX( dpm ); - theImage->setDotsPerMeterY( dpm ); - return theImage; + image->setDotsPerMeterX( dpm ); + image->setDotsPerMeterY( dpm ); + return image; } void QgsRenderer::configureMapSettings( const QPaintDevice* paintDevice, QgsMapSettings& mapSettings ) const @@ -1402,16 +1402,16 @@ namespace QgsWms if ( !xml.isEmpty() ) { //ignore LAYERS and STYLES and take those information from the SLD - std::unique_ptr theDocument( new QDomDocument( QStringLiteral( "user.sld" ) ) ); + std::unique_ptr document( new QDomDocument( QStringLiteral( "user.sld" ) ) ); QString errorMsg; int errorLine, errorColumn; - if ( !theDocument->setContent( xml, true, &errorMsg, &errorLine, &errorColumn ) ) + if ( !document->setContent( xml, true, &errorMsg, &errorLine, &errorColumn ) ) { throw QgsException( QStringLiteral( "SLDParser: Could not create DomDocument from SLD: %1" ).arg( errorMsg ) ); } - QgsSLDConfigParser* userSLDParser = new QgsSLDConfigParser( theDocument.release(), mParameters ); + QgsSLDConfigParser* userSLDParser = new QgsSLDConfigParser( document.release(), mParameters ); userSLDParser->setFallbackParser( mConfigParser ); mConfigParser = userSLDParser; mOwnsConfigParser = true; @@ -1766,7 +1766,7 @@ namespace QgsWms QStringList layerKeys; QStringList::const_iterator llstIt; QStringList::const_iterator slstIt; - QgsMapLayer* theMapLayer = nullptr; + QgsMapLayer* mapLayer = nullptr; QgsMessageLog::logMessage( QStringLiteral( "Calculating layerset using %1 layers, %2 styles and CRS %3" ).arg( layersList.count() ).arg( stylesList.count() ).arg( destCRS.description() ) ); for ( llstIt = layersList.begin(), slstIt = stylesList.begin(); llstIt != layersList.end(); ++llstIt ) { @@ -1791,23 +1791,23 @@ namespace QgsWms for ( listIndex = layerList.size() - 1; listIndex >= 0; listIndex-- ) { - theMapLayer = layerList.at( listIndex ); - if ( theMapLayer ) + mapLayer = layerList.at( listIndex ); + if ( mapLayer ) { - QString lName = theMapLayer->name(); + QString lName = mapLayer->name(); if ( mConfigParser->useLayerIds() ) - lName = theMapLayer->id(); - else if ( !theMapLayer->shortName().isEmpty() ) - lName = theMapLayer->shortName(); + lName = mapLayer->id(); + else if ( !mapLayer->shortName().isEmpty() ) + lName = mapLayer->shortName(); QgsMessageLog::logMessage( QStringLiteral( "Checking layer: %1" ).arg( lName ) ); //test if layer is visible in requested scale - bool useScaleConstraint = ( scaleDenominator > 0 && theMapLayer->hasScaleBasedVisibility() ); + bool useScaleConstraint = ( scaleDenominator > 0 && mapLayer->hasScaleBasedVisibility() ); if ( !useScaleConstraint || - ( theMapLayer->minimumScale() <= scaleDenominator && theMapLayer->maximumScale() >= scaleDenominator ) ) + ( mapLayer->minimumScale() <= scaleDenominator && mapLayer->maximumScale() >= scaleDenominator ) ) { - layerKeys.push_front( theMapLayer->id() ); + layerKeys.push_front( mapLayer->id() ); QgsProject::instance()->addMapLayers( - QList() << theMapLayer, false, false ); + QList() << mapLayer, false, false ); } } else diff --git a/tests/bench/qgsbench.cpp b/tests/bench/qgsbench.cpp index 4c1040d28c0..06b97928374 100644 --- a/tests/bench/qgsbench.cpp +++ b/tests/bench/qgsbench.cpp @@ -118,11 +118,11 @@ int getrusage( int who, struct rusage * rusage ) } #endif -QgsBench::QgsBench( int theWidth, int theHeight, int theIterations ) +QgsBench::QgsBench( int width, int height, int iterations ) : QObject() - , mWidth( theWidth ) - , mHeight( theHeight ) - , mIterations( theIterations ) + , mWidth( width ) + , mHeight( height ) + , mIterations( iterations ) , mSetExtent( false ) , mUserStart( 0.0 ) , mSysStart( 0.0 ) @@ -139,13 +139,13 @@ QgsBench::~QgsBench() { } -bool QgsBench::openProject( const QString & theFileName ) +bool QgsBench::openProject( const QString & fileName ) { - if ( ! QgsProject::instance()->read( theFileName ) ) + if ( ! QgsProject::instance()->read( fileName ) ) { return false; } - mLogMap.insert( QStringLiteral( "project" ), theFileName ); + mLogMap.insert( QStringLiteral( "project" ), fileName ); return true; } @@ -299,13 +299,13 @@ void QgsBench::printLog( const QString& printTime ) } } -QString QgsBench::serialize( const QMap& theMap, int level ) +QString QgsBench::serialize( const QMap& map, int level ) { QStringList list; QString space = QStringLiteral( " " ).repeated( level * 2 ); QString space2 = QStringLiteral( " " ).repeated( level * 2 + 2 ); - QMap::const_iterator i = theMap.constBegin(); - while ( i != theMap.constEnd() ) + QMap::const_iterator i = map.constBegin(); + while ( i != map.constEnd() ) { switch ( static_cast< QMetaType::Type >( i.value().type() ) ) { diff --git a/tests/bench/qgsbench.h b/tests/bench/qgsbench.h index cf9bfcdef2b..b453c8a0bd6 100644 --- a/tests/bench/qgsbench.h +++ b/tests/bench/qgsbench.h @@ -33,7 +33,7 @@ class QgsBench : public QObject { Q_OBJECT public: - QgsBench( int theWidth, int theHeight, int theCycles ); + QgsBench( int width, int height, int cycles ); ~QgsBench(); // start time counter @@ -54,7 +54,7 @@ class QgsBench : public QObject void saveLog( const QString & fileName ); - QString serialize( const QMap& theMap, int level = 0 ); + QString serialize( const QMap& map, int level = 0 ); void setRenderHints( const QPainter::RenderHints& hints ) { mRendererHints = hints; } diff --git a/tests/src/core/testqgs25drenderer.cpp b/tests/src/core/testqgs25drenderer.cpp index b46613b52da..70ef4b02bfa 100644 --- a/tests/src/core/testqgs25drenderer.cpp +++ b/tests/src/core/testqgs25drenderer.cpp @@ -55,7 +55,7 @@ class TestQgs25DRenderer : public QObject void renderComposition(); private: - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QString mTestDataDir; @@ -140,7 +140,7 @@ void TestQgs25DRenderer::renderComposition() QVERIFY( checker.testComposition( mReport, 0, 100 ) ); } -bool TestQgs25DRenderer::imageCheck( const QString& theTestType ) +bool TestQgs25DRenderer::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -152,10 +152,10 @@ bool TestQgs25DRenderer::imageCheck( const QString& theTestType ) mMapSettings.setExpressionContext( context ); QgsMultiRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "25d_renderer" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); myChecker.setColorTolerance( 20 ); - bool myResultFlag = myChecker.runTest( theTestType, 500 ); + bool myResultFlag = myChecker.runTest( testType, 500 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsblendmodes.cpp b/tests/src/core/testqgsblendmodes.cpp index c22c6e237de..01a69bdc435 100644 --- a/tests/src/core/testqgsblendmodes.cpp +++ b/tests/src/core/testqgsblendmodes.cpp @@ -65,7 +65,7 @@ class TestQgsBlendModes : public QObject void vectorLayerTransparency(); void rasterBlending(); private: - bool imageCheck( const QString& theType ); //as above + bool imageCheck( const QString& type ); //as above QgsMapSettings *mMapSettings = nullptr; QgsMapLayer * mpPointsLayer = nullptr; QgsVectorLayer * mpPolysLayer = nullptr; @@ -226,16 +226,16 @@ void TestQgsBlendModes::rasterBlending() // Private helper functions not called directly by CTest // -bool TestQgsBlendModes::imageCheck( const QString& theTestType ) +bool TestQgsBlendModes::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image mMapSettings->setOutputDpi( 96 ); QgsMultiRenderChecker myChecker; - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( *mMapSettings ); myChecker.setColorTolerance( 5 ); - bool myResultFlag = myChecker.runTest( theTestType, 20 ); + bool myResultFlag = myChecker.runTest( testType, 20 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgscentroidfillsymbol.cpp b/tests/src/core/testqgscentroidfillsymbol.cpp index 47d109b2ca7..2a62fb7b4d9 100644 --- a/tests/src/core/testqgscentroidfillsymbol.cpp +++ b/tests/src/core/testqgscentroidfillsymbol.cpp @@ -62,7 +62,7 @@ class TestQgsCentroidFillSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QgsCentroidFillSymbolLayer* mCentroidFill = nullptr; @@ -147,7 +147,7 @@ void TestQgsCentroidFillSymbol::centroidFillSymbolPartBiggest() // -bool TestQgsCentroidFillSymbol::imageCheck( const QString& theTestType ) +bool TestQgsCentroidFillSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -155,9 +155,9 @@ bool TestQgsCentroidFillSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_centroidfill" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgscoordinatereferencesystem.cpp b/tests/src/core/testqgscoordinatereferencesystem.cpp index 2336760ca78..fa886b78761 100644 --- a/tests/src/core/testqgscoordinatereferencesystem.cpp +++ b/tests/src/core/testqgscoordinatereferencesystem.cpp @@ -76,7 +76,7 @@ class TestQgsCoordinateReferenceSystem: public QObject void validSrsIds(); private: - void debugPrint( QgsCoordinateReferenceSystem &theCrs ); + void debugPrint( QgsCoordinateReferenceSystem &crs ); // these used by createFromESRIWkt() QStringList myWktStrings; QList myGdalVersionOK; @@ -84,7 +84,7 @@ class TestQgsCoordinateReferenceSystem: public QObject QStringList myProj4Strings; QStringList myTOWGS84Strings; QStringList myAuthIdStrings; - QString testESRIWkt( int i, QgsCoordinateReferenceSystem &theCrs ); + QString testESRIWkt( int i, QgsCoordinateReferenceSystem &crs ); }; @@ -588,12 +588,12 @@ void TestQgsCoordinateReferenceSystem::readXml() //QgsCoordinateReferenceSystem myCrs; //myCrs.createFromSrid( GEOSRID ); //QgsCoordinateReferenceSystem myCrs2; - //QVERIFY( myCrs2.readXml( QDomNode & theNode ) ); + //QVERIFY( myCrs2.readXml( QDomNode & node ) ); } void TestQgsCoordinateReferenceSystem::writeXml() { //QgsCoordinateReferenceSystem myCrs; - //bool writeXml( QDomNode & theNode, QDomDocument & theDoc ) const; + //bool writeXml( QDomNode & node, QDomDocument & doc ) const; //QVERIFY( myCrs.isValid() ); } void TestQgsCoordinateReferenceSystem::setCustomSrsValidation() @@ -695,26 +695,26 @@ void TestQgsCoordinateReferenceSystem::hasAxisInverted() void TestQgsCoordinateReferenceSystem::debugPrint( - QgsCoordinateReferenceSystem &theCrs ) + QgsCoordinateReferenceSystem &crs ) { QgsDebugMsg( "***SpatialRefSystem***" ); - QgsDebugMsg( "* Valid : " + ( theCrs.isValid() ? QString( "true" ) : + QgsDebugMsg( "* Valid : " + ( crs.isValid() ? QString( "true" ) : QString( "false" ) ) ); - QgsDebugMsg( "* SrsId : " + QString::number( theCrs.srsid() ) ); - QgsDebugMsg( "* EPSG ID : " + theCrs.authid() ); - QgsDebugMsg( "* PGIS ID : " + QString::number( theCrs.postgisSrid() ) ); - QgsDebugMsg( "* Proj4 : " + theCrs.toProj4() ); - QgsDebugMsg( "* WKT : " + theCrs.toWkt() ); - QgsDebugMsg( "* Desc. : " + theCrs.description() ); - if ( theCrs.mapUnits() == QgsUnitTypes::DistanceMeters ) + QgsDebugMsg( "* SrsId : " + QString::number( crs.srsid() ) ); + QgsDebugMsg( "* EPSG ID : " + crs.authid() ); + QgsDebugMsg( "* PGIS ID : " + QString::number( crs.postgisSrid() ) ); + QgsDebugMsg( "* Proj4 : " + crs.toProj4() ); + QgsDebugMsg( "* WKT : " + crs.toWkt() ); + QgsDebugMsg( "* Desc. : " + crs.description() ); + if ( crs.mapUnits() == QgsUnitTypes::DistanceMeters ) { QgsDebugMsg( "* Units : meters" ); } - else if ( theCrs.mapUnits() == QgsUnitTypes::DistanceFeet ) + else if ( crs.mapUnits() == QgsUnitTypes::DistanceFeet ) { QgsDebugMsg( "* Units : feet" ); } - else if ( theCrs.mapUnits() == QgsUnitTypes::DistanceDegrees ) + else if ( crs.mapUnits() == QgsUnitTypes::DistanceDegrees ) { QgsDebugMsg( "* Units : degrees" ); } diff --git a/tests/src/core/testqgsdiagram.cpp b/tests/src/core/testqgsdiagram.cpp index 0b3a4d41f93..73900fbb78c 100644 --- a/tests/src/core/testqgsdiagram.cpp +++ b/tests/src/core/testqgsdiagram.cpp @@ -60,7 +60,7 @@ class TestQgsDiagram : public QObject QString mTestDataDir; QString mReport; - bool imageCheck( const QString& theTestType ); + bool imageCheck( const QString& testType ); private slots: // will be called before the first testfunction is executed. @@ -546,7 +546,7 @@ class TestQgsDiagram : public QObject }; -bool TestQgsDiagram::imageCheck( const QString& theTestType ) +bool TestQgsDiagram::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -557,10 +557,10 @@ bool TestQgsDiagram::imageCheck( const QString& theTestType ) mMapSettings->setOutputDpi( 96 ); QgsMultiRenderChecker checker; checker.setControlPathPrefix( "diagrams" ); - checker.setControlName( "expected_" + theTestType ); + checker.setControlName( "expected_" + testType ); checker.setMapSettings( *mMapSettings ); checker.setColorTolerance( 15 ); - bool resultFlag = checker.runTest( theTestType, 200 ); + bool resultFlag = checker.runTest( testType, 200 ); mReport += checker.report(); return resultFlag; } diff --git a/tests/src/core/testqgsellipsemarker.cpp b/tests/src/core/testqgsellipsemarker.cpp index bbd941f6c69..27868bd35ad 100644 --- a/tests/src/core/testqgsellipsemarker.cpp +++ b/tests/src/core/testqgsellipsemarker.cpp @@ -67,7 +67,7 @@ class TestQgsEllipseMarkerSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPointsLayer = nullptr; QgsEllipseSymbolLayer* mEllipseMarkerLayer = nullptr; @@ -206,7 +206,7 @@ void TestQgsEllipseMarkerSymbol::bounds() // -bool TestQgsEllipseMarkerSymbol::imageCheck( const QString& theTestType ) +bool TestQgsEllipseMarkerSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -214,9 +214,9 @@ bool TestQgsEllipseMarkerSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_ellipsemarker" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsfilledmarker.cpp b/tests/src/core/testqgsfilledmarker.cpp index 2db5616c635..97943f31dee 100644 --- a/tests/src/core/testqgsfilledmarker.cpp +++ b/tests/src/core/testqgsfilledmarker.cpp @@ -65,7 +65,7 @@ class TestQgsFilledMarkerSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPointsLayer = nullptr; QgsFilledMarkerSymbolLayer* mFilledMarkerLayer = nullptr; @@ -176,7 +176,7 @@ void TestQgsFilledMarkerSymbol::bounds() // -bool TestQgsFilledMarkerSymbol::imageCheck( const QString& theTestType ) +bool TestQgsFilledMarkerSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -184,9 +184,9 @@ bool TestQgsFilledMarkerSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_filledmarker" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsfontmarker.cpp b/tests/src/core/testqgsfontmarker.cpp index 1e7757eb0ff..d9e2410fe58 100644 --- a/tests/src/core/testqgsfontmarker.cpp +++ b/tests/src/core/testqgsfontmarker.cpp @@ -65,7 +65,7 @@ class TestQgsFontMarkerSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPointsLayer = nullptr; QgsFontMarkerSymbolLayer* mFontMarkerLayer = nullptr; @@ -173,7 +173,7 @@ void TestQgsFontMarkerSymbol::bounds() // -bool TestQgsFontMarkerSymbol::imageCheck( const QString& theTestType ) +bool TestQgsFontMarkerSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -181,9 +181,9 @@ bool TestQgsFontMarkerSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_fontmarker" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType, 30 ); + bool myResultFlag = myChecker.runTest( testType, 30 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsgeometry.cpp b/tests/src/core/testqgsgeometry.cpp index 6b17fc77ed0..3746d9ca193 100644 --- a/tests/src/core/testqgsgeometry.cpp +++ b/tests/src/core/testqgsgeometry.cpp @@ -117,13 +117,13 @@ class TestQgsGeometry : public QObject private: //! A helper method to do a render check to see if the geometry op is as expected - bool renderCheck( const QString& theTestName, const QString& theComment = QLatin1String( QLatin1String( "" ) ), int mismatchCount = 0 ); + bool renderCheck( const QString& testName, const QString& comment = QLatin1String( QLatin1String( "" ) ), int mismatchCount = 0 ); //! A helper method to dump to qdebug the geometry of a multipolygon - void dumpMultiPolygon( QgsMultiPolygon &theMultiPolygon ); + void dumpMultiPolygon( QgsMultiPolygon &multiPolygon ); //! A helper method to dump to qdebug the geometry of a polygon - void dumpPolygon( QgsPolygon &thePolygon ); + void dumpPolygon( QgsPolygon &polygon ); //! A helper method to dump to qdebug the geometry of a polyline - void dumpPolyline( QgsPolyline &thePolyline ); + void dumpPolyline( QgsPolyline &polyline ); // Release return with delete [] unsigned char * hex2bytes( const char *hex, int *size ) @@ -3918,38 +3918,38 @@ void TestQgsGeometry::exportToGeoJSON() QCOMPARE( obtained, geojson ); } -bool TestQgsGeometry::renderCheck( const QString& theTestName, const QString& theComment, int mismatchCount ) +bool TestQgsGeometry::renderCheck( const QString& testName, const QString& comment, int mismatchCount ) { - mReport += "

" + theTestName + "

\n"; - mReport += "

" + theComment + "

\n"; + mReport += "

" + testName + "

\n"; + mReport += "

" + comment + "

\n"; QString myTmpDir = QDir::tempPath() + '/'; - QString myFileName = myTmpDir + theTestName + ".png"; + QString myFileName = myTmpDir + testName + ".png"; mImage.save( myFileName, "PNG" ); QgsRenderChecker myChecker; - myChecker.setControlName( "expected_" + theTestName ); + myChecker.setControlName( "expected_" + testName ); myChecker.setRenderedImage( myFileName ); - bool myResultFlag = myChecker.compareImages( theTestName, mismatchCount ); + bool myResultFlag = myChecker.compareImages( testName, mismatchCount ); mReport += myChecker.report(); return myResultFlag; } -void TestQgsGeometry::dumpMultiPolygon( QgsMultiPolygon &theMultiPolygon ) +void TestQgsGeometry::dumpMultiPolygon( QgsMultiPolygon &multiPolygon ) { qDebug( "Multipolygon Geometry Dump" ); - for ( int i = 0; i < theMultiPolygon.size(); i++ ) + for ( int i = 0; i < multiPolygon.size(); i++ ) { - QgsPolygon myPolygon = theMultiPolygon.at( i ); + QgsPolygon myPolygon = multiPolygon.at( i ); qDebug( "\tPolygon in multipolygon: %d", i ); dumpPolygon( myPolygon ); } } -void TestQgsGeometry::dumpPolygon( QgsPolygon &thePolygon ) +void TestQgsGeometry::dumpPolygon( QgsPolygon &polygon ) { QVector myPoints; - for ( int j = 0; j < thePolygon.size(); j++ ) + for ( int j = 0; j < polygon.size(); j++ ) { - QgsPolyline myPolyline = thePolygon.at( j ); //rings of polygon + QgsPolyline myPolyline = polygon.at( j ); //rings of polygon qDebug( "\t\tRing in polygon: %d", j ); for ( int k = 0; k < myPolyline.size(); k++ ) @@ -3962,14 +3962,14 @@ void TestQgsGeometry::dumpPolygon( QgsPolygon &thePolygon ) mpPainter->drawPolygon( myPoints ); } -void TestQgsGeometry::dumpPolyline( QgsPolyline &thePolyline ) +void TestQgsGeometry::dumpPolyline( QgsPolyline &polyline ) { QVector myPoints; -// QgsPolyline myPolyline = thePolyline.at( j ); //rings of polygon - for ( int j = 0; j < thePolyline.size(); j++ ) +// QgsPolyline myPolyline = polyline.at( j ); //rings of polygon + for ( int j = 0; j < polyline.size(); j++ ) { - QgsPoint myPoint = thePolyline.at( j ); -// QgsPolyline myPolyline = thePolygon.at( j ); //rings of polygon + QgsPoint myPoint = polyline.at( j ); +// QgsPolyline myPolyline = polygon.at( j ); //rings of polygon myPoints << QPointF( myPoint.x(), myPoint.y() ); qDebug( "\t\tPoint in line: %d", j ); diff --git a/tests/src/core/testqgsgradients.cpp b/tests/src/core/testqgsgradients.cpp index 5e211169c74..c4f257b8539 100644 --- a/tests/src/core/testqgsgradients.cpp +++ b/tests/src/core/testqgsgradients.cpp @@ -70,8 +70,8 @@ class TestQgsGradients : public QObject void gradientSymbolFromQml(); private: bool mTestHasError; - bool setQml( const QString& theType ); - bool imageCheck( const QString& theType ); + bool setQml( const QString& type ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QgsGradientFillSymbolLayer* mGradientFill = nullptr; @@ -265,12 +265,12 @@ void TestQgsGradients::gradientSymbolFromQml() // Private helper functions not called directly by CTest // -bool TestQgsGradients::setQml( const QString& theType ) +bool TestQgsGradients::setQml( const QString& type ) { //load a qml style and apply to our layer //the style will correspond to the renderer //type we are testing - QString myFileName = mTestDataDir + "polys_" + theType + "_symbol.qml"; + QString myFileName = mTestDataDir + "polys_" + type + "_symbol.qml"; bool myStyleFlag = false; QString error = mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag ); if ( !myStyleFlag ) @@ -280,16 +280,16 @@ bool TestQgsGradients::setQml( const QString& theType ) return myStyleFlag; } -bool TestQgsGradients::imageCheck( const QString& theTestType ) +bool TestQgsGradients::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image mMapSettings.setExtent( mpPolysLayer->extent() ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_gradient" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsinvertedpolygonrenderer.cpp b/tests/src/core/testqgsinvertedpolygonrenderer.cpp index b4678b37971..b9c179e01d7 100644 --- a/tests/src/core/testqgsinvertedpolygonrenderer.cpp +++ b/tests/src/core/testqgsinvertedpolygonrenderer.cpp @@ -57,7 +57,7 @@ class TestQgsInvertedPolygon : public QObject private: bool mTestHasError; bool setQml( QgsVectorLayer* vlayer, const QString& qmlFile ); - bool imageCheck( const QString& theType, const QgsRectangle* = 0 ); + bool imageCheck( const QString& type, const QgsRectangle* = 0 ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QString mTestDataDir; @@ -188,7 +188,7 @@ bool TestQgsInvertedPolygon::setQml( QgsVectorLayer* vlayer, const QString& qmlF return myStyleFlag; } -bool TestQgsInvertedPolygon::imageCheck( const QString& theTestType, const QgsRectangle* extent ) +bool TestQgsInvertedPolygon::imageCheck( const QString& testType, const QgsRectangle* extent ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -203,10 +203,10 @@ bool TestQgsInvertedPolygon::imageCheck( const QString& theTestType, const QgsRe mMapSettings.setOutputDpi( 96 ); QgsMultiRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_invertedpolygon" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); myChecker.setColorTolerance( 20 ); - bool myResultFlag = myChecker.runTest( theTestType, 100 ); + bool myResultFlag = myChecker.runTest( testType, 100 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgslinefillsymbol.cpp b/tests/src/core/testqgslinefillsymbol.cpp index 718824036f6..6e07f721a45 100644 --- a/tests/src/core/testqgslinefillsymbol.cpp +++ b/tests/src/core/testqgslinefillsymbol.cpp @@ -64,7 +64,7 @@ class TestQgsLineFillSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QgsLinePatternFillSymbolLayer* mLineFill = nullptr; @@ -163,7 +163,7 @@ void TestQgsLineFillSymbol::dataDefinedSubSymbol() // -bool TestQgsLineFillSymbol::imageCheck( const QString& theTestType ) +bool TestQgsLineFillSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -171,9 +171,9 @@ bool TestQgsLineFillSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_linefill" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsmaprotation.cpp b/tests/src/core/testqgsmaprotation.cpp index 5384e34c700..6cc616ce71c 100644 --- a/tests/src/core/testqgsmaprotation.cpp +++ b/tests/src/core/testqgsmaprotation.cpp @@ -63,7 +63,7 @@ class TestQgsMapRotation : public QObject // TODO: polygonsLayer private: - bool render( const QString& theFileName ); + bool render( const QString& fileName ); QString mTestDataDir; QgsRasterLayer * mRasterLayer = nullptr; @@ -220,15 +220,15 @@ void TestQgsMapRotation::linesLayer() // TODO: curved labels } -bool TestQgsMapRotation::render( const QString& theTestType ) +bool TestQgsMapRotation::render( const QString& testType ) { - mReport += "

" + theTestType + "

\n"; + mReport += "

" + testType + "

\n"; mMapSettings->setOutputDpi( 96 ); QgsRenderChecker checker; checker.setControlPathPrefix( QStringLiteral( "maprotation" ) ); - checker.setControlName( "expected_" + theTestType ); + checker.setControlName( "expected_" + testType ); checker.setMapSettings( *mMapSettings ); - bool result = checker.runTest( theTestType ); + bool result = checker.runTest( testType ); mReport += "\n\n\n" + checker.report(); return result; } diff --git a/tests/src/core/testqgsmarkerlinesymbol.cpp b/tests/src/core/testqgsmarkerlinesymbol.cpp index 9accd1e6651..4bc043c3adb 100644 --- a/tests/src/core/testqgsmarkerlinesymbol.cpp +++ b/tests/src/core/testqgsmarkerlinesymbol.cpp @@ -63,7 +63,7 @@ class TestQgsMarkerLineSymbol : public QObject void pointNumVertex(); private: - bool render( const QString& theFileName ); + bool render( const QString& fileName ); QString mTestDataDir; QgsVectorLayer* mLinesLayer = nullptr; @@ -201,15 +201,15 @@ void TestQgsMarkerLineSymbol::pointNumVertex() QVERIFY( render( "point_num_vertex" ) ); } -bool TestQgsMarkerLineSymbol::render( const QString& theTestType ) +bool TestQgsMarkerLineSymbol::render( const QString& testType ) { - mReport += "

" + theTestType + "

\n"; + mReport += "

" + testType + "

\n"; mMapSettings->setOutputDpi( 96 ); QgsRenderChecker checker; checker.setControlPathPrefix( QStringLiteral( "symbol_markerline" ) ); - checker.setControlName( "expected_" + theTestType ); + checker.setControlName( "expected_" + testType ); checker.setMapSettings( *mMapSettings ); - bool result = checker.runTest( theTestType ); + bool result = checker.runTest( testType ); mReport += "\n\n\n" + checker.report(); return result; } diff --git a/tests/src/core/testqgspointpatternfillsymbol.cpp b/tests/src/core/testqgspointpatternfillsymbol.cpp index 35da113eb1d..7d3b2eaea67 100644 --- a/tests/src/core/testqgspointpatternfillsymbol.cpp +++ b/tests/src/core/testqgspointpatternfillsymbol.cpp @@ -64,7 +64,7 @@ class TestQgsPointPatternFillSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QgsPointPatternFillSymbolLayer* mPointPatternFill = nullptr; @@ -165,7 +165,7 @@ void TestQgsPointPatternFillSymbol::dataDefinedSubSymbol() // -bool TestQgsPointPatternFillSymbol::imageCheck( const QString& theTestType ) +bool TestQgsPointPatternFillSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -173,9 +173,9 @@ bool TestQgsPointPatternFillSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_pointpatternfill" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsrasterfilewriter.cpp b/tests/src/core/testqgsrasterfilewriter.cpp index 0d1b12e1fee..e524667c52c 100644 --- a/tests/src/core/testqgsrasterfilewriter.cpp +++ b/tests/src/core/testqgsrasterfilewriter.cpp @@ -103,17 +103,17 @@ void TestQgsRasterFileWriter::writeTest() QVERIFY( allOK ); } -bool TestQgsRasterFileWriter::writeTest( const QString& theRasterName ) +bool TestQgsRasterFileWriter::writeTest( const QString& rasterName ) { - mReport += "

" + theRasterName + "

\n"; + mReport += "

" + rasterName + "

\n"; - QString myFileName = mTestDataDir + '/' + theRasterName; + QString myFileName = mTestDataDir + '/' + rasterName; qDebug() << myFileName; QFileInfo myRasterFileInfo( myFileName ); std::unique_ptr mpRasterLayer( new QgsRasterLayer( myRasterFileInfo.filePath(), myRasterFileInfo.completeBaseName() ) ); - qDebug() << theRasterName << " metadata: " << mpRasterLayer->dataProvider()->metadata(); + qDebug() << rasterName << " metadata: " << mpRasterLayer->dataProvider()->metadata(); if ( !mpRasterLayer->isValid() ) return false; diff --git a/tests/src/core/testqgsrasterfill.cpp b/tests/src/core/testqgsrasterfill.cpp index b845f9c353b..088165b7460 100644 --- a/tests/src/core/testqgsrasterfill.cpp +++ b/tests/src/core/testqgsrasterfill.cpp @@ -64,8 +64,8 @@ class TestQgsRasterFill : public QObject private: bool mTestHasError; - bool setQml( const QString& theType ); - bool imageCheck( const QString& theType ); + bool setQml( const QString& type ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QgsRasterFillSymbolLayer* mRasterFill = nullptr; @@ -192,12 +192,12 @@ void TestQgsRasterFill::width() // Private helper functions not called directly by CTest // -bool TestQgsRasterFill::setQml( const QString& theType ) +bool TestQgsRasterFill::setQml( const QString& type ) { //load a qml style and apply to our layer //the style will correspond to the renderer //type we are testing - QString myFileName = mTestDataDir + "polys_" + theType + "_symbol.qml"; + QString myFileName = mTestDataDir + "polys_" + type + "_symbol.qml"; bool myStyleFlag = false; QString error = mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag ); if ( !myStyleFlag ) @@ -207,7 +207,7 @@ bool TestQgsRasterFill::setQml( const QString& theType ) return myStyleFlag; } -bool TestQgsRasterFill::imageCheck( const QString& theTestType ) +bool TestQgsRasterFill::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -215,10 +215,10 @@ bool TestQgsRasterFill::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsMultiRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_rasterfill" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); myChecker.setColorTolerance( 20 ); - bool myResultFlag = myChecker.runTest( theTestType, 500 ); + bool myResultFlag = myChecker.runTest( testType, 500 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsrasterlayer.cpp b/tests/src/core/testqgsrasterlayer.cpp index 4878545a902..22e69114d00 100644 --- a/tests/src/core/testqgsrasterlayer.cpp +++ b/tests/src/core/testqgsrasterlayer.cpp @@ -95,8 +95,8 @@ class TestQgsRasterLayer : public QObject private: - bool render( const QString& theFileName, int mismatchCount = 0 ); - bool setQml( const QString& theType, QString& msg ); + bool render( const QString& fileName, int mismatchCount = 0 ); + bool setQml( const QString& type, QString& msg ); void populateColorRampShader( QgsColorRampShader* colorRampShader, QgsColorRamp* colorRamp, int numberOfEntries ); @@ -596,18 +596,18 @@ void TestQgsRasterLayer::registry() // -bool TestQgsRasterLayer::render( const QString& theTestType, int mismatchCount ) +bool TestQgsRasterLayer::render( const QString& testType, int mismatchCount ) { - mReport += "

" + theTestType + "

\n"; + mReport += "

" + testType + "

\n"; QgsRenderChecker myChecker; - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( *mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType, mismatchCount ); + bool myResultFlag = myChecker.runTest( testType, mismatchCount ); mReport += "\n\n\n" + myChecker.report(); return myResultFlag; } -bool TestQgsRasterLayer::setQml( const QString& theType, QString& msg ) +bool TestQgsRasterLayer::setQml( const QString& type, QString& msg ) { //load a qml style and apply to our layer if ( !mpLandsatRasterLayer->isValid() ) @@ -616,7 +616,7 @@ bool TestQgsRasterLayer::setQml( const QString& theType, QString& msg ) return false; } - QString myFileName = mTestDataDir + "landsat_" + theType + ".qml"; + QString myFileName = mTestDataDir + "landsat_" + type + ".qml"; bool myStyleFlag = false; QString loadStyleMsg; loadStyleMsg = mpLandsatRasterLayer->loadNamedStyle( myFileName, myStyleFlag ); diff --git a/tests/src/core/testqgsrenderers.cpp b/tests/src/core/testqgsrenderers.cpp index 2b24debf4df..2c626527172 100644 --- a/tests/src/core/testqgsrenderers.cpp +++ b/tests/src/core/testqgsrenderers.cpp @@ -62,8 +62,8 @@ class TestQgsRenderers : public QObject // void continuousSymbol(); private: bool mTestHasError; - bool setQml( const QString& theType ); //uniquevalue / continuous / single / - bool imageCheck( const QString& theType ); //as above + bool setQml( const QString& type ); //uniquevalue / continuous / single / + bool imageCheck( const QString& type ); //as above QgsMapSettings *mMapSettings = nullptr; QgsMapLayer * mpPointsLayer = nullptr; QgsMapLayer * mpLinesLayer = nullptr; @@ -156,7 +156,7 @@ void TestQgsRenderers::singleSymbol() // Private helper functions not called directly by CTest // -bool TestQgsRenderers::setQml( const QString& theType ) +bool TestQgsRenderers::setQml( const QString& type ) { //load a qml style and apply to our layer //the style will correspond to the renderer @@ -165,7 +165,7 @@ bool TestQgsRenderers::setQml( const QString& theType ) { return false; } - QString myFileName = mTestDataDir + "points_" + theType + "_symbol.qml"; + QString myFileName = mTestDataDir + "points_" + type + "_symbol.qml"; bool myStyleFlag = false; QString error = mpPointsLayer->loadNamedStyle( myFileName, myStyleFlag ); if ( !myStyleFlag ) @@ -177,7 +177,7 @@ bool TestQgsRenderers::setQml( const QString& theType ) { myStyleFlag = false; //ready for next test } - myFileName = mTestDataDir + "polys_" + theType + "_symbol.qml"; + myFileName = mTestDataDir + "polys_" + type + "_symbol.qml"; mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag ); if ( !myStyleFlag ) { @@ -187,12 +187,12 @@ bool TestQgsRenderers::setQml( const QString& theType ) { myStyleFlag = false; //ready for next test } - myFileName = mTestDataDir + "lines_" + theType + "_symbol.qml"; + myFileName = mTestDataDir + "lines_" + type + "_symbol.qml"; mpLinesLayer->loadNamedStyle( myFileName, myStyleFlag ); return myStyleFlag; } -bool TestQgsRenderers::imageCheck( const QString& theTestType ) +bool TestQgsRenderers::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -205,10 +205,10 @@ bool TestQgsRenderers::imageCheck( const QString& theTestType ) mMapSettings->setFlag( QgsMapSettings::ForceVectorOutput ); mMapSettings->setOutputDpi( 96 ); QgsMultiRenderChecker myChecker; - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( *mMapSettings ); myChecker.setColorTolerance( 15 ); - bool myResultFlag = myChecker.runTest( theTestType, 200 ); + bool myResultFlag = myChecker.runTest( testType, 200 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsshapeburst.cpp b/tests/src/core/testqgsshapeburst.cpp index 6fd36c520e5..6296f289606 100644 --- a/tests/src/core/testqgsshapeburst.cpp +++ b/tests/src/core/testqgsshapeburst.cpp @@ -67,8 +67,8 @@ class TestQgsShapeburst : public QObject private: bool mTestHasError; - bool setQml( const QString& theType ); - bool imageCheck( const QString& theType ); + bool setQml( const QString& type ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPolysLayer = nullptr; QgsShapeburstFillSymbolLayer* mShapeburstFill = nullptr; @@ -222,12 +222,12 @@ void TestQgsShapeburst::shapeburstSymbolFromQml() // Private helper functions not called directly by CTest // -bool TestQgsShapeburst::setQml( const QString& theType ) +bool TestQgsShapeburst::setQml( const QString& type ) { //load a qml style and apply to our layer //the style will correspond to the renderer //type we are testing - QString myFileName = mTestDataDir + "polys_" + theType + "_symbol.qml"; + QString myFileName = mTestDataDir + "polys_" + type + "_symbol.qml"; bool myStyleFlag = false; QString error = mpPolysLayer->loadNamedStyle( myFileName, myStyleFlag ); if ( !myStyleFlag ) @@ -237,7 +237,7 @@ bool TestQgsShapeburst::setQml( const QString& theType ) return myStyleFlag; } -bool TestQgsShapeburst::imageCheck( const QString& theTestType ) +bool TestQgsShapeburst::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -245,10 +245,10 @@ bool TestQgsShapeburst::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsMultiRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_shapeburst" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); myChecker.setColorTolerance( 20 ); - bool myResultFlag = myChecker.runTest( theTestType, 500 ); + bool myResultFlag = myChecker.runTest( testType, 500 ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgssimplemarker.cpp b/tests/src/core/testqgssimplemarker.cpp index db0afd32c50..5764d837573 100644 --- a/tests/src/core/testqgssimplemarker.cpp +++ b/tests/src/core/testqgssimplemarker.cpp @@ -70,7 +70,7 @@ class TestQgsSimpleMarkerSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPointsLayer = nullptr; QgsSimpleMarkerSymbolLayer* mSimpleMarkerLayer = nullptr; @@ -277,7 +277,7 @@ void TestQgsSimpleMarkerSymbol::colors() // -bool TestQgsSimpleMarkerSymbol::imageCheck( const QString& theTestType ) +bool TestQgsSimpleMarkerSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -285,9 +285,9 @@ bool TestQgsSimpleMarkerSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_simplemarker" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgssvgmarker.cpp b/tests/src/core/testqgssvgmarker.cpp index 78cea68bb42..bdbb8341836 100644 --- a/tests/src/core/testqgssvgmarker.cpp +++ b/tests/src/core/testqgssvgmarker.cpp @@ -63,7 +63,7 @@ class TestQgsSvgMarkerSymbol : public QObject private: bool mTestHasError; - bool imageCheck( const QString& theType ); + bool imageCheck( const QString& type ); QgsMapSettings mMapSettings; QgsVectorLayer * mpPointsLayer = nullptr; QgsSvgMarkerSymbolLayer* mSvgMarkerLayer = nullptr; @@ -159,7 +159,7 @@ void TestQgsSvgMarkerSymbol::bounds() // -bool TestQgsSvgMarkerSymbol::imageCheck( const QString& theTestType ) +bool TestQgsSvgMarkerSymbol::imageCheck( const QString& testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image @@ -167,9 +167,9 @@ bool TestQgsSvgMarkerSymbol::imageCheck( const QString& theTestType ) mMapSettings.setOutputDpi( 96 ); QgsRenderChecker myChecker; myChecker.setControlPathPrefix( QStringLiteral( "symbol_svgmarker" ) ); - myChecker.setControlName( "expected_" + theTestType ); + myChecker.setControlName( "expected_" + testType ); myChecker.setMapSettings( mMapSettings ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/core/testqgsvectorfilewriter.cpp b/tests/src/core/testqgsvectorfilewriter.cpp index cb5094be570..a5e08fb42c7 100644 --- a/tests/src/core/testqgsvectorfilewriter.cpp +++ b/tests/src/core/testqgsvectorfilewriter.cpp @@ -82,7 +82,7 @@ class TestQgsVectorFileWriter: public QObject private: // a little util fn used by all tests - bool cleanupFile( QString theFileBase ); + bool cleanupFile( QString fileBase ); QString mEncoding; QgsVectorFileWriter::WriterError mError; QgsCoordinateReferenceSystem mCRS; diff --git a/tests/src/gui/testqgsquickprint.cpp b/tests/src/gui/testqgsquickprint.cpp index 66ef6ce0545..527b98bf9de 100644 --- a/tests/src/gui/testqgsquickprint.cpp +++ b/tests/src/gui/testqgsquickprint.cpp @@ -53,7 +53,7 @@ class TestQgsQuickPrint : public QObject void basicMapTest(); private: - bool imageCheck( QString theType ); //as above + bool imageCheck( QString type ); //as above QgsMapRenderer * mpMapRenderer = nullptr; QgsMapLayer * mpPointsLayer = nullptr; QgsMapLayer * mpLinesLayer = nullptr; @@ -148,9 +148,9 @@ void TestQgsQuickPrint::basicMapTest() myQuickPrint.setTitle( "Map Title" ); myQuickPrint.setName( "Map Name" ); myQuickPrint.setCopyright( "Copyright Text" ); - //void setNorthArrow(QString theFileName); - //void setLogo1(QString theFileName); - //void setLogo2(QString theFileName); + //void setNorthArrow(QString fileName); + //void setLogo1(QString fileName); + //void setLogo2(QString fileName); myQuickPrint.printMap(); } @@ -159,16 +159,16 @@ void TestQgsQuickPrint::basicMapTest() // Helper functions below // -bool TestQgsQuickPrint::imageCheck( QString theTestType ) +bool TestQgsQuickPrint::imageCheck( QString testType ) { //use the QgsRenderChecker test utility class to //ensure the rendered output matches our control image mpMapRenderer->setExtent( mpPointsLayer->extent() ); - QString myExpectedImage = mTestDataDir + "expected_" + theTestType + ".png"; + QString myExpectedImage = mTestDataDir + "expected_" + testType + ".png"; QgsRenderChecker myChecker; myChecker.setExpectedImage( myExpectedImage ); myChecker.setMapRenderer( mpMapRenderer ); - bool myResultFlag = myChecker.runTest( theTestType ); + bool myResultFlag = myChecker.runTest( testType ); mReport += myChecker.report(); return myResultFlag; } diff --git a/tests/src/gui/testqgsrasterhistogram.cpp b/tests/src/gui/testqgsrasterhistogram.cpp index a18b3bbc615..cc7e883cb64 100644 --- a/tests/src/gui/testqgsrasterhistogram.cpp +++ b/tests/src/gui/testqgsrasterhistogram.cpp @@ -242,7 +242,7 @@ bool TestRasterHistogram::saveImage( const QString& fileName ) // test resulting image file - relax this test because there are too many possible outputs depending on machine // 1 means pass, 0 means warning (different images), -1 means fail (no image output) -int TestRasterHistogram::testFile( QString theTestType, +int TestRasterHistogram::testFile( QString testType, QString rendererName, QgsRasterRendererWidget* rendererWidget, QStringList actionsList, int selectedBand ) { @@ -268,25 +268,25 @@ int TestRasterHistogram::testFile( QString theTestType, mHistogramWidget->setSelectedBand( selectedBand ); } QString fileName = QDir::tempPath() + "/" + - theTestType + "_result.png"; + testType + "_result.png"; if ( ! saveImage( fileName ) ) { QWARN( QString( "Did not save image file " + fileName ).toLocal8Bit().data() ); return -1; } - mReport += "

" + theTestType + "

\n"; + mReport += "

" + testType + "

\n"; QgsRenderChecker myChecker; myChecker.setControlPathPrefix( mTestPrefix ); - myChecker.setControlName( "expected_histo_" + theTestType ); + myChecker.setControlName( "expected_histo_" + testType ); // myChecker.setMapRenderer( mpMapRenderer ); - bool myResultFlag = myChecker.compareImages( theTestType, 0, fileName ); + bool myResultFlag = myChecker.compareImages( testType, 0, fileName ); mReport += "\n\n\n" + myChecker.report(); // return myResultFlag; if ( ! myResultFlag ) { - QWARN( QString( "Test %1 failed with file %2 " ).arg( theTestType ).arg( fileName ).toLocal8Bit().data() ); + QWARN( QString( "Test %1 failed with file %2 " ).arg( testType ).arg( fileName ).toLocal8Bit().data() ); return 0; } return 1; diff --git a/tests/src/providers/testqgswcsprovider.cpp b/tests/src/providers/testqgswcsprovider.cpp index e65d233767e..f2d08dff317 100644 --- a/tests/src/providers/testqgswcsprovider.cpp +++ b/tests/src/providers/testqgswcsprovider.cpp @@ -43,7 +43,7 @@ class TestQgsWcsProvider: public QObject void read(); private: - bool read( const QString& theIdentifier, const QString& theWcsUri, const QString& theFilePath, QString & theReport ); + bool read( const QString& identifier, const QString& wcsUri, const QString& filePath, QString & report ); QString mTestDataDir; QString mReport; QString mUrl; @@ -149,14 +149,14 @@ void TestQgsWcsProvider::read() QVERIFY2( ok, "Reading data failed. See report for details." ); } -bool TestQgsWcsProvider::read( const QString& theIdentifier, const QString& theWcsUri, const QString& theFilePath, QString & theReport ) +bool TestQgsWcsProvider::read( const QString& identifier, const QString& wcsUri, const QString& filePath, QString & report ) { - theReport += QStringLiteral( "

Identifier (coverage): %1

" ).arg( theIdentifier ); + report += QStringLiteral( "

Identifier (coverage): %1

" ).arg( identifier ); QgsRasterChecker checker; - bool ok = checker.runTest( QStringLiteral( "wcs" ), theWcsUri, QStringLiteral( "gdal" ), theFilePath ); + bool ok = checker.runTest( QStringLiteral( "wcs" ), wcsUri, QStringLiteral( "gdal" ), filePath ); - theReport += checker.report(); + report += checker.report(); return ok; } diff --git a/tests/src/providers/testqgswcspublicservers.cpp b/tests/src/providers/testqgswcspublicservers.cpp index 0141dc506b7..5ab9edb6f32 100644 --- a/tests/src/providers/testqgswcspublicservers.cpp +++ b/tests/src/providers/testqgswcspublicservers.cpp @@ -544,14 +544,14 @@ void TestQgsWcsPublicServers::test() } } -void TestQgsWcsPublicServers::writeReport( const QString& theReport ) +void TestQgsWcsPublicServers::writeReport( const QString& report ) { QString myReportFile = mCacheDir.absolutePath() + "/index.html"; QFile myFile( myReportFile ); if ( myFile.open( QIODevice::WriteOnly | QIODevice::Truncate ) ) { QTextStream myStream( &myFile ); - myStream << theReport; + myStream << report; myFile.close(); } QgsDebugMsg( "Report written to " + myReportFile ); @@ -784,11 +784,11 @@ void TestQgsWcsPublicServers::report() writeReport( myRep ); } -QMap TestQgsWcsPublicServers::readLog( const QString& theFileName ) +QMap TestQgsWcsPublicServers::readLog( const QString& fileName ) { QMap myMap; - QFile myFile( theFileName ); + QFile myFile( fileName ); if ( myFile.open( QIODevice::ReadOnly ) ) { QTextStream myStream( &myFile ); @@ -802,46 +802,46 @@ QMap TestQgsWcsPublicServers::readLog( const QString& theFileN return myMap; } -QString TestQgsWcsPublicServers::error( const QString& theMessage ) +QString TestQgsWcsPublicServers::error( const QString& message ) { QString myRow = QStringLiteral( "Error: " ); - myRow += theMessage; + myRow += message; myRow += QLatin1String( "" ); return myRow; } -QString TestQgsWcsPublicServers::cells( const QStringList& theValues, const QString& theClass, int colspan, int rowspan ) +QString TestQgsWcsPublicServers::cells( const QStringList& values, const QString& classStr, int colspan, int rowspan ) { QString myRow; - for ( int i = 0; i < theValues.size(); i++ ) + for ( int i = 0; i < values.size(); i++ ) { - QString val = theValues.value( i ); + QString val = values.value( i ); QString colspanStr, rowspanStr; - if ( colspan > 1 && i == theValues.size() - 1 ) + if ( colspan > 1 && i == values.size() - 1 ) { - colspanStr = QStringLiteral( "colspan=%1" ).arg( colspan - theValues.size() + 1 ); + colspanStr = QStringLiteral( "colspan=%1" ).arg( colspan - values.size() + 1 ); } if ( rowspan > 1 ) { rowspanStr = QStringLiteral( "rowspan=%1" ).arg( rowspan ); } - myRow += QStringLiteral( "
" ).arg( theClass, colspanStr, rowspanStr, val ); + myRow += QStringLiteral( "" ).arg( classStr, colspanStr, rowspanStr, val ); } return myRow; } -QString TestQgsWcsPublicServers::row( const QStringList& theValues, const QString& theClass ) +QString TestQgsWcsPublicServers::row( const QStringList& values, const QString& classStr ) { QString myRow = QStringLiteral( "" ); - for ( int i = 0; i < theValues.size(); i++ ) + for ( int i = 0; i < values.size(); i++ ) { - QString val = theValues.value( i ); + QString val = values.value( i ); QString colspan; - if ( theValues.size() < mHead.size() && i == ( theValues.size() - 1 ) ) + if ( values.size() < mHead.size() && i == ( values.size() - 1 ) ) { - colspan = QStringLiteral( "colspan=%1" ).arg( mHead.size() - theValues.size() + 1 ); + colspan = QStringLiteral( "colspan=%1" ).arg( mHead.size() - values.size() + 1 ); } - myRow += QStringLiteral( "" ).arg( theClass, colspan, val ); + myRow += QStringLiteral( "" ).arg( classStr, colspan, val ); } myRow += QLatin1String( "\n" ); return myRow; diff --git a/tests/src/providers/testqgswcspublicservers.h b/tests/src/providers/testqgswcspublicservers.h index 4ea557caf15..999d5d1de8d 100644 --- a/tests/src/providers/testqgswcspublicservers.h +++ b/tests/src/providers/testqgswcspublicservers.h @@ -67,12 +67,12 @@ class TestQgsWcsPublicServers: public QObject void test(); void report(); private: - QString cells( const QStringList& theValues, const QString& theClass = QString(), int colspan = 1, int rowspan = 1 ); - QString row( const QStringList& theValues, const QString& theClass = QString() ); - QString error( const QString& theMessage ); - void writeReport( const QString& theReport ); + QString cells( const QStringList& values, const QString& classStr = QString(), int colspan = 1, int rowspan = 1 ); + QString row( const QStringList& values, const QString& classStr = QString() ); + QString error( const QString& message ); + void writeReport( const QString& report ); - QMap readLog( const QString& theFileName ); + QMap readLog( const QString& fileName ); Server getServer( const QString & url ); diff --git a/tests/src/python/acceptable_missing_doc.py b/tests/src/python/acceptable_missing_doc.py index 195c5e3a4b6..6bf4ae33bfa 100644 --- a/tests/src/python/acceptable_missing_doc.py +++ b/tests/src/python/acceptable_missing_doc.py @@ -125,7 +125,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsBrushStyleComboBox": ["setBrushStyle(Qt::BrushStyle style)", "QgsBrushStyleComboBox(QWidget *parent=nullptr)", "iconForBrush(Qt::BrushStyle style)", "brushStyle() const "], "QgsAttributeTableAction": ["featureForm()", "execute()", "QgsAttributeTableAction(const QString &name, QgsDualView *dualView, int action, const QModelIndex &fieldIdx)"], "QgsColorSwatchDelegate": ["QgsColorSwatchDelegate(QWidget *parent=nullptr)"], - "QgsRasterRenderer": ["opacity() const ", "MinMaxOrigin", "QgsRasterRenderer(QgsRasterInterface *input=nullptr, const QString &type=\"\")", "rasterTransparency() const ", "type() const ", "minMaxOriginLabel(int theOrigin)", "setAlphaBand(int band)", "minMaxOriginFromName(const QString &theName)", "setOpacity(double opacity)", "usesTransparency() const ", "alphaBand() const ", "setRasterTransparency(QgsRasterTransparency *t)", "minMaxOriginName(int theOrigin)"], + "QgsRasterRenderer": ["opacity() const ", "MinMaxOrigin", "QgsRasterRenderer(QgsRasterInterface *input=nullptr, const QString &type=\"\")", "rasterTransparency() const ", "type() const ", "minMaxOriginLabel(int origin)", "setAlphaBand(int band)", "minMaxOriginFromName(const QString &name)", "setOpacity(double opacity)", "usesTransparency() const ", "alphaBand() const ", "setRasterTransparency(QgsRasterTransparency *t)", "minMaxOriginName(int origin)"], "QgsTicksScaleBarStyle": ["TickPosition", "setTickPosition(TickPosition p)", "QgsTicksScaleBarStyle(const QgsComposerScaleBar *bar)"], "QgsComposerItemGroup": ["items()", "itemDestroyed()", "QgsComposerItemGroup(QgsComposition *c)", "childItemDeleted(QgsComposerItem *item)"], "QgsRangeWidgetFactory": ["QgsRangeWidgetFactory(const QString &name)"], @@ -153,7 +153,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsComposerShape": ["Shape", "setShapeType(QgsComposerShape::Shape s)", "shapeType() const ", "QgsComposerShape(qreal x, qreal y, qreal width, qreal height, QgsComposition *composition)", "QgsComposerShape(QgsComposition *composition)"], "QgsWMSLegendNode": ["QgsWMSLegendNode(QgsLayerTreeLayer *nodeLayer, QObject *parent=nullptr)"], "QgsRelationReferenceWidgetWrapper": ["QgsRelationReferenceWidgetWrapper(QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QgsMapCanvas *canvas, QgsMessageBar *messageBar, QWidget *parent=nullptr)"], - "QgsColorRampShader": ["QgsColorRampShader(double theMinimumValue=0.0, double theMaximumValue=255.0)", "clip() const ", "ColorRamp_TYPE", "setClip(bool clip)"], + "QgsColorRampShader": ["QgsColorRampShader(double minimumValue=0.0, double minimumValue=255.0)", "clip() const ", "ColorRamp_TYPE", "setClip(bool clip)"], "QgsSingleSymbolRendererWidget": ["changeSingleSymbol()", "scaleMethodChanged(QgsSymbol::ScaleMethod scaleMethod)", "QgsSingleSymbolRendererWidget(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)", "create(QgsVectorLayer *layer, QgsStyle *style, QgsFeatureRenderer *renderer)", "sizeScaleFieldChanged(const QString &fldName)", "showSymbolLevels()"], "QgsRequestHandler": ["setDefaultHeaders()"], "QgsEditorWidgetRegistry": ["createSearchWidget(const QString &widgetId, QgsVectorLayer *vl, int fieldIdx, const QVariantMap &config, QWidget *parent, const QgsAttributeEditorContext &context=QgsAttributeEditorContext())"], @@ -185,7 +185,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsScaleExpression": ["Type", "operator bool() const "], "QgsSvgMarkerSymbolLayer": ["outlineWidthMapUnitScale() const ", "path() const ", "setOutlineWidthMapUnitScale(const QgsMapUnitScale &scale)", "setOutlineWidth(double w)", "outlineWidthUnit() const ", "QgsSvgMarkerSymbolLayer(const QString &name=DEFAULT_SVGMARKER_NAME, double size=DEFAULT_SVGMARKER_SIZE, double angle=DEFAULT_SVGMARKER_ANGLE, QgsSymbol::ScaleMethod scaleMethod=DEFAULT_SCALE_METHOD)", "create(const QgsStringMap &properties=QgsStringMap())", "setOutlineWidthUnit(QgsSymbol::OutputUnit unit)", "setPath(const QString &path)", "createFromSld(QDomElement &element)", "outlineWidth() const "], "QgsDateTimeEditWrapper": ["QgsDateTimeEditWrapper(QgsVectorLayer *vl, int fieldIdx, QWidget *editor, QWidget *parent=nullptr)"], - "QgsMultiBandColorRendererWidget": ["QgsMultiBandColorRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "create(QgsRasterLayer *layer, const QgsRectangle &theExtent)", "setFromRenderer(const QgsRasterRenderer *r)", "loadMinMax(int theBandNo, double theMin, double theMax, int theOrigin)"], + "QgsMultiBandColorRendererWidget": ["QgsMultiBandColorRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "create(QgsRasterLayer *layer, const QgsRectangle &extent)", "setFromRenderer(const QgsRasterRenderer *r)", "loadMinMax(int bandNo, double min, double max, int origin)"], "QgsAnimatedIcon": ["setIconPath(const QString &iconPath)", "iconPath() const ", "icon() const ", "onFrameChanged()"], "pal::Layer": ["LabelMode", "displayAll() const ", "UpsideDownLabels"], "QgsComposerGroupItem": ["QgsComposerGroupItem(const QString &text)"], @@ -216,7 +216,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsDataDefinedRotationDialog": ["QgsDataDefinedRotationDialog(const QList< QgsSymbol * > &symbolList, QgsVectorLayer *layer)"], "QgsException": ["QgsException(QString const &what)"], "QgsEllipseSymbolLayerWidget": ["QgsEllipseSymbolLayerWidget(const QgsVectorLayer *vl, QWidget *parent=nullptr)", "create(const QgsVectorLayer *vl)"], - "QgsSingleBandPseudoColorRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &theExtent)", "setFromRenderer(const QgsRasterRenderer *r)", "QgsSingleBandPseudoColorRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "Mode", "loadMinMax(int theBandNo, double theMin, double theMax, int theOrigin)"], + "QgsSingleBandPseudoColorRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &extent)", "setFromRenderer(const QgsRasterRenderer *r)", "QgsSingleBandPseudoColorRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "Mode", "loadMinMax(int bandNo, double min, double max, int origin)"], "QgsSvgCache": ["instance()", "replaceParamsAndCacheSvg(QgsSvgCacheEntry *entry)", "cachePicture(QgsSvgCacheEntry *entry, bool forceVectorOutput=false)", "cacheImage(QgsSvgCacheEntry *entry)", "takeEntryFromList(QgsSvgCacheEntry *entry)"], "QgsMessageViewer": ["setCheckBoxText(const QString &text)", "setMessageAsPlainText(const QString &msg)", "checkBoxState()", "setCheckBoxState(Qt::CheckState state)", "setCheckBoxVisible(bool visible)", "setCheckBoxQSettingsLabel(const QString &label)", "setMessageAsHtml(const QString &msg)", "QgsMessageViewer(QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags, bool deleteOnClose=true)"], "QgsLabelSorter": ["QgsLabelSorter(const QgsMapSettings &mapSettings)", "operator()(pal::LabelPosition *lp1, pal::LabelPosition *lp2) const "], @@ -235,7 +235,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsSingleBoxScaleBarStyle": ["QgsSingleBoxScaleBarStyle(const QgsComposerScaleBar *bar)"], "QgsMapLayerAction": ["Target"], "QgsSingleSymbolRenderer": ["createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)", "scaleMethod() const ", "setSizeScaleField(const QString &fieldOrExpression)", "QgsSingleSymbolRenderer(QgsSymbol *symbol)", "symbol() const ", "sizeScaleField() const ", "setSymbol(QgsSymbol *s)", "setScaleMethod(QgsSymbol::ScaleMethod scaleMethod)"], - "QgsDetailedItemData": ["category() const ", "icon() const ", "setTitle(const QString &theTitle)", "setChecked(const bool theFlag)", "detail() const ", "setCategory(const QString &theCategory)", "setCheckable(const bool theFlag)", "isEnabled() const ", "isCheckable() const ", "setIcon(const QPixmap &theIcon)", "title() const ", "isRenderedAsWidget() const ", "isChecked() const ", "setDetail(const QString &theDetail)", "setEnabled(bool theFlag)"], + "QgsDetailedItemData": ["category() const ", "icon() const ", "setTitle(const QString &title)", "setChecked(const bool flag)", "detail() const ", "setCategory(const QString &category)", "setCheckable(const bool flag)", "isEnabled() const ", "isCheckable() const ", "setIcon(const QPixmap &icon)", "title() const ", "isRenderedAsWidget() const ", "isChecked() const ", "setDetail(const QString &detail)", "setEnabled(bool flag)"], "QgsPluginLayerType": ["QgsPluginLayerType(const QString &name)", "name()"], "QgsRenderContext": ["coordinateTransform() const ", "drawEditingInformation() const ", "QgsRenderContext(const QgsRenderContext &rh)", "setPainter(QPainter *p)", "setUseRenderingOptimization(bool enabled)", "setMapToPixel(const QgsMapToPixel &mtp)", "selectionColor() const ", "setVectorSimplifyMethod(const QgsVectorSimplifyMethod &simplifyMethod)", "extent() const ", "setDrawEditingInformation(bool b)", "constPainter() const ", "scaleFactor() const ", "labelingEngine() const ", "renderingStopped() const ", "mapToPixel() const ", "rendererScale() const ", "painter()", "setScaleFactor(double factor)", "setExtent(const QgsRectangle &extent)", "forceVectorOutput() const ", "setForceVectorOutput(bool force)", "setRasterScaleFactor(double factor)", "setLabelingEngine(QgsLabelingEngineInterface *iface)", "setRendererScale(double scale)", "rasterScaleFactor() const ", "setRenderingStopped(bool stopped)", "setSelectionColor(const QColor &color)"], "QgsMessageBar": ["MessageLevel", "currentItem()", "QgsMessageBar(QWidget *parent=nullptr)"], @@ -283,7 +283,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsSLConnect": ["sqlite3_close_v2(sqlite3 *)", "sqlite3_close(sqlite3 *)", "sqlite3_open(const char *filename, sqlite3 **ppDb)", "sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs)"], "QgsVectorColorBrewerColorRamp": ["listSchemeNames()", "QgsVectorColorBrewerColorRamp(const QString &schemeName=DEFAULT_COLORBREWER_SCHEMENAME, int colors=DEFAULT_COLORBREWER_COLORS)", "setColors(int colors)", "loadPalette()", "colors() const ", "schemeName() const ", "create(const QgsStringMap &properties=QgsStringMap())", "setSchemeName(const QString &schemeName)", "listSchemeVariants(const QString &schemeName)"], "QgsPointCompare": ["operator()(const QgsPoint &p1, const QgsPoint &p2) const ", "QgsPointCompare(double tolerance)"], - "QgsRasterShaderFunction": ["minimumValue() const ", "QgsRasterShaderFunction(double theMinimumValue=0.0, double theMaximumValue=255.0)", "maximumValue() const ", "minimumMaximumRange() const ", "legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const "], + "QgsRasterShaderFunction": ["minimumValue() const ", "QgsRasterShaderFunction(double minimumValue=0.0, double maximumValue=255.0)", "maximumValue() const ", "minimumMaximumRange() const ", "legendSymbologyItems(QList< QPair< QString, QColor > > &symbolItems) const "], "QgsRasterPyramidsOptionsWidget": ["pyramidsFormat() const ", "overviewList() const ", "overviewListChanged()", "QgsRasterPyramidsOptionsWidget(QWidget *parent=nullptr, const QString &provider=\"gdal\")", "setRasterLayer(QgsRasterLayer *rasterLayer)", "checkAllLevels(bool checked)", "setRasterFileName(const QString &file)", "resamplingMethod() const ", "configOptions() const ", "someValueChanged()", "apply()", "createOptionsWidget()"], "QgsRasterFillSymbolLayerWidget": ["QgsRasterFillSymbolLayerWidget(const QgsVectorLayer *vl, QWidget *parent=nullptr)", "create(const QgsVectorLayer *vl)"], "QgsErrorMessage": ["function() const ", "line() const ", "file() const ", "tag() const ", "message() const "], @@ -303,7 +303,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsScaleVisibilityDialog": ["QgsScaleVisibilityDialog(QWidget *parent=nullptr, const QString &title=QString(), QgsMapCanvas *mapCanvas=nullptr)"], "QgsGraduatedSymbolRenderer": ["scaleMethod() const ", "QgsGraduatedSymbolRenderer(const QString &attrName=QString(), const QgsRangeList &ranges=QgsRangeList())", "updateRangeUpperValue(int rangeIndex, double value)", "sortByValue(Qt::SortOrder order=Qt::AscendingOrder)", "createRenderer(QgsVectorLayer *vlayer, const QString &attrName, int classes, Mode mode, QgsSymbol *symbol, QgsVectorColorRamp *ramp, bool inverted=false, const QgsRendererRangeLabelFormat &legendFormat=QgsRendererRangeLabelFormat())", "addClass(QgsSymbol *symbol)", "setInvertedColorRamp(bool inverted)", "setMode(Mode mode)", "updateRangeSymbol(int rangeIndex, QgsSymbol *symbol)", "setSizeScaleField(const QString &fieldOrExpression)", "updateRangeLowerValue(int rangeIndex, double value)", "GraduatedMethod", "deleteClass(int idx)", "deleteAllClasses()", "Mode", "setClassAttribute(const QString &attr)", "sortByLabel(Qt::SortOrder order=Qt::AscendingOrder)", "symbolForValue(double value)", "setScaleMethod(QgsSymbol::ScaleMethod scaleMethod)", "updateRangeLabel(int rangeIndex, const QString &label)", "ranges() const ", "mode() const ", "sizeScaleField() const ", "classAttribute() const "], "QgsPaintEffectWidget": ["QgsPaintEffectWidget(QWidget *parent=nullptr)"], - "QgsDetailedItemDelegate": ["QgsDetailedItemDelegate(QObject *parent=nullptr)", "horizontalSpacing() const ", "setHorizontalSpacing(int theValue)", "setVerticalSpacing(int theValue)", "verticalSpacing() const "], + "QgsDetailedItemDelegate": ["QgsDetailedItemDelegate(QObject *parent=nullptr)", "horizontalSpacing() const ", "setHorizontalSpacing(int value)", "setVerticalSpacing(int value)", "verticalSpacing() const "], "FieldSorter": ["FieldSorter(QgsAtlasComposition::SorterKeys &keys, bool ascending=true)", "operator()(const QPair< QgsFeatureId, QString > &id1, const QPair< QgsFeatureId, QString > &id2)"], "QgsMessageLogConsole": ["logMessage(const QString &message, const QString &tag, QgsMessageLog::MessageLevel level)"], "QgsEncodingFileDialog": ["saveUsedEncoding()", "QgsEncodingFileDialog(QWidget *parent=nullptr, const QString &caption=QString(), const QString &directory=QString(), const QString &filter=QString(), const QString &encoding=QString())", "pbnCancelAll_clicked()"], @@ -317,7 +317,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsValueRelationWidgetWrapper": ["orderByKeyLessThan(const QgsValueRelationWidgetWrapper::ValueRelationItem &p1, const QgsValueRelationWidgetWrapper::ValueRelationItem &p2)", "orderByValueLessThan(const QgsValueRelationWidgetWrapper::ValueRelationItem &p1, const QgsValueRelationWidgetWrapper::ValueRelationItem &p2)", "QgsValueRelationWidgetWrapper(QgsVectorLayer *vl, int fieldIdx, QWidget *editor=nullptr, QWidget *parent=nullptr)", "createCache(const QVariantMap &config)", "None"], "QgsCptCityColorRampItem": ["init()", "QgsCptCityColorRampItem(QgsCptCityDataItem *parent, const QString &name, const QString &path, const QStringList &variantList, bool initialize=false)", "QgsCptCityColorRampItem(QgsCptCityDataItem *parent, const QString &name, const QString &path, const QString &variantName=QString(), bool initialize=false)", "ramp() const "], "QgsMasterPasswordResetDialog": ["QgsMasterPasswordResetDialog(QWidget *parent=nullptr)", "requestMasterPasswordReset(QString *newpass, QString *oldpass, bool *keepbackup)"], - "QgsRasterRange": ["min() const ", "max() const ", "setMax(double theMax)", "setMin(double theMin)"], + "QgsRasterRange": ["min() const ", "max() const ", "setMax(double max)", "setMin(double min)"], "QgsSymbol": ["mapUnitScale() const ", "layer() const ", "None", "QgsSymbol(SymbolType type, const QgsSymbolLayerList &layers)", "RenderHint", "renderHints() const ", "outputUnit() const ", "type() const ", "clone() const =0", "startRender(QgsRenderContext &context, const QgsFields *fields=nullptr)", "toSld(QDomDocument &doc, QDomElement &element, QgsStringMap props) const ", "setColor(const QColor &color)", "setRenderHints(int hints)", "color() const ", "dump() const ", "setMapUnitScale(const QgsMapUnitScale &scale)", "setOutputUnit(QgsSymbol::OutputUnit u)", "stopRender(QgsRenderContext &context)"], "QgsComposition": ["setSnapGridOffsetX(const double offset)", "moveSelectedItemsToTop()", "setGridStyle(const GridStyle s)", "worldFileMap() const ", "setSnapToGridEnabled(const bool b)", "atlasComposition()", "setSnapGridOffsetY(const double offset)", "setSmartGuidesEnabled(const bool b)", "endMultiFrameCommand()", "alignSelectedItemsLeft()", "setPrintAsRaster(const bool enabled)", "snapGridResolution() const ", "setGenerateWorldFile(const bool enabled)", "alignmentSnap() const ", "setSnapGridResolution(const double r)", "alignSelectedItemsBottom()", "moveSelectedItemsToBottom()", "init()", "moveItemToBottom(QgsComposerItem *item)", "selectNextByZOrder(const ZValueDirection direction)", "gridStyle() const ", "setPrintResolution(const int dpi)", "lowerSelectedItems()", "raiseSelectedItems()", "alignSelectedItemsRight()", "snapGridOffsetY() const ", "getComposerItemBelow(QgsComposerItem *item) const ", "setWorldFileMap(QgsComposerMap *map)", "nPagesChanged()", "getComposerItemAbove(QgsComposerItem *item) const ", "setGridPen(const QPen &p)", "printResolution() const ", "smartGuidesEnabled() const ", "snapGridOffsetX() const ", "printAsRaster() const ", "gridVisible() const ", "moveItemToTop(QgsComposerItem *item)", "plotStyle() const ", "raiseItem(QgsComposerItem *item)", "setGridVisible(const bool b)", "snapToGridEnabled() const ", "setPlotStyle(const QgsComposition::PlotStyle style)", "lowerItem(QgsComposerItem *item)", "alignSelectedItemsTop()", "generateWorldFile() const ", "gridPen() const ", "alignSelectedItemsVCenter()", "paperSizeChanged()", "snapLinesVisible() const ", "ZValueDirection", "setAlignmentSnap(const bool s)", "alignSelectedItemsHCenter()", "QgsComposition(const QgsMapSettings &mapSettings)", "PaperOrientation", "beginMultiFrameCommand(QgsComposerMultiFrame *multiFrame, const QString &text, const QgsComposerMultiFrameMergeCommand::Context c=QgsComposerMultiFrameMergeCommand::Unknown)", "preventCursorChange() const "], "QgsGml": ["dataProgressAndSteps(int progress, int totalSteps)", "dataReadProgress(int progress)", "QgsGml(const QString &typeName, const QString &geometryAttribute, const QgsFields &fields)", "totalStepsUpdate(int totalSteps)"], @@ -328,7 +328,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsMapToPixel": ["toMapPoint(double x, double y) const ", "transform(QgsPoint *p) const ", "transformInPlace(float &x, float &y) const ", "toMapCoordinates(int x, int y) const ", "transform() const "], "QgsPenJoinStyleComboBox": ["penJoinStyle() const ", "setPenJoinStyle(Qt::PenJoinStyle style)", "QgsPenJoinStyleComboBox(QWidget *parent=nullptr)"], "QgsPaintEngineHack": ["fixEngineFlags(QPaintEngine *engine)", "fixFlags()"], - "QgsRasterDataProvider": ["colorName(int colorInterpretation) const ", "progressUpdate(int theProgress)", "identifyFormatToCapability(QgsRaster::IdentifyFormat format)", "makeTableCell(const QString &value)", "identifyFormatName(QgsRaster::IdentifyFormat format)", "setUserNoDataValue(int bandNo, const QgsRasterRangeList &noData)", "colorTable(int bandNo) const ", "identifyFormatLabel(QgsRaster::IdentifyFormat format)", "makeTableCells(const QStringList &values)", "identifyFormatFromName(const QString &formatName)", "QgsRasterDataProvider(const QString &uri)", "colorInterpretationName(int theBandNo) const "], + "QgsRasterDataProvider": ["colorName(int colorInterpretation) const ", "progressUpdate(int progress)", "identifyFormatToCapability(QgsRaster::IdentifyFormat format)", "makeTableCell(const QString &value)", "identifyFormatName(QgsRaster::IdentifyFormat format)", "setUserNoDataValue(int bandNo, const QgsRasterRangeList &noData)", "colorTable(int bandNo) const ", "identifyFormatLabel(QgsRaster::IdentifyFormat format)", "makeTableCells(const QStringList &values)", "identifyFormatFromName(const QString &formatName)", "QgsRasterDataProvider(const QString &uri)", "colorInterpretationName(int bandNo) const "], "QgsAdvancedDigitizingDockWidget::CadConstraint": ["CadConstraint(QLineEdit *lineEdit, QToolButton *lockerButton, QToolButton *relativeButton=nullptr)"], "QgsProject": ["readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const ", "readEntry(const QString &scope, const QString &key, const QString &def=QString::null, bool *ok=nullptr) const ", "dirty(bool b)", "write()", "loadingLayer(const QString &)", "writeEntry(const QString &scope, const QString &key, const QString &value)", "snapSettingsChanged()", "readNumEntry(const QString &scope, const QString &key, int def=0, bool *ok=nullptr) const ", "writeEntry(const QString &scope, const QString &key, int value)", "relationManager() const ", "writeEntry(const QString &scope, const QString &key, const QStringList &value)", "readDoubleEntry(const QString &scope, const QString &key, double def=0, bool *ok=nullptr) const "], "QgsMapLayerModel": ["removeLayers(const QStringList &layerIds)", "addLayers(const QList< QgsMapLayer * > &layers)"], @@ -337,8 +337,8 @@ ACCEPTABLE_MISSING_DOCS = { "pal::FeaturePart": ["getLabelDistance() const ", "FeaturePart(const FeaturePart &other)", "addSizePenalty(int nbp, QList< LabelPosition * > &lPos, double bbx[4], double bby[4])", "getLabelAngle()", "getLabelHeight() const ", "obstacleFactor()", "getLabelWidth() const ", "curvedPlacementAtOffset(PointSet *path_positions, double *path_distances, int orientation, int index, double distance)", "getFixedRotation()", "isObstacle()", "repeatDistance()", "getFixedPosition()", "getAlwaysShow()"], "QgsProviderExtentCalcEvent": ["QgsProviderExtentCalcEvent(QgsRectangle *layerExtent)", "layerExtent() const "], "QgsGmlFeatureClass": ["fields()", "QgsGmlFeatureClass(const QString &name, const QString &path)", "path() const ", "geometryAttributes()", "fieldIndex(const QString &name)"], - "QgsOwsConnection": ["connectionList(const QString &theService)", "uri()", "selectedConnection(const QString &theService)", "setSelectedConnection(const QString &theService, const QString &name)", "deleteConnection(const QString &theService, const QString &name)"], - "QgsDatumTransformStore": ["clear()", "QgsDatumTransformStore(const QgsCoordinateReferenceSystem &destCrs)", "addEntry(const QString &layerId, const QString &srcAuthId, const QString &destAuthId, int srcDatumTransform, int destDatumTransform)", "setDestinationCrs(const QgsCoordinateReferenceSystem &destCrs)", "hasEntryForLayer(QgsMapLayer *layer) const ", "writeXML(QDomNode &parentNode, QDomDocument &theDoc) const ", "readXML(const QDomNode &parentNode)"], + "QgsOwsConnection": ["connectionList(const QString &service)", "uri()", "selectedConnection(const QString &service)", "setSelectedConnection(const QString &service, const QString &name)", "deleteConnection(const QString &service, const QString &name)"], + "QgsDatumTransformStore": ["clear()", "QgsDatumTransformStore(const QgsCoordinateReferenceSystem &destCrs)", "addEntry(const QString &layerId, const QString &srcAuthId, const QString &destAuthId, int srcDatumTransform, int destDatumTransform)", "setDestinationCrs(const QgsCoordinateReferenceSystem &destCrs)", "hasEntryForLayer(QgsMapLayer *layer) const ", "writeXML(QDomNode &parentNode, QDomDocument &doc) const ", "readXML(const QDomNode &parentNode)"], "QgsVectorFieldSymbolLayerWidget": ["create(const QgsVectorLayer *vl)", "QgsVectorFieldSymbolLayerWidget(const QgsVectorLayer *vl, QWidget *parent=nullptr)"], "QgsFieldProxyModel": ["Filter", "filters() const "], "QgsNumericSortTreeWidgetItem": ["QgsNumericSortTreeWidgetItem(QTreeWidgetItem *parent)"], @@ -354,7 +354,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsDummyConfigDlg": ["QgsDummyConfigDlg(QgsVectorLayer *vl, int fieldIdx, QWidget *parent, const QString &description)"], "QgsZonalStatistics": ["QgsZonalStatistics(QgsVectorLayer *polygonLayer, const QString &rasterFile, const QString &attributePrefix=\"\", int rasterBand=1, const Statistics &stats=Statistics(Count|Sum|Mean))"], "QgsRuleBasedRenderer": ["createFromSld(QDomElement &element, QgsWkbTypes::GeometryType geomType)", "FeatureFlags", "None", "create(QDomElement &element)", "rootRule()"], - "QgsRasterDrawer": ["draw(QPainter *p, QgsRasterViewPort *viewPort, const QgsMapToPixel *theQgsMapToPixel)", "QgsRasterDrawer(QgsRasterIterator *iterator)"], + "QgsRasterDrawer": ["draw(QPainter *p, QgsRasterViewPort *viewPort, const QgsMapToPixel *qgsMapToPixel)", "QgsRasterDrawer(QgsRasterIterator *iterator)"], "QgsOfflineEditing": ["ProgressMode"], "QgsRendererRangeLabelFormat": ["saveToDomElement(QDomElement &element)", "setPrecision(int precision)", "setFromDomElement(QDomElement &element)", "setFormat(const QString &format)", "QgsRendererRangeLabelFormat(const QString &format, int precision=4, bool trimTrailingZeroes=false)", "formatNumber(double value) const ", "format() const ", "setTrimTrailingZeroes(bool trimTrailingZeroes)", "labelForRange(const QgsRendererRange &range) const ", "trimTrailingZeroes() const ", "precision() const "], "QgsCharacterSelectorDialog": ["QgsCharacterSelectorDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags)", "selectCharacter(bool *gotChar, const QFont &font, const QString &style)"], @@ -376,20 +376,20 @@ ACCEPTABLE_MISSING_DOCS = { "QgsRasterFileWriter": ["buildPyramidsFlag() const ", "maxTileHeight() const ", "setBuildPyramidsFlag(QgsRaster::RasterBuildPyramids f)", "outputProviderKey() const ", "setPyramidsFormat(QgsRaster::RasterPyramidsFormat f)", "setCreateOptions(const QStringList &list)", "setPyramidsResampling(const QString &str)", "setPyramidsConfigOptions(const QStringList &list)", "tiledMode() const ", "setMaxTileHeight(int h)", "WriterError", "setOutputProviderKey(const QString &key)", "createOptions() const ", "setTiledMode(bool t)", "setOutputFormat(const QString &format)", "pyramidsList() const ", "Mode", "pyramidsResampling() const ", "pyramidsConfigOptions() const ", "pyramidsFormat() const ", "outputFormat() const ", "QgsRasterFileWriter(const QString &outputUrl)", "maxTileWidth() const ", "setMaxTileWidth(int w)", "setPyramidsList(const QList< int > &list)"], "QgsProjectBadLayerHandler": ["handleBadLayers(const QList< QDomNode > &layers, const QDomDocument &projectDom)=0"], "QgsVectorLayerCache": ["QgsVectorLayerCache(QgsVectorLayer *layer, int cacheSize, QObject *parent=nullptr)"], - "QgsRasterPipe": ["QgsRasterPipe(const QgsRasterPipe &thePipe)", "size() const ", "renderer() const ", "at(int idx) const ", "resampleFilter() const ", "provider() const ", "brightnessFilter() const ", "nuller() const ", "hueSaturationFilter() const ", "last() const ", "projector() const ", "Role"], + "QgsRasterPipe": ["QgsRasterPipe(const QgsRasterPipe &pipe)", "size() const ", "renderer() const ", "at(int idx) const ", "resampleFilter() const ", "provider() const ", "brightnessFilter() const ", "nuller() const ", "hueSaturationFilter() const ", "last() const ", "projector() const ", "Role"], "QgsDbFilterProxyModel": ["QgsDbFilterProxyModel(QObject *parent=nullptr)"], "QgsMarkerLineSymbolLayerWidget": ["create(const QgsVectorLayer *vl)", "setOffsetAlongLine(double val)", "setPlacement()", "setInterval(double val)", "setOffset()", "setRotate()", "QgsMarkerLineSymbolLayerWidget(const QgsVectorLayer *vl, QWidget *parent=nullptr)"], "QgsDataDefinedAssistant": ["dataDefined() const =0"], "QgsTransaction": ["QgsTransaction(const QString &connString)"], "QgsBrowserTreeView": ["hasExpandedDescendant(const QModelIndex &index) const ", "setSettingsSection(const QString §ion)", "QgsBrowserTreeView(QWidget *parent=nullptr)"], "QgsDistanceArea": ["computePolygonFlatArea(const QList< QgsPoint > &points) const "], - "QgsContrastEnhancement": ["writeXML(QDomDocument &doc, QDomElement &parentElem) const ", "QgsContrastEnhancement(const QgsContrastEnhancement &ce)", "QgsContrastEnhancement(Qgis::DataType theDatatype=Qgis::Byte)", "contrastEnhancementAlgorithm() const ", "readXML(const QDomElement &elem)", "contrastEnhancementAlgorithmFromString(const QString &contrastEnhancementString)", "contrastEnhancementAlgorithmString(ContrastEnhancementAlgorithm algorithm)"], + "QgsContrastEnhancement": ["writeXML(QDomDocument &doc, QDomElement &parentElem) const ", "QgsContrastEnhancement(const QgsContrastEnhancement &ce)", "QgsContrastEnhancement(Qgis::DataType datatype=Qgis::Byte)", "contrastEnhancementAlgorithm() const ", "readXML(const QDomElement &elem)", "contrastEnhancementAlgorithmFromString(const QString &contrastEnhancementString)", "contrastEnhancementAlgorithmString(ContrastEnhancementAlgorithm algorithm)"], "QgsExpression::Interval": ["Interval(double seconds=0)"], "QgsManageConnectionsDialog": ["doExportImport()", "selectionChanged()", "Mode", "clearSelection()", "QgsManageConnectionsDialog(QWidget *parent=nullptr, Mode mode=Export, Type type=WMS, const QString &fileName=\"\")", "selectAll()", "Type"], "QgsAttributeTableView": ["repaintRequested()", "_q_selectRow(int row)", "setModel(QgsAttributeTableFilterModel *filterModel)", "finished()", "selectRow(int row)", "repaintRequested(const QModelIndexList &indexes)", "QgsAttributeTableView(QWidget *parent=nullptr)"], "QgsSimpleMarkerSymbolLayer": ["outlineWidthMapUnitScale() const ", "setName(const QString &name)", "setBorderColor(const QColor &color)", "outlineStyle() const ", "setOutlineWidthUnit(QgsSymbol::OutputUnit u)", "setOutlineWidthMapUnitScale(const QgsMapUnitScale &scale)", "setOutlineWidth(double w)", "borderColor() const ", "preparePath(QString name=QString())", "prepareShape(const QString &name=QString())", "name() const ", "prepareShape(const QString &name, QPolygonF &polygon) const ", "QgsSimpleMarkerSymbolLayer(const QString &name=DEFAULT_SIMPLEMARKER_NAME, const QColor &color=DEFAULT_SIMPLEMARKER_COLOR, const QColor &borderColor=DEFAULT_SIMPLEMARKER_BORDERCOLOR, double size=DEFAULT_SIMPLEMARKER_SIZE, double angle=DEFAULT_SIMPLEMARKER_ANGLE, QgsSymbol::ScaleMethod scaleMethod=DEFAULT_SCALE_METHOD)", "drawMarker(QPainter *p, QgsSymbolRenderContext &context)", "create(const QgsStringMap &properties=QgsStringMap())", "setOutlineStyle(Qt::PenStyle outlineStyle)", "outlineWidthUnit() const ", "createFromSld(QDomElement &element)", "outlineWidth() const "], "QgsStyleExportImportDialog": ["QgsStyleExportImportDialog(QgsStyle *style, QWidget *parent=nullptr, Mode mode=Export)", "Mode", "doExportImport()", "importTypeChanged(int)", "browse()"], - "QgsMapSettings": ["readXML(QDomNode &theNode)", "updateDerived()", "mapToPixel() const ", "writeXML(QDomNode &theNode, QDomDocument &theDoc)", "datumTransformStore()"], + "QgsMapSettings": ["readXML(QDomNode &node)", "updateDerived()", "mapToPixel() const ", "writeXML(QDomNode &node, QDomDocument &doc)", "datumTransformStore()"], "QgsAttributeForm": ["QgsAttributeForm(QgsVectorLayer *vl, const QgsFeature &feature=QgsFeature(), const QgsAttributeEditorContext &context=QgsAttributeEditorContext(), QWidget *parent=nullptr)", "feature()"], "QgsWkbPtr": ["operator unsigned char *() const ", "operator+=(int n)", "size() const ", "QgsWkbPtr(unsigned char *p, int size)", "operator>>(QgsWkbTypes::Type &v) const ", "operator<<(const double &v)", "operator<<(const char &v)", "operator>>(int &v) const ", "operator>>(char &v) const ", "operator>>(double &v) const ", "writtenSize() const ", "operator<<(const float &r)", "remaining() const ", "operator<<(const QgsWkbTypes::Type &v)", "operator<<(const int &v)", "operator>>(Qgis::WkbType &v) const ", "operator>>(unsigned int &v) const ", "operator<<(const unsigned int &v)", "operator<<(const Qgis::WkbType &v)", "operator>>(float &r) const "], "QgsMapThemeCollection": ["None"], @@ -413,7 +413,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsPalLayerSettings": ["DataDefinedProperties", "ShapeType", "DirectionSymbols", "UpsideDownLabels", "QuadrantPosition", "MultiLineAlign", "writeToLayer(QgsVectorLayer *layer)", "RotationType", "ShadowType", "calculateLabelSize(const QFontMetricsF *fm, QString text, double &labelX, double &labelY, QgsFeature *f=nullptr, QgsRenderContext *context=nullptr)", "QgsPalLayerSettings(const QgsPalLayerSettings &s)", "SizeType", "readFromLayer(QgsVectorLayer *layer)"], "QgsRasterLayerRenderer": ["QgsRasterLayerRenderer(QgsRasterLayer *layer, QgsRenderContext &rendererContext)"], "QgsCptCityColorRamp": ["descFileName() const ", "copyingInfo() const ", "fileName() const ", "copyingFileName() const ", "setVariantName(const QString &variantName)", "schemeName() const ", "variantList() const ", "setSchemeName(const QString &schemeName)", "loadPalette()", "QgsCptCityColorRamp(const QString &schemeName=DEFAULT_CPTCITY_SCHEMENAME, const QString &variantName=DEFAULT_CPTCITY_VARIANTNAME, bool doLoadFile=true)", "copy(const QgsCptCityColorRamp *other)", "setName(const QString &schemeName, const QString &variantName=\"\", const QStringList &variantList=QStringList())", "cloneGradientRamp() const ", "setVariantList(const QStringList &variantList)", "loadFile()", "variantName() const ", "fileLoaded() const ", "hasMultiStops() const ", "create(const QgsStringMap &properties=QgsStringMap())", "QgsCptCityColorRamp(const QString &schemeName, const QStringList &variantList, const QString &variantName=QString(), bool doLoadFile=true)"], - "QgsRenderChecker": ["matchTarget()", "setRenderedImage(const QString &theImageFileName)", "matchPercent()", "setElapsedTimeTarget(int theTarget)", "mismatchCount()", "elapsedTime()", "report()", "controlImagePath() const ", "setControlPathSuffix(const QString &theName)"], + "QgsRenderChecker": ["matchTarget()", "setRenderedImage(const QString &imageFileName)", "matchPercent()", "setElapsedTimeTarget(int target)", "mismatchCount()", "elapsedTime()", "report()", "controlImagePath() const ", "setControlPathSuffix(const QString &name)"], "QgsPaperGrid": ["QgsPaperGrid(double x, double y, double width, double height, QgsComposition *composition)"], "QgsExternalResourceWidget": ["DocumentViewerContent", "setDocumentPath(const QVariant &documentPath)"], "QgsCoordinateTransformCache": ["instance()"], @@ -424,7 +424,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsPointLocator_VisitorNearestVertex": ["QgsPointLocator_VisitorNearestVertex(QgsPointLocator *pl, QgsPointLocator::Match &m, const QgsPoint &srcPoint, QgsPointLocator::MatchFilter *filter=nullptr)"], "QgsConditionalStyle": ["QgsConditionalStyle(const QgsConditionalStyle &other)", "QgsConditionalStyle(const QString &rule)"], "QgsColorEffectWidget": ["QgsColorEffectWidget(QWidget *parent=nullptr)", "create()"], - "QgsRaster": ["RasterProgressType", "RasterPyramidsFormat", "IdentifyFormat", "contrastEnhancementLimitsAsString(QgsRaster::ContrastEnhancementLimits theLimits)", "contrastEnhancementLimitsFromString(const QString &theLimits)", "RasterBuildPyramids", "ColorInterpretation"], + "QgsRaster": ["RasterProgressType", "RasterPyramidsFormat", "IdentifyFormat", "contrastEnhancementLimitsAsString(QgsRaster::ContrastEnhancementLimits limits)", "contrastEnhancementLimitsFromString(const QString &limits)", "RasterBuildPyramids", "ColorInterpretation"], "QgsMapCanvasLayer": ["QgsMapCanvasLayer(QgsMapLayer *layer, bool visible=true, bool isInOverview=false)", "setVisible(bool visible)", "isVisible() const ", "setInOverview(bool isInOverview)", "layer()", "layer() const ", "isInOverview() const "], "QgsMapRenderer": ["setOutputSize(QSizeF size, double dpi)", "destinationSrsChanged()", "mapUnitsChanged()", "clearLayerCoordinateTransforms()", "outputSizeF()", "height() const ", "transformation(const QgsMapLayer *layer) const ", "setOutputUnits(OutputUnits u)", "setMapUnits(Qgis::UnitType u)", "coordinateTransform()", "outputUnits() const ", "mapUnitsPerPixel() const ", "width() const ", "addLayerCoordinateTransform(const QString &layerId, const QString &srcAuthId, const QString &destAuthId, int srcDatumTransform=-1, int destDatumTransform=-1)", "setOutputSize(QSize size, int dpi)", "mapUnits() const "], "QgsAttributeDialog": ["feature()", "attributeForm()"], @@ -455,9 +455,9 @@ ACCEPTABLE_MISSING_DOCS = { "pal::Problem": ["getNumFeatures()", "reduce()", "subPart(int r, int featseed, int *isIn)", "getSolution(bool returnInactive)", "getFeatureCandidateCount(int i)", "compute_feature_cost(SubPart *part, int feat_id, int label_id, int *nbOverlap)", "compareLabelArea(pal::LabelPosition *l1, pal::LabelPosition *l2)", "initialization()", "compute_subsolution_cost(SubPart *part, int *s, int *nbOverlap)", "init_sol_falp()", "getFeatureCandidate(int fi, int ci)", "popmusic_tabu(SubPart *part)", "getStats()"], "QgsPenStyleComboBox": ["setPenStyle(Qt::PenStyle style)", "iconForPen(Qt::PenStyle style)", "QgsPenStyleComboBox(QWidget *parent=nullptr)", "penStyle() const "], "QgsDxfPaintEngine": ["setLayer(const QString &layer)", "QgsDxfPaintEngine(const QgsDxfPaintDevice *dxfDevice, QgsDxfExport *dxf)", "layer() const ", "setShift(QPointF shift)"], - "QgsRasterProjector": ["precisionLabel(Precision precision)", "QgsRasterProjector(const QgsCoordinateReferenceSystem &theSrcCRS, const QgsCoordinateReferenceSystem &theDestCRS, double theMaxSrcXRes, double theMaxSrcYRes, const QgsRectangle &theExtent)", "QgsRasterProjector(const QgsCoordinateReferenceSystem &theSrcCRS, const QgsCoordinateReferenceSystem &theDestCRS, const QgsRectangle &theDestExtent, int theDestRows, int theDestCols, double theMaxSrcXRes, double theMaxSrcYRes, const QgsRectangle &theExtent)", "setPrecision(Precision precision)", "precision() const "], + "QgsRasterProjector": ["precisionLabel(Precision precision)", "QgsRasterProjector(const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destCRS, double maxSrcXRes, double maxSrcYRes, const QgsRectangle &boundingBox)", "QgsRasterProjector(const QgsCoordinateReferenceSystem &srcCRS, const QgsCoordinateReferenceSystem &destCRS, const QgsRectangle &destExtent, int destRows, int destCols, double maxSrcXRes, double maxSrcYRes, const QgsRectangle &boundingBox)", "setPrecision(Precision precision)", "precision() const "], "QgsCodeEditorHTML": ["QgsCodeEditorHTML(QWidget *parent=nullptr)"], - "QgsGenericProjectionSelector": ["setSelectedCrsName(const QString &theName)", "setSelectedCrsId(long theID)", "selectedAuthId()", "selectedCrsId()", "setSelectedAuthId(const QString &authId)"], + "QgsGenericProjectionSelector": ["setSelectedCrsName(const QString &name)", "setSelectedCrsId(long theID)", "selectedAuthId()", "selectedCrsId()", "setSelectedAuthId(const QString &authId)"], "QgsSpatialIndexData": ["QgsSpatialIndexData(const QgsFeatureIterator &fi)", "QgsSpatialIndexData(const QgsSpatialIndexData &other)", "initTree(IDataStream *inputStream=nullptr)"], "QgsSlider": ["setSingleStep(const QVariant &step)", "variantValue() const ", "valueChanged(int)", "setMinimum(const QVariant &min)", "valueChanged(const QVariant &)", "setValue(const QVariant &value)", "QgsSlider(QWidget *parent=nullptr)", "setMaximum(const QVariant &max)", "QgsSlider(Qt::Orientation orientation, QWidget *parent=nullptr)"], "QgsBusyIndicatorDialog": ["setMessage(const QString &message)", "message() const "], @@ -465,7 +465,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsRectangle": ["scale(double scaleFactor, double centerX, double centerY)"], "QgsFileDropEdit": ["isDirOnly() const ", "isFileOnly() const ", "QgsFileDropEdit(QWidget *parent=nullptr)", "suffixFilter() const "], "QgsFormAnnotationItem": ["QgsFormAnnotationItem(QgsMapCanvas *canvas, QgsVectorLayer *vlayer=nullptr, bool hasFeature=false, int feature=0)", "vectorLayer() const ", "designerForm() const ", "setDesignerForm(const QString &uiFile)"], - "QgsMapLayer": ["legendUrlFormat() const ", "saveSldStyle(const QString &theURI, bool &theResultFlag)", "setLegendUrl(const QString &legendUrl)", "readSld(const QDomNode &node, QString &errorMessage)", "legendUrl() const ", "setLegendUrlFormat(const QString &legendUrlFormat)", "fromLayerDefinitionFile(const QString &qlrfile)", "loadNamedStyleFromDb(const QString &db, const QString &theURI, QString &qml)", "loadSldStyle(const QString &theURI, bool &theResultFlag)"], + "QgsMapLayer": ["legendUrlFormat() const ", "saveSldStyle(const QString &theURI, bool &resultFlag)", "setLegendUrl(const QString &legendUrl)", "readSld(const QDomNode &node, QString &errorMessage)", "legendUrl() const ", "setLegendUrlFormat(const QString &legendUrlFormat)", "fromLayerDefinitionFile(const QString &qlrfile)", "loadNamedStyleFromDb(const QString &db, const QString &theURI, QString &qml)", "loadSldStyle(const QString &theURI, bool &resultFlag)"], "QgsSlopeFilter": ["QgsSlopeFilter(const QString &inputFile, const QString &outputFile, const QString &outputFormat)"], "QgsDatumTransformDialog": ["QgsDatumTransformDialog(const QString &layerName, const QList< QList< int > > &dt, QWidget *parent=nullptr, Qt::WindowFlags f=0)"], "QgsMapRendererSequentialJob": ["QgsMapRendererSequentialJob(const QgsMapSettings &settings)", "internalFinished()"], @@ -473,9 +473,9 @@ ACCEPTABLE_MISSING_DOCS = { "QgsPointLocator": ["Type", "destroyIndex()", "None", "rebuildIndex(int maxFeaturesToIndex=-1)"], "QgsUserInputDockWidget": ["QgsUserInputDockWidget(QWidget *parent=nullptr)"], "QgsLayerTreeModelLegendNode": ["setUserLabel(const QString &userLabel)", "isScaleOK(double scale) const ", "userLabel() const ", "setEmbeddedInParent(bool embedded)", "LegendNodeRoles", "isEmbeddedInParent() const "], - "QgsSingleBandGrayRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &theExtent)", "QgsSingleBandGrayRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "setFromRenderer(const QgsRasterRenderer *r)", "loadMinMax(int theBandNo, double theMin, double theMax, int theOrigin)"], + "QgsSingleBandGrayRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &extent)", "QgsSingleBandGrayRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "setFromRenderer(const QgsRasterRenderer *r)", "loadMinMax(int bandNo, double min, double max, int origin)"], "QgsValueRelationWidgetFactory": ["QgsValueRelationWidgetFactory(const QString &name)"], - "QgsCoordinateReferenceSystem": ["createFromId(const long theId, CrsType theType=PostgisCrsId)", "CrsType"], + "QgsCoordinateReferenceSystem": ["createFromId(const long id, CrsType type=PostgisCrsId)", "CrsType"], "QgsVectorLayerUndoCommandAddAttribute": ["QgsVectorLayerUndoCommandAddAttribute(QgsVectorLayerEditBuffer *buffer, const QgsField &field)"], "GEOSGeomScopedPtr": ["GEOSGeomScopedPtr(GEOSGeometry *geom=nullptr)", "get() const ", "operator bool() const ", "reset(GEOSGeometry *geom)"], "QgsDoubleSpinBox": ["QgsDoubleSpinBox(QWidget *parent=nullptr)", "ClearValueMode", "showClearButton() const "], @@ -503,12 +503,12 @@ ACCEPTABLE_MISSING_DOCS = { "QgsSymbolsListWidget": ["updateDataDefinedMarkerAngle()", "updateDataDefinedMarkerSize()", "changed()", "setSymbolColor(const QColor &color)", "setLineWidth(double width)", "setSymbolFromStyle(const QModelIndex &index)", "updateSymbolColor()", "updateSymbolInfo()", "setMarkerAngle(double angle)", "openStyleManager()", "QgsSymbolsListWidget(QgsSymbol *symbol, QgsStyle *style, QMenu *menu, QWidget *parent, const QgsVectorLayer *layer=nullptr)", "symbolAddedToStyle(const QString &name, QgsSymbol *symbol)", "saveSymbol()", "clipFeaturesToggled(bool checked)", "populateSymbols(const QStringList &symbols)", "populateSymbolView()", "addSymbolToStyle()", "setMarkerSize(double size)", "updateDataDefinedLineWidth()"], "QgsGradientFillSymbolLayer": ["referencePoint2() const ", "GradientSpread", "GradientColorType", "setOffsetMapUnitScale(const QgsMapUnitScale &scale)", "QgsGradientFillSymbolLayer(const QColor &color=DEFAULT_SIMPLEFILL_COLOR, const QColor &color2=Qt::white, GradientColorType gradientColorType=SimpleTwoColor, GradientType gradientType=Linear, GradientCoordinateMode coordinateMode=Feature, GradientSpread gradientSpread=Pad)", "GradientCoordinateMode", "setCoordinateMode(GradientCoordinateMode coordinateMode)", "setColor2(const QColor &color2)", "setGradientColorType(GradientColorType gradientColorType)", "referencePoint1() const ", "offsetUnit() const ", "referencePoint2IsCentroid() const ", "GradientType", "referencePoint1IsCentroid() const ", "offset() const ", "setGradientType(GradientType gradientType)", "setColorRamp(QgsVectorColorRamp *ramp)", "setGradientSpread(GradientSpread gradientSpread)", "create(const QgsStringMap &properties=QgsStringMap())", "offsetMapUnitScale() const "], "QgsOSMNodeIterator": ["close()", "next()"], - "QgsPalettedRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &theExtent)", "QgsPalettedRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "setFromRenderer(const QgsRasterRenderer *r)"], + "QgsPalettedRendererWidget": ["create(QgsRasterLayer *layer, const QgsRectangle &extent)", "QgsPalettedRendererWidget(QgsRasterLayer *layer, const QgsRectangle &extent=QgsRectangle())", "setFromRenderer(const QgsRasterRenderer *r)"], "QgsDataProvider": ["QgsDataProvider(QString const &uri=\"\")", "DataCapability"], "QgsScaleWidget": ["showCurrentScaleButton()", "QgsScaleWidget(QWidget *parent=nullptr)", "updateScales(const QStringList &scales=QStringList())"], "QgsMapToolIdentifyFeature": ["featureIdentified(const QgsFeature &)", "featureIdentified(QgsFeatureId)"], "QgsGeometryValidator": ["errorFound(const QgsGeometry::Error &)", "addError(const QgsGeometry::Error &)", "stop()"], - "QgsErrorDialog": ["QgsErrorDialog(const QgsError &theError, const QString &theTitle, QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags)"], + "QgsErrorDialog": ["QgsErrorDialog(const QgsError &error, const QString &title, QWidget *parent=nullptr, Qt::WindowFlags fl=QgisGui::ModalDialogFlags)"], "QgsExpression::NodeColumnRef": ["NodeColumnRef(const QString &name)"], "QgsRasterCalcNode": ["setRight(QgsRasterCalcNode *right)", "setLeft(QgsRasterCalcNode *left)", "type() const ", "QgsRasterCalcNode(const QString &rasterName)", "QgsRasterCalcNode(double number)", "parseRasterCalcString(const QString &str, QString &parserErrorMsg)", "QgsRasterCalcNode(QgsRasterMatrix *matrix)", "QgsRasterCalcNode(Operator op, QgsRasterCalcNode *left, QgsRasterCalcNode *right)"], "QgsComposerMultiFrameMergeCommand": ["QgsComposerMultiFrameMergeCommand(Context c, QgsComposerMultiFrame *multiFrame, const QString &text)", "Context"], @@ -532,7 +532,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsVectorFileWriter::Option": ["Option(const QString &docString, OptionType type)"], "QgsValueMapConfigDlg": ["updateMap(const QMap< QString, QVariant > &map, bool insertNull)", "QgsValueMapConfigDlg(QgsVectorLayer *vl, int fieldIdx, QWidget *parent)"], "QgsActionMenu": ["ActionType", "reinit()"], - "QgsLegendModel": ["ItemType", "addLayer(QgsMapLayer *theMapLayer, double scaleDenominator=-1, const QString &rule=\"\", QStandardItem *parentItem=nullptr)", "setLayerSet(const QStringList &layerIds, double scaleDenominator=-1, const QString &rule=\"\")", "updateRasterClassificationItem(QStandardItem *classificationItem)", "readXML(const QDomElement &legendModelElem, const QDomDocument &doc)", "removeLayer(const QString &layerId)", "writeXML(QDomElement &composerLegendElem, QDomDocument &doc) const ", "setAutoUpdate(bool autoUpdate)", "layersChanged()", "autoUpdate()"], + "QgsLegendModel": ["ItemType", "addLayer(QgsMapLayer *mapLayer, double scaleDenominator=-1, const QString &rule=\"\", QStandardItem *parentItem=nullptr)", "setLayerSet(const QStringList &layerIds, double scaleDenominator=-1, const QString &rule=\"\")", "updateRasterClassificationItem(QStandardItem *classificationItem)", "readXML(const QDomElement &legendModelElem, const QDomDocument &doc)", "removeLayer(const QString &layerId)", "writeXML(QDomElement &composerLegendElem, QDomDocument &doc) const ", "setAutoUpdate(bool autoUpdate)", "layersChanged()", "autoUpdate()"], "QgsRasterFormatSaveOptionsWidget": ["validateOptions(bool gui=true, bool reportOk=true)", "setFormat(const QString &format)", "setRasterLayer(QgsRasterLayer *rasterLayer)", "setPyramidsFormat(QgsRaster::RasterPyramidsFormat format)", "QgsRasterFormatSaveOptionsWidget(QWidget *parent=nullptr, const QString &format=\"GTiff\", QgsRasterFormatSaveOptionsWidget::Type type=Default, const QString &provider=\"gdal\")", "options() const ", "setProvider(const QString &provider)", "setRasterFileName(const QString &file)", "updateProfiles()", "helpOptions()", "apply()", "Type", "setType(QgsRasterFormatSaveOptionsWidget::Type type=Default)", "optionsChanged()"], "QgsSpatialIndexCopyVisitor": ["QgsSpatialIndexCopyVisitor(SpatialIndex::ISpatialIndex *newIndex)"], "QgsCurvePolygon": ["numInteriorRings() const ", "QgsCurvePolygon(const QgsCurvePolygon &p)", "exteriorRing() const ", "interiorRing(int i) const ", "toPolygon() const "], @@ -541,7 +541,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsCptCityAllRampsItem": ["QgsCptCityAllRampsItem(QgsCptCityDataItem *parent, const QString &name, const QVector< QgsCptCityDataItem * > &items)"], "QgsSearchQueryBuilder": ["loadQuery()", "saveQuery()"], "QgsMapRendererParallelJob": ["renderLayerStatic(LayerRenderJob &job)", "QgsMapRendererParallelJob(const QgsMapSettings &settings)", "renderLabelsStatic(QgsMapRendererParallelJob *self)"], - "QgsSingleBandGrayRenderer": ["Gradient", "gradient() const ", "setGrayBand(int band)", "create(const QDomElement &elem, QgsRasterInterface *input)", "setGradient(Gradient theGradient)", "grayBand() const ", "contrastEnhancement() const ", "QgsSingleBandGrayRenderer(QgsRasterInterface *input, int grayBand)"], + "QgsSingleBandGrayRenderer": ["Gradient", "gradient() const ", "setGrayBand(int band)", "create(const QDomElement &elem, QgsRasterInterface *input)", "setGradient(Gradient gradient)", "grayBand() const ", "contrastEnhancement() const ", "QgsSingleBandGrayRenderer(QgsRasterInterface *input, int grayBand)"], "QgsExpression": ["scale()", "NodeType", "None", "FcnEval)(const QVariantList &values, const QgsFeature *f, QgsExpression *parent)", "SpatialOperator", "setScale(double scale)", "initGeomCalculator()", "Functions()", "BuiltinFunctions()"], "QgsOWSSourceSelect": ["addWMSListRow(const QDomElement &item, int row)", "connectionsChanged()", "addRasterLayer(const QString &rasterLayerPath, const QString &baseName, const QString &providerKey)", "searchFinished()", "enableLayersForCrs(QTreeWidgetItem *item)", "addWMSListItem(const QDomElement &el, int row, int column)"], "QgsSmartGroupCondition": ["removed(int)", "QgsSmartGroupCondition(int id, QWidget *parent=nullptr)", "destruct()"], @@ -573,7 +573,7 @@ ACCEPTABLE_MISSING_DOCS = { "QgsRendererCategory": ["label() const ", "swap(QgsRendererCategory &other)", "symbol() const ", "setValue(const QVariant &value)", "renderState() const ", "toSld(QDomDocument &doc, QDomElement &element, QgsStringMap props) const ", "setRenderState(bool render)", "value() const ", "setSymbol(QgsSymbol *s)", "dump() const ", "setLabel(const QString &label)"], "QgsOSMTags": ["count() const ", "insert(const QString &k, const QString &v)", "value(const QString &k) const ", "contains(const QString &k) const ", "keys() const "], "QgsCodeEditorCSS": ["QgsCodeEditorCSS(QWidget *parent=nullptr)"], - "QgsRasterMinMaxWidget": ["QgsRasterMinMaxWidget(QgsRasterLayer *theLayer, QWidget *parent=nullptr)", "load()", "setExtent(const QgsRectangle &theExtent)", "setBands(const QList< int > &theBands)", "load(int theBandNo, double theMin, double theMax, int origin)"], + "QgsRasterMinMaxWidget": ["QgsRasterMinMaxWidget(QgsRasterLayer *layer, QWidget *parent=nullptr)", "load()", "setExtent(const QgsRectangle &boundingBox)", "setBands(const QList< int > &bands)", "load(int bandNo, double min, double max, int origin)"], "QgsUniqueValuesConfigDlg": ["QgsUniqueValuesConfigDlg(QgsVectorLayer *vl, int fieldIdx, QWidget *parent=nullptr)"], "QgsEffectStack": ["QgsEffectStack(const QgsEffectStack &other)"], "QgsMapCanvasRendererSync": ["onDestCrsR2C()", "onLayersC2R()", "onCrsTransformR2C()", "onExtentR2C()", "QgsMapCanvasRendererSync(QgsMapCanvas *canvas, QgsMapRenderer *renderer)", "onExtentC2R()", "onMapUnitsC2R()", "onMapUnitsR2C()", "onCrsTransformC2R()", "onDestCrsC2R()"], @@ -585,17 +585,17 @@ ACCEPTABLE_MISSING_DOCS = { "QgsUuidWidgetWrapper": ["QgsUuidWidgetWrapper(QgsVectorLayer *vl, int fieldIdx, QWidget *editor=nullptr, QWidget *parent=nullptr)"], "QgsSimpleLineSymbolLayerWidget": ["penStyleChanged()", "penWidthChanged()", "create(const QgsVectorLayer *vl)", "offsetChanged()", "updatePatternIcon()", "colorChanged(const QColor &color)", "QgsSimpleLineSymbolLayerWidget(const QgsVectorLayer *vl, QWidget *parent=nullptr)"], "QgsRasterNuller": ["noData(int bandNo) const ", "setNoData(int bandNo, const QgsRasterRangeList &noData)", "QgsRasterNuller(QgsRasterInterface *input=nullptr)"], - "QgsRasterLayer": ["renderer() const ", "showStatusMessage(const QString &theMessage)", "rasterUnitsPerPixelY()", "brightnessFilter() const ", "hueSaturationFilter() const ", "isValidRasterFileName(const QString &theFileNameQString)"], + "QgsRasterLayer": ["renderer() const ", "showStatusMessage(const QString &message)", "rasterUnitsPerPixelY()", "brightnessFilter() const ", "hueSaturationFilter() const ", "isValidRasterFileName(const QString &fileNameQString)"], "QgsMimeDataUtils": ["isUriList(const QMimeData *data)", "encodeUriList(const UriList &layers)", "None", "decodeUriList(const QMimeData *data)"], "Qgis": ["wkbDimensions(WkbType type)", "GeometryType"], - "QgsDetailedItemWidget": ["setData(const QgsDetailedItemData &theData)", "QgsDetailedItemWidget(QWidget *parent=nullptr)", "setChecked(bool theFlag)"], + "QgsDetailedItemWidget": ["setData(const QgsDetailedItemData &data)", "QgsDetailedItemWidget(QWidget *parent=nullptr)", "setChecked(bool flag)"], "QgsComposerStyleItem": ["QgsComposerStyleItem(QgsComposerLegendItem *item)"], "QgsPointPatternFillSymbolLayer": ["setDisplacementX(double d)", "displacementYUnit() const ", "distanceXUnit() const ", "setDistanceYUnit(QgsSymbol::OutputUnit unit)", "distanceX() const ", "setDistanceX(double d)", "displacementYMapUnitScale() const ", "setDisplacementY(double d)", "setDistanceYMapUnitScale(const QgsMapUnitScale &scale)", "displacementXMapUnitScale() const ", "distanceYMapUnitScale() const ", "displacementXUnit() const ", "setDistanceY(double d)", "distanceYUnit() const ", "distanceY() const ", "displacementY() const ", "createFromSld(QDomElement &element)", "displacementX() const ", "setDisplacementYMapUnitScale(const QgsMapUnitScale &scale)", "setDistanceXUnit(QgsSymbol::OutputUnit unit)", "setDisplacementXMapUnitScale(const QgsMapUnitScale &scale)", "distanceXMapUnitScale() const ", "create(const QgsStringMap &properties=QgsStringMap())", "setDisplacementYUnit(QgsSymbol::OutputUnit unit)", "setDistanceXMapUnitScale(const QgsMapUnitScale &scale)", "setDisplacementXUnit(QgsSymbol::OutputUnit unit)"], "QgsDiagramSettings": ["LabelPlacementMethod", "readXML(const QDomElement &elem, const QgsVectorLayer *layer)", "writeXML(QDomElement &rendererElem, QDomDocument &doc, const QgsVectorLayer *layer) const ", "SizeType"], "QgsScopedExpressionFunction": ["QgsScopedExpressionFunction(const QString &fnname, int params, const QString &group, const QString &helpText=QString(), bool usesGeometry=false, const QStringList &referencedColumns=QStringList(), bool lazyEval=false, bool handlesNull=false, bool isContextual=true)"], - "QgsSublayersDialog": ["selectionIndexes()", "ProviderType", "exec()", "QgsSublayersDialog(ProviderType providerType, const QString &name, QWidget *parent=nullptr, Qt::WindowFlags fl=0)", "populateLayerTable(const QStringList &theList, const QString &delim=\":\")", "selectionNames()"], + "QgsSublayersDialog": ["selectionIndexes()", "ProviderType", "exec()", "QgsSublayersDialog(ProviderType providerType, const QString &name, QWidget *parent=nullptr, Qt::WindowFlags fl=0)", "populateLayerTable(const QStringList &list, const QString &delim=\":\")", "selectionNames()"], "QgsCustomLayerOrderWidget": ["bridgeHasCustomLayerOrderChanged(bool state)", "QgsCustomLayerOrderWidget(QgsLayerTreeMapCanvasBridge *bridge, QWidget *parent=nullptr)", "nodeVisibilityChanged(QgsLayerTreeNode *node, Qt::CheckState state)", "bridgeCustomLayerOrderChanged(const QStringList &order)", "modelUpdated()"], - "QgsRasterShader": ["readXML(const QDomElement &elem)", "rasterShaderFunction()", "writeXML(QDomDocument &doc, QDomElement &parent) const ", "rasterShaderFunction() const ", "QgsRasterShader(double theMinimumValue=0.0, double theMaximumValue=255.0)"], + "QgsRasterShader": ["readXML(const QDomElement &elem)", "rasterShaderFunction()", "writeXML(QDomDocument &doc, QDomElement &parent) const ", "rasterShaderFunction() const ", "QgsRasterShader(double minimumValue=0.0, double maximumValue=255.0)"], "QgsHiddenWidgetFactory": ["QgsHiddenWidgetFactory(const QString &name)"], "QgisVisitor": ["QgisVisitor(QList< QgsFeatureId > &list)"], "QgsShadowEffectWidget": ["create()", "QgsShadowEffectWidget(QWidget *parent=nullptr)"],
%2%4%5%2%2
%2%4%5%2%2
%4%4
%3%3