Merge pull request #4165 from 3nids/removethe

remove the-prefix from source code
This commit is contained in:
Nyall Dawson 2017-02-22 07:26:49 +10:00 committed by GitHub
commit 66888fecc2
384 changed files with 3783 additions and 3779 deletions

View File

@ -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 );

View File

@ -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)

View File

@ -168,20 +168,20 @@ class QgsCoordinateReferenceSystem
* - "WKT:<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:<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

View File

@ -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& );

View File

@ -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 );
};

View File

@ -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;

View File

@ -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
{

View File

@ -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

View File

@ -32,7 +32,7 @@ class QgsFeatureStore
QgsFeatureList& features();
/** Set map of optional parameters */
void setParams( const QMap<QString, QVariant> &theParams );
void setParams( const QMap<QString, QVariant> &params );
/** Get map of optional parameters */
QMap<QString, QVariant> params() const;

View File

@ -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.*/

View File

@ -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*/

View File

@ -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

View File

@ -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();

View File

@ -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 */

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 );

View File

@ -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.

View File

@ -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<QgsColorRampShader::ColorRampItem>& theList ); //TODO: sort on set
void setColorRampItemList( const QList<QgsColorRampShader::ColorRampItem>& 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

View File

@ -17,7 +17,7 @@ class QgsContrastEnhancement
UserDefinedEnhancement
};
QgsContrastEnhancement( Qgis::DataType theDatatype = Qgis::Byte );
QgsContrastEnhancement( Qgis::DataType datatype = Qgis::Byte );
~QgsContrastEnhancement();
/*

View File

@ -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

View File

@ -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 );
};

View File

@ -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<QgsRasterPyramid> & thePyramidList,
const QString & theResamplingMethod = "NEAREST",
QgsRaster::RasterPyramidsFormat theFormat = QgsRaster::PyramidsGTiff,
const QStringList & theConfigOptions = QStringList() );
virtual QString buildPyramids( const QList<QgsRasterPyramid> & 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<int, QVariant> 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<int, QVariant> 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 );
};

View File

@ -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

View File

@ -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<int, QVariant>& theResults );
QgsRasterIdentifyResult( QgsRaster::IdentifyFormat format, const QMap<int, QVariant>& 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<int, QVariant> results() const;
/** Set map of optional parameters */
void setParams( const QMap<QString, QVariant> & theParams );
void setParams( const QMap<QString, QVariant> & params );
/** Get map of optional parameters */
QMap<QString, QVariant> params() const;
@ -42,6 +42,6 @@ class QgsRasterIdentifyResult
QgsError error() const;
/** \brief Set error */
void setError( const QgsError & theError );
void setError( const QgsError & error );
};

View File

@ -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<double>::quiet_NaN()*/,
double theMaximum /*= std::numeric_limits<double>::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<double>::quiet_NaN()*/,
double maximum /*= std::numeric_limits<double>::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 &);

View File

@ -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

View File

@ -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 );
};

View File

@ -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 );
};

View File

@ -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 );
};

View File

@ -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;

View File

@ -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:

View File

@ -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();
/*

View File

@ -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 */

View File

@ -48,10 +48,10 @@ class QgsRasterTransparency
void setTransparentThreeValuePixelList( const QList<QgsRasterTransparency::TransparentThreeValuePixel>& /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;

View File

@ -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;

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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:

View File

@ -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;

View File

@ -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;
};

View File

@ -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 );
};

View File

@ -4,16 +4,16 @@ class QgsErrorDialog : QDialog
#include <qgserrordialog.h>
%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();

View File

@ -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 );

View File

@ -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();

View File

@ -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.

View File

@ -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 );

View File

@ -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 );

View File

@ -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.

View File

@ -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 );
};

View File

@ -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();

View File

@ -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 );

View File

@ -4,15 +4,15 @@ class QgsRasterMinMaxWidget: QWidget
#include <qgsrasterminmaxwidget.h>
%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<int> & theBands );
void setBands( const QList<int> & 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 );
};

View File

@ -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 );
};

View File

@ -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 );
};

View File

@ -43,7 +43,7 @@ class QgsRuleBasedRendererModel : QAbstractItemModel
void finishedAddingRules(); // call endInsertRows
//! @note not available in python bindungs
// void setFeatureCounts( QMap<QgsRuleBasedRenderer::Rule*, QgsRuleBasedRendererCount> theCountMap );
// void setFeatureCounts( QMap<QgsRuleBasedRenderer::Rule*, QgsRuleBasedRendererCount> countMap );
void clearFeatureCounts();
};

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();
}

View File

@ -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 * );

View File

@ -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 )

View File

@ -39,7 +39,7 @@ class QgsGpsMarker : public QgsMapCanvasItem
virtual void updatePosition() override;
void setSize( int theSize );
void setSize( int size );
protected:

View File

@ -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;
};

View File

@ -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 );
}

View File

@ -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();

106
src/app/qgisapp.cpp Executable file → Normal file
View File

@ -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<QgsMapLayer *> 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<QgsVectorLayer*>(
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<QgsMapLayer *> 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<QgsMapLayer *>& theLayers )
void QgisApp::layersWereAdded( const QList<QgsMapLayer *>& 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<QgsMapLayer *> 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;

View File

@ -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 );

View File

@ -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()

View File

@ -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;

View File

@ -428,7 +428,7 @@ void QgsAppLayerTreeViewMenuProvider::addCustomLayerActions( QMenu* menu, QgsMap
if ( ! lyrActions.isEmpty() )
{
menu->addSeparator();
QList<QMenu*> theMenus;
QList<QMenu*> 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 );
}
}

View File

@ -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" ) );
}

View File

@ -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;

View File

@ -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<QLayout*>( *i );
QgsCustomization::removeFromLayout( l, theWidget );
QgsCustomization::removeFromLayout( l, widget );
}
}
}

View File

@ -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; }

View File

@ -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<int>((
( 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() );
}

View File

@ -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:

View File

@ -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<QObject *>() == sender() )
if ( layItem->data( 0, Qt::UserRole ).value<QObject *>() == 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<QObject *>() == sender() )
if ( layItem && layItem->data( Qt::UserRole ).value<QObject *>() == senderObject )
{
QgsDebugMsg( QString( "removing row %1" ).arg( i ) );
tblResults->removeRow( i );

View File

@ -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 )

View File

@ -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 );

View File

@ -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

View File

@ -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;

View File

@ -69,7 +69,7 @@
#include <QMouseEvent>
#include <QVector>
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

View File

@ -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();

View File

@ -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" ) ) );

View File

@ -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();

View File

@ -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;

View File

@ -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;
}

View File

@ -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 <QgsTip> mGenericTips;
QList <QgsTip> mGuiTips;

View File

@ -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();
}

View File

@ -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();
};

View File

@ -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;
}
//////////////////////////////////////////////

View File

@ -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<QString, QgsAuthMethodConfig> sAuthConfigCache;
};

View File

@ -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();

View File

@ -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 )

View File

@ -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();

View File

@ -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

View File

@ -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<QGraphicsItem *> itemList = items();
QList<QGraphicsItem *>::iterator itemIt = itemList.begin();
@ -694,7 +694,7 @@ const QgsComposerItem* QgsComposition::getComposerItemById( const QString& theId
const QgsComposerItem* mypItem = dynamic_cast<const QgsComposerItem *>( *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<QgsComposer*> composers = QSet<QgsComposer*>();
@ -728,7 +728,7 @@ const QgsComposerItem* QgsComposition::getComposerItemByUuid( QString theUuid, b
const QgsComposerItem* mypItem = dynamic_cast<const QgsComposerItem *>( *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<QGraphicsItem *> itemList = items();
QList<QGraphicsItem *>::iterator itemIt = itemList.begin();
@ -749,7 +749,7 @@ const QgsComposerItem* QgsComposition::getComposerItemByUuid( const QString& the
const QgsComposerItem* mypItem = dynamic_cast<const QgsComposerItem *>( *itemIt );
if ( mypItem )
{
if ( mypItem->uuid() == theUuid )
if ( mypItem->uuid() == uuid )
{
return mypItem;
}

Some files were not shown because too many files have changed in this diff Show More