Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* fix cppcheck warnings
* some sip updates
* [API] fix spelling QgsMultiRenderChecker::drawBackround
* [API] fix spelling QgsSymbolLayerV2Utils::drawStippledBackround
* [API] fix spelling QgsMapSettings::layerTransfrom
  • Loading branch information
jef-n committed Nov 20, 2014
1 parent d897aa5 commit a57066a
Show file tree
Hide file tree
Showing 91 changed files with 412 additions and 300 deletions.
6 changes: 3 additions & 3 deletions python/core/composer/qgscomposertablev2.sip
Expand Up @@ -27,7 +27,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame

public:

/*! Controls how headers are horizontally aligned in a table
/*! Controls how headers are horizontally aligned in a table
*/
enum HeaderHAlignment
{
Expand Down Expand Up @@ -318,7 +318,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame

protected:

/**Calculates the maximum width of text shown in columns.
/**Calculates the maximum width of text shown in columns.
*/
virtual bool calculateMaxColumnWidths();

Expand Down Expand Up @@ -355,7 +355,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame
* @param frameIndex index number for frame
* @returns row range
*/
QPair<int, int> rowRange( const QRectF extent, const int frameIndex ) const;
QPair<int, int> rowRange( const QRectF &extent, const int frameIndex ) const;

/**Draws the horizontal grid lines for the table.
* @param painter destination painter for grid lines
Expand Down
34 changes: 17 additions & 17 deletions python/core/qgscolorscheme.sip
Expand Up @@ -52,8 +52,8 @@ class QgsColorScheme
* to colors related to the base color.
* @returns a list of QPairs of color and color name
*/
virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() ) = 0;
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() ) = 0;

/**Returns whether the color scheme is editable
* @returns true if scheme is editable
Expand All @@ -68,7 +68,7 @@ class QgsColorScheme
* @returns true if colors were set successfully
* @see isEditable
*/
virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

/**Clones a color scheme
* @returns copy of color scheme
Expand Down Expand Up @@ -97,10 +97,10 @@ class QgsGplColorScheme : QgsColorScheme

virtual ~QgsGplColorScheme();

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

protected:

Expand All @@ -117,7 +117,7 @@ class QgsGplColorScheme : QgsColorScheme
* subfolder off the user's QGIS settings folder.
* \note Added in version 2.5
*/
class QgsUserColorScheme : QgsGplColorScheme
class QgsUserColorScheme : QgsGplColorScheme
{
%TypeHeaderCode
#include <qgscolorscheme.h>
Expand All @@ -128,7 +128,7 @@ class QgsUserColorScheme : QgsGplColorScheme
/**Constructs a new user color scheme, using a specified gpl palette file
* @param filename filename of gpl palette file stored in the users "palettes" folder
*/
QgsUserColorScheme( const QString filename );
QgsUserColorScheme( const QString &filename );

virtual ~QgsUserColorScheme();

Expand All @@ -141,7 +141,7 @@ class QgsUserColorScheme : QgsGplColorScheme
/**Sets the name for the scheme
* @param name new name
*/
void setName( const QString name );
void setName( const QString &name );

/**Erases the associated gpl palette file from the users "palettes" folder
* @returns true if erase was successful
Expand Down Expand Up @@ -175,8 +175,8 @@ class QgsRecentColorScheme : QgsColorScheme

virtual SchemeFlags flags() const;

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

QgsColorScheme* clone() const /Factory/;
}; // class QgsRecentColorScheme
Expand All @@ -202,12 +202,12 @@ class QgsCustomColorScheme : QgsColorScheme

virtual SchemeFlags flags() const;

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

virtual bool isEditable() const;

virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

QgsColorScheme* clone() const /Factory/;
}; // class QgsCustomColorScheme
Expand All @@ -232,12 +232,12 @@ class QgsProjectColorScheme : QgsColorScheme

virtual SchemeFlags flags() const;

virtual QgsNamedColorList fetchColors( const QString context = QString(),
const QColor baseColor = QColor() );
virtual QgsNamedColorList fetchColors( const QString &context = QString(),
const QColor &baseColor = QColor() );

virtual bool isEditable() const;

virtual bool setColors( const QgsNamedColorList colors, const QString context = QString(), const QColor baseColor = QColor() );
virtual bool setColors( const QgsNamedColorList &colors, const QString &context = QString(), const QColor &baseColor = QColor() );

QgsColorScheme* clone() const /Factory/;
}; // class QgsProjectColorScheme
8 changes: 4 additions & 4 deletions python/core/qgscoordinatetransform.sip
Expand Up @@ -94,7 +94,7 @@ class QgsCoordinateTransform : QObject
* @param direction TransformDirection (defaults to ForwardTransform)
* @return QgsPoint in Destination Coordinate System
*/
QgsPoint transform( const QgsPoint p, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
QgsPoint transform( const QgsPoint &p, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);

/*! Transform the point specified by x,y from Source Coordinate System to Destination Coordinate System
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
Expand All @@ -118,12 +118,12 @@ class QgsCoordinateTransform : QObject
* longitude line is required
* @return QgsRectangle in Destination Coordinate System
*/
QgsRectangle transformBoundingBox( const QgsRectangle theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const throw (QgsCsException);
QgsRectangle transformBoundingBox( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform, const bool handle180Crossover = false ) const throw (QgsCsException);

// Same as for the other transform() functions, but alters the x
// and y variables in place. The second one works with good old-fashioned
// C style arrays.
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform) const throw (QgsCsException);
void transformInPlace( double& x, double& y, double &z, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);

//! @note not available in python bindings
// void transformInPlace( QVector<double>& x, QVector<double>& y, QVector<double>& z,
Expand All @@ -142,7 +142,7 @@ class QgsCoordinateTransform : QObject
* @param direction TransformDirection (defaults to ForwardTransform)
* @return QgsRectangle in Destination Coordinate System
*/
QgsRectangle transform( const QgsRectangle theRect, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);
QgsRectangle transform( const QgsRectangle &theRect, TransformDirection direction = ForwardTransform ) const throw (QgsCsException);

/*! Transform an array of coordinates to a different Coordinate System
* If the direction is ForwardTransform then coordinates are transformed from layer CS --> map canvas CS,
Expand Down
7 changes: 5 additions & 2 deletions python/core/qgsdataitem.sip
Expand Up @@ -20,8 +20,6 @@ class QgsDataItem : QObject

int rowCount();

//

virtual void refresh();

// Create vector of children
Expand Down Expand Up @@ -56,6 +54,8 @@ class QgsDataItem : QObject
// try to process the data dropped on this item
virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*action*/ );

//

enum Capability
{
NoCapabilities,
Expand Down Expand Up @@ -83,6 +83,9 @@ class QgsDataItem : QObject
QString path() const;
void setPath( const QString );

// Because QIcon (QPixmap) must not be used in outside the GUI thread, it is
// not possible to set mIcon in constructor. Either use mIconName/setIconName()
// or implement icon().
void setIcon( QIcon icon );
void setIconName( const QString & icon );

Expand Down
47 changes: 18 additions & 29 deletions python/core/qgsmaplayer.sip
Expand Up @@ -40,7 +40,7 @@ class QgsMapLayer : QObject
{
VectorLayer,
RasterLayer,
PluginLayer // added in 1.5
PluginLayer
};

/** Constructor
Expand All @@ -58,9 +58,7 @@ class QgsMapLayer : QObject
*/
QgsMapLayer::LayerType type() const;

/** Get this layer's unique ID, this ID is used to access this layer from map layer registry
* @note added in 1.7
*/
/** Get this layer's unique ID, this ID is used to access this layer from map layer registry */
QString id() const;

/** Set the display name of the layer
Expand All @@ -73,9 +71,7 @@ class QgsMapLayer : QObject
*/
const QString & name() const;

/** Get the original name of the layer
* @note added in 1.9
*/
/** Get the original name of the layer */
const QString & originalName() const;

void setTitle( const QString& title );
Expand Down Expand Up @@ -113,7 +109,7 @@ class QgsMapLayer : QObject
QPainter::CompositionMode blendMode() const;

/**Synchronises with changes in the datasource
@note added in version 1.6*/
*/
virtual void reload();

/** Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
Expand Down Expand Up @@ -190,6 +186,7 @@ class QgsMapLayer : QObject
/** stores state in Dom node
@param layerElement is a Dom element corresponding to ``maplayer'' tag
@param document is a the dom document being written
@param relativeBasePath base path for relative paths
@note

The Dom node corresponds to a Dom document project file XML element to be
Expand All @@ -202,28 +199,25 @@ class QgsMapLayer : QObject

@returns true if successful
*/
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document );
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document, QString relativeBasePath = QString::null );

/** Returns the given layer as a layer definition document
Layer definitions store the data source as well as styling and custom properties.

Layer definitions can be used to load a layer and styling all from a single file.
*/
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers );
static QDomDocument asLayerDefinition( QList<QgsMapLayer*> layers, QString relativeBasePath = QString::null );

/** Creates a new layer from a layer defininition document
*/
static QList<QgsMapLayer*> fromLayerDefinition( QDomDocument& document );
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString qlrfile );
static QList<QgsMapLayer*> fromLayerDefinitionFile( const QString &qlrfile );

/** Set a custom property for layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
/** Set a custom property for layer. Properties are stored in a map and saved in project file. */
void setCustomProperty( const QString& key, const QVariant& value );
/** Read a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
/** Read a custom property from layer. Properties are stored in a map and saved in project file. */
QVariant customProperty( const QString& value, const QVariant& defaultValue = QVariant() ) const;
/** Remove a custom property from layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
/** Remove a custom property from layer. Properties are stored in a map and saved in project file. */
void removeCustomProperty( const QString& key );


Expand All @@ -244,8 +238,7 @@ class QgsMapLayer : QObject
*/
const QgsCoordinateReferenceSystem& crs() const;

/** Sets layer's spatial reference system
@note emitSignal added in 1.4 */
/** Sets layer's spatial reference system */
void setCrs( const QgsCoordinateReferenceSystem& srs, bool emitSignal = true );

/** A convenience function to (un)capitalise the layer name */
Expand All @@ -256,7 +249,6 @@ class QgsMapLayer : QObject
* record in the users style table in their personal qgis.db)
* @return a QString with the style file name
* @see also loadNamedStyle () and saveNamedStyle ();
* @note This method was added in QGIS 1.8
*/
virtual QString styleURI();

Expand Down Expand Up @@ -373,6 +365,7 @@ class QgsMapLayer : QObject
*/
void setLegend( QgsMapLayerLegend* legend /Transfer/ );
/**
* Can be null.
* @note added in 2.6
*/
QgsMapLayerLegend* legend() const;
Expand Down Expand Up @@ -423,9 +416,7 @@ class QgsMapLayer : QObject
/** Emit a signal that the layer name has been changed */
void layerNameChanged();

/** Emit a signal that layer's CRS has been reset
added in 1.4
*/
/** Emit a signal that layer's CRS has been reset */
void layerCrsChanged();

/** By emitting this signal the layer tells that either appearance or content have been changed
Expand All @@ -439,8 +430,7 @@ class QgsMapLayer : QObject
/** This is used to send a request that any mapcanvas using this layer update its extents */
void recalculateExtents();

/** data of layer changed
* added in 1.5 */
/** data of layer changed */
void dataChanged();

/** Signal emitted when the blend mode is changed, through QgsMapLayer::setBlendMode() */
Expand All @@ -459,8 +449,7 @@ class QgsMapLayer : QObject
/** Set the extent */
virtual void setExtent( const QgsRectangle &rect );

/** set whether layer is valid or not - should be used in constructor.
\note added in v1.5 */
/** set whether layer is valid or not - should be used in constructor. */
void setValid( bool valid );

/** called by readLayerXML(), used by children to read state specific to them from
Expand All @@ -474,12 +463,12 @@ class QgsMapLayer : QObject
virtual bool writeXml( QDomNode & layer_node, QDomDocument & document );


/** Read custom properties from project file. Added in v1.4
/** Read custom properties from project file.
@param layerNode note to read from
@param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)*/
void readCustomProperties( const QDomNode& layerNode, const QString& keyStartsWith = "" );

/** Write custom properties to project file. Added in v1.4 */
/** Write custom properties to project file. */
void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc ) const;

/** debugging member - invoked when a connect() is made to this object */
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmapsettings.sip
Expand Up @@ -152,7 +152,7 @@ class QgsMapSettings
* @param layer
* @return transform - may be null if the transform is not needed
*/
const QgsCoordinateTransform* layerTransfrom( QgsMapLayer *layer ) const;
const QgsCoordinateTransform* layerTransform( QgsMapLayer *layer ) const;

//! returns current extent of layer set
QgsRectangle fullExtent() const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsmultirenderchecker.sip
Expand Up @@ -90,6 +90,6 @@ class QgsMultiRenderChecker
/**Draws a checkboard pattern for image backgrounds, so that transparency is visible
* without requiring a transparent background for the image
*/
static void drawBackround( QImage* image );
static void drawBackground( QImage* image );
};

0 comments on commit a57066a

Please sign in to comment.