Skip to content

Commit

Permalink
Followup c49b5b7, more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 7, 2015
1 parent 911929e commit c6df096
Show file tree
Hide file tree
Showing 188 changed files with 602 additions and 597 deletions.
20 changes: 10 additions & 10 deletions python/core/dxf/qgsdxfexport.sip
Original file line number Diff line number Diff line change
Expand Up @@ -61,39 +61,39 @@ class QgsDxfExport
void writeDouble( double d );
void writeString( const QString &s );
void writeGroup( int code, const QgsPoint &p, double z = 0.0, bool skipz = false ) /PyName=writeGroupPoint/;
void writeGroup( QColor color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );
void writeGroup( const QColor& color, int exactMatch = 62, int rgbCode = 420, int transparencyCode = 440 );

//! Write handle
int writeHandle( int code = 5, int handle = 0 );

//! Draw dxf polyline
void writePolyline( const QgsPolyline &line, const QString &layer, const QString &lineStyleName, QColor color, double width = -1 );
void writePolyline( const QgsPolyline &line, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

//! Draw dxf polygon (HATCH)
void writePolygon( const QgsPolygon &polygon, const QString &layer, const QString &hatchPattern, QColor color );
void writePolygon( const QgsPolygon &polygon, const QString &layer, const QString &hatchPattern, const QColor& color );

/** Draw solid
* @deprecated see writePolygon
*/
void writeSolid( const QString &layer, QColor color, const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, const QgsPoint &pt4 ) /Deprecated/;
void writeSolid( const QString &layer, const QColor& color, const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, const QgsPoint &pt4 ) /Deprecated/;

//! write line (as a polyline)
void writeLine( const QgsPoint &pt1, const QgsPoint &pt2, const QString &layer, const QString &lineStyleName, QColor color, double width = -1 );
void writeLine( const QgsPoint &pt1, const QgsPoint &pt2, const QString &layer, const QString &lineStyleName, const QColor& color, double width = -1 );

//! Write point
void writePoint( const QString &layer, QColor color, const QgsPoint &pt );
void writePoint( const QString &layer, const QColor& color, const QgsPoint &pt );

//! Write filled circle (as hatch)
void writeFilledCircle( const QString &layer, QColor color, const QgsPoint &pt, double radius );
void writeFilledCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius );

//! Write circle (as polyline)
void writeCircle( const QString &layer, QColor color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width );
void writeCircle( const QString &layer, const QColor& color, const QgsPoint &pt, double radius, const QString &lineStyleName, double width );

//! Write text (TEXT)
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, QColor color );
void writeText( const QString &layer, const QString &text, const QgsPoint &pt, double size, double angle, const QColor& color );

//! Write mtext (MTEXT)
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, QColor color );
void writeMText( const QString &layer, const QString &text, const QgsPoint &pt, double width, double angle, const QColor& color );

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

Expand Down
4 changes: 2 additions & 2 deletions python/core/qgsconditionalstyle.sip
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ class QgsConditionalStyle
* @brief Set the background color for the style
* @param value QColor for background color
*/
void setBackgroundColor( QColor value );
void setBackgroundColor( const QColor& value );

/**
* @brief Set the text color for the style
* @param value QColor for text color
*/
void setTextColor( QColor value );
void setTextColor( const QColor& value );

/**
* @brief Set the font for the the style
Expand Down
2 changes: 1 addition & 1 deletion python/core/raster/qgshuesaturationfilter.sip
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class QgsHueSaturationFilter : QgsRasterInterface

void setColorizeOn( bool colorizeOn );
bool colorizeOn() const;
void setColorizeColor( QColor colorizeColor );
void setColorizeColor( const QColor& colorizeColor );
QColor colorizeColor() const;
void setColorizeStrength( int colorizeStrength );
int colorizeStrength() const;
Expand Down
4 changes: 2 additions & 2 deletions python/core/raster/qgsrasterlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ class QgsRasterLayer : QgsMapLayer

/** \brief Draws a preview of the rasterlayer into a pixmap
@note - use previewAsImage() for rendering with QGIS>=2.4 */
QPixmap previewAsPixmap( QSize size, QColor bgColor = QColor( 255, 255, 255 ) ) /Deprecated/;
QPixmap previewAsPixmap( const QSize& size, const QColor& bgColor = QColor( 255, 255, 255 ) ) /Deprecated/;

/** \brief Draws a preview of the rasterlayer into a QImage
@note added in 2.4 */
QImage previewAsImage( QSize size, QColor bgColor = QColor( 255, 255, 255 ),
QImage previewAsImage( const QSize& size, const QColor& bgColor = QColor( 255, 255, 255 ),
QImage::Format format = QImage::Format_ARGB32_Premultiplied );

/**
Expand Down
16 changes: 8 additions & 8 deletions python/core/symbology-ng/qgsfillsymbollayerv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
%End

public:
QgsSimpleFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
QgsSimpleFillSymbolLayerV2( const QColor& color = DEFAULT_SIMPLEFILL_COLOR,
Qt::BrushStyle style = DEFAULT_SIMPLEFILL_STYLE,
QColor borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
const QColor& borderColor = DEFAULT_SIMPLEFILL_BORDERCOLOR,
Qt::PenStyle borderStyle = DEFAULT_SIMPLEFILL_BORDERSTYLE,
double borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
Expand Down Expand Up @@ -40,7 +40,7 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
void setBrushStyle( Qt::BrushStyle style );

QColor borderColor() const;
void setBorderColor( QColor borderColor );
void setBorderColor( const QColor& borderColor );

/** Get outline color.
* @note added in 2.1 */
Expand Down Expand Up @@ -128,8 +128,8 @@ class QgsGradientFillSymbolLayerV2 : QgsFillSymbolLayerV2
Repeat
};

QgsGradientFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
QColor color2 = Qt::white,
QgsGradientFillSymbolLayerV2( const QColor& color = DEFAULT_SIMPLEFILL_COLOR,
const QColor& color2 = Qt::white,
GradientColorType gradientColorType = SimpleTwoColor,
GradientType gradientType = Linear,
GradientCoordinateMode coordinateMode = Feature,
Expand Down Expand Up @@ -172,7 +172,7 @@ class QgsGradientFillSymbolLayerV2 : QgsFillSymbolLayerV2

/** Color for endpoint of gradient, only used if the gradient color type is set to SimpleTwoColor*/
QColor color2() const;
void setColor2( QColor color2 );
void setColor2( const QColor& color2 );

/** Coordinate mode for gradient. Controls how the gradient stops are positioned.*/
GradientCoordinateMode coordinateMode() const;
Expand Down Expand Up @@ -230,7 +230,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
ColorRamp
};

QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QColor color2 = Qt::white,
QgsShapeburstFillSymbolLayerV2( const QColor& color = DEFAULT_SIMPLEFILL_COLOR, const QColor& color2 = Qt::white,
ShapeburstColorType colorType = SimpleTwoColor,
int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );

Expand Down Expand Up @@ -362,7 +362,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
* @see setColorType
* @see color2
*/
void setColor2( QColor color2 );
void setColor2( const QColor& color2 );
/** Returns the color used for the endpoint of the shapeburst fill. This color is only used if the colorType is set to ShapeburstColorType::SimpleTwoColor
* @returns a QColor indicating the color of the endpoint of the gradient
* @note added in 2.3
Expand Down
2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgslinesymbollayerv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2
%End

public:
QgsSimpleLineSymbolLayerV2( QColor color = DEFAULT_SIMPLELINE_COLOR,
QgsSimpleLineSymbolLayerV2( const QColor& color = DEFAULT_SIMPLELINE_COLOR,
double width = DEFAULT_SIMPLELINE_WIDTH,
Qt::PenStyle penStyle = DEFAULT_SIMPLELINE_PENSTYLE );

Expand Down
4 changes: 2 additions & 2 deletions python/core/symbology-ng/qgsmarkersymbollayerv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class QgsSimpleMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
void setName( const QString& name );

QColor borderColor() const;
void setBorderColor( QColor color );
void setBorderColor( const QColor& color );

Qt::PenStyle outlineStyle() const;
void setOutlineStyle( Qt::PenStyle outlineStyle );
Expand Down Expand Up @@ -157,7 +157,7 @@ class QgsFontMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
QgsFontMarkerSymbolLayerV2( const QString& fontFamily = DEFAULT_FONTMARKER_FONT,
QChar chr = DEFAULT_FONTMARKER_CHR,
double pointSize = DEFAULT_FONTMARKER_SIZE,
QColor color = DEFAULT_FONTMARKER_COLOR,
const QColor& color = DEFAULT_FONTMARKER_COLOR,
double angle = DEFAULT_FONTMARKER_ANGLE );

~QgsFontMarkerSymbolLayerV2();
Expand Down
6 changes: 3 additions & 3 deletions python/core/symbology-ng/qgssymbollayerv2utils.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class QgsSymbolLayerV2Utils

public:

static QString encodeColor( QColor color );
static QString encodeColor( const QColor& color );
static QColor decodeColor( const QString& str );

static QString encodeSldAlpha( int alpha );
Expand Down Expand Up @@ -122,14 +122,14 @@ class QgsSymbolLayerV2Utils
static bool needSvgFill( QDomElement &element );

static void fillToSld( QDomDocument &doc, QDomElement &element,
Qt::BrushStyle brushStyle, QColor color = QColor() );
Qt::BrushStyle brushStyle, const QColor& color = QColor() );
static bool fillFromSld( QDomElement &element,
Qt::BrushStyle &brushStyle, QColor &color );

//! @note not available in python bindings
/*
static void lineToSld( QDomDocument &doc, QDomElement &element,
Qt::PenStyle penStyle, QColor color, double width = -1,
Qt::PenStyle penStyle, const QColor& color, double width = -1,
const Qt::PenJoinStyle *penJoinStyle = 0, const Qt::PenCapStyle *penCapStyle = 0,
const QVector<qreal> *customDashPattern = 0, double dashOffset = 0.0 );
*/
Expand Down
4 changes: 2 additions & 2 deletions python/core/symbology-ng/qgsvectorcolorrampv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class QgsVectorGradientColorRampV2 : QgsVectorColorRampV2

QColor color1() const;
QColor color2() const;
void setColor1( QColor color );
void setColor2( QColor color );
void setColor1( const QColor& color );
void setColor2( const QColor& color );

bool isDiscrete() const;
void setDiscrete( bool discrete );
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgscolorbuttonv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class QgsColorButtonV2 : QToolButton
* option.
* @see defaultColor
*/
void setDefaultColor( const QColor color );
void setDefaultColor( const QColor& color );

/** Returns the default color for the button, which is shown in the button's drop down menu for the
* "default color" option.
Expand Down
4 changes: 2 additions & 2 deletions python/gui/qgslegendinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ class QgsLegendInterface : QObject

//! Add a new group
//! a parent group can be given to nest the new group in it
virtual int addGroup( QString name, bool expand = true, QTreeWidgetItem* parent = 0 ) = 0;
virtual int addGroup( const QString& name, bool expand = true, QTreeWidgetItem* parent = 0 ) = 0;

//! Add a new group
//! a parent group index has to be given to nest the new group in it
virtual int addGroup( QString name, bool expand, int parentIndex ) = 0;
virtual int addGroup( const QString& name, bool expand, int parentIndex ) = 0;

//! Remove group on index
virtual void removeGroup( int groupIndex ) = 0;
Expand Down
6 changes: 3 additions & 3 deletions python/gui/qgspluginmanagerinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ class QgsPluginManagerInterface : QObject
virtual void clearPythonPluginMetadata() = 0;

//! add a single plugin to the metadata registry