Skip to content

Commit

Permalink
[needs-docs] Rename Outline and Border -> Stroke
Browse files Browse the repository at this point in the history
This change is being driven by:

- need for consistent terminology in the api. Currently there's
a confusing mix of border/outline used
- need for consistent terminology in the gui - we have a mix
of "border"/"outline"/"pen"
- bringing QGIS into line with the standard terminology used
in other graphic editing programs
  • Loading branch information
nyalldawson committed Feb 22, 2017
1 parent 3b01646 commit 47683fc
Show file tree
Hide file tree
Showing 149 changed files with 2,485 additions and 2,493 deletions.
1 change: 1 addition & 0 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ General changes {#qgis_api_break_3_0_global}
- All destCrs() methods have been renamed to destinationCrs()
- All exportXML() methods have been renamed to exportXml()
- All importXML() methods have been renamed to importXml()
- All methods relating to "border" or "outline" color or width have been renamed to stroke
- All methods taking or returning QGis::WkbType have been changed to use QgsWkbTypes::Type
- All methods taking or returning QGis::GeometryType have been changed to use QgsWkbTypes::GeometryType
- Network analysis library has been merged into analysis library
Expand Down
40 changes: 20 additions & 20 deletions python/core/composer/qgscomposerarrow.sip
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,25 @@ class QgsComposerArrow: QgsComposerItem
*/
QString endMarker() const;

/** Returns the color used to draw outline around the the arrow head.
* @returns arrow head outline color
/** Returns the color used to draw stroke around the the arrow head.
* @returns arrow head stroke color
* @see arrowHeadFillColor
* @see setArrowHeadOutlineColor
* @see setArrowHeadStrokeColor
* @note added in 2.5
*/
QColor arrowHeadOutlineColor() const;
QColor arrowHeadStrokeColor() const;

/** Sets the color used to draw the outline around the arrow head.
* @param color arrow head outline color
/** Sets the color used to draw the stroke around the arrow head.
* @param color arrow head stroke color
* @see setArrowHeadFillColor
* @see arrowHeadOutlineColor
* @see arrowHeadStrokeColor
* @note added in 2.5
*/
void setArrowHeadOutlineColor( const QColor& color );
void setArrowHeadStrokeColor( const QColor& color );

/** Returns the color used to fill the arrow head.
* @returns arrow head fill color
* @see arrowHeadOutlineColor
* @see arrowHeadStrokeColor
* @see setArrowHeadFillColor
* @note added in 2.5
*/
Expand All @@ -103,26 +103,26 @@ class QgsComposerArrow: QgsComposerItem
/** Sets the color used to fill the arrow head.
* @param color arrow head fill color
* @see arrowHeadFillColor
* @see setArrowHeadOutlineColor
* @see setArrowHeadStrokeColor
* @note added in 2.5
*/
void setArrowHeadFillColor( const QColor& color );

/** Sets the pen width for the outline of the arrow head
* @param width pen width for arrow head outline
* @see arrowHeadOutlineWidth
* @see setArrowHeadOutlineColor
/** Sets the pen width for the stroke of the arrow head
* @param width pen width for arrow head stroke
* @see arrowHeadStrokeWidth
* @see setArrowHeadStrokeColor
* @note added in 2.5
*/
void setArrowHeadOutlineWidth( const double width );
void setArrowHeadStrokeWidth( const double width );

/** Returns the pen width for the outline of the arrow head
* @returns pen width for arrow head outline
* @see setArrowHeadOutlineWidth
* @see arrowHeadOutlineColor
/** Returns the pen width for the stroke of the arrow head
* @returns pen width for arrow head stroke
* @see setArrowHeadStrokeWidth
* @see arrowHeadStrokeColor
* @note added in 2.5
*/
double arrowHeadOutlineWidth() const;
double arrowHeadStrokeWidth() const;

/** Sets the line symbol used for drawing the line portion of the arrow
* @param symbol line symbol
Expand Down
58 changes: 29 additions & 29 deletions python/core/composer/qgscomposeritem.sip
Original file line number Diff line number Diff line change
Expand Up @@ -268,68 +268,68 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
/** Whether this item has a frame or not.
* @returns true if there is a frame around this item, otherwise false.
* @see setFrameEnabled
* @see frameOutlineWidth
* @see frameStrokeWidth
* @see frameJoinStyle
* @see frameOutlineColor
* @see frameStrokeColor
*/
bool hasFrame() const;

/** Set whether this item has a frame drawn around it or not.
* @param drawFrame draw frame
* @see hasFrame
* @see setFrameOutlineWidth
* @see setFrameStrokeWidth
* @see setFrameJoinStyle
* @see setFrameOutlineColor
* @see setFrameStrokeColor
*/
virtual void setFrameEnabled( const bool drawFrame );

/** Sets frame outline color
* @param color new color for outline frame
/** Sets frame stroke color
* @param color new color for stroke frame
* @note introduced in 2.6
* @see frameOutlineColor
* @see frameStrokeColor
* @see setFrameEnabled
* @see setFrameJoinStyle
* @see setFrameOutlineWidth
* @see setFrameStrokeWidth
*/
virtual void setFrameOutlineColor( const QColor& color );
virtual void setFrameStrokeColor( const QColor& color );

/** Returns the frame's outline color. Only used if hasFrame is true.
* @returns frame outline color
/** Returns the frame's stroke color. Only used if hasFrame is true.
* @returns frame stroke color
* @note introduced in 2.6
* @see hasFrame
* @see setFrameOutlineColor
* @see setFrameStrokeColor
* @see frameJoinStyle
* @see setFrameOutlineColor
* @see setFrameStrokeColor
*/
QColor frameOutlineColor() const;
QColor frameStrokeColor() const;

/** Sets frame outline width
* @param outlineWidth new width for outline frame
/** Sets frame stroke width
* @param strokeWidth new width for stroke frame
* @note introduced in 2.2
* @see frameOutlineWidth
* @see frameStrokeWidth
* @see setFrameEnabled
* @see setFrameJoinStyle
* @see setFrameOutlineColor
* @see setFrameStrokeColor
*/
virtual void setFrameOutlineWidth( const double outlineWidth );
virtual void setFrameStrokeWidth( const double strokeWidth );

/** Returns the frame's outline width. Only used if hasFrame is true.
* @returns Frame outline width
/** Returns the frame's stroke width. Only used if hasFrame is true.
* @returns Frame stroke width
* @note introduced in 2.3
* @see hasFrame
* @see setFrameOutlineWidth
* @see setFrameStrokeWidth
* @see frameJoinStyle
* @see frameOutlineColor
* @see frameStrokeColor
*/
double frameOutlineWidth() const;
double frameStrokeWidth() const;

/** Returns the join style used for drawing the item's frame
* @returns Join style for outline frame
* @note introduced in 2.3
* @see hasFrame
* @see setFrameJoinStyle
* @see frameOutlineWidth
* @see frameOutlineColor
* @see frameStrokeWidth
* @see frameStrokeColor
*/
Qt::PenJoinStyle frameJoinStyle() const;

Expand All @@ -338,13 +338,13 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
* @note introduced in 2.3
* @see setFrameEnabled
* @see frameJoinStyle
* @see setFrameOutlineWidth
* @see setFrameOutlineColor
* @see setFrameStrokeWidth
* @see setFrameStrokeColor
*/
void setFrameJoinStyle( const Qt::PenJoinStyle style );

/** Returns the estimated amount the item's frame bleeds outside the item's
* actual rectangle. For instance, if the item has a 2mm frame outline, then
* actual rectangle. For instance, if the item has a 2mm frame stroke, then
* 1mm of this frame is drawn outside the item's rect. In this case the
* return value will be 1.0
* @note introduced in 2.2
Expand Down
16 changes: 8 additions & 8 deletions python/core/composer/qgscomposeritemcommand.sip
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
LegendIconSymbolSpace,
LegendBoxSpace,
LegendColumnSpace,
LegendRasterBorderWidth,
LegendRasterStrokeWidth,
LegendFontColor,
LegendRasterBorderColor,
LegendRasterStrokeColor,
//composer picture
ComposerPictureRotation,
ComposerPictureFillColor,
ComposerPictureOutlineColor,
ComposerPictureStrokeColor,
// composer scalebar
ScaleBarLineWidth,
ScaleBarHeight,
Expand All @@ -100,15 +100,15 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
TableGridStrokeWidth,
//composer shape
ShapeCornerRadius,
ShapeOutlineWidth,
ShapeStrokeWidth,
//composer arrow
ArrowOutlineWidth,
ArrowStrokeWidth,
ArrowHeadFillColor,
ArrowHeadOutlineColor,
ArrowHeadStrokeColor,
ArrowHeadWidth,
//item
ItemOutlineWidth,
ItemOutlineColor,
ItemStrokeWidth,
ItemStrokeColor,
ItemBackgroundColor,
ItemMove,
ItemRotation,
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposerlabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ class QgsComposerLabel : QgsComposerItem
*/
virtual void setFrameEnabled( const bool drawFrame );

/** Reimplemented to call prepareGeometryChange after changing outline width
/** Reimplemented to call prepareGeometryChange after changing stroke width
*/
virtual void setFrameOutlineWidth( const double outlineWidth );
virtual void setFrameStrokeWidth( const double strokeWidth );

public slots:
void refreshExpressionContext();
Expand Down
76 changes: 38 additions & 38 deletions python/core/composer/qgscomposerlegend.sip
Original file line number Diff line number Diff line change
Expand Up @@ -166,60 +166,60 @@ class QgsComposerLegend : QgsComposerItem
int equalColumnWidth() const;
void setEqualColumnWidth( bool s );

/** Returns whether a border will be drawn around raster symbol items.
* @see setDrawRasterBorder()
* @see rasterBorderColor()
* @see rasterBorderWidth()
/** Returns whether a stroke will be drawn around raster symbol items.
* @see setDrawRasterStroke()
* @see rasterStrokeColor()
* @see rasterStrokeWidth()
* @note added in QGIS 2.12
*/
bool drawRasterBorder() const;
bool drawRasterStroke() const;

/** Sets whether a border will be drawn around raster symbol items.
/** Sets whether a stroke will be drawn around raster symbol items.
* @param enabled set to true to draw borders
* @see drawRasterBorder()
* @see setRasterBorderColor()
* @see setRasterBorderWidth()
* @see drawRasterStroke()
* @see setRasterStrokeColor()
* @see setRasterStrokeWidth()
* @note added in QGIS 2.12
*/
void setDrawRasterBorder( bool enabled );
void setDrawRasterStroke( bool enabled );

/** Returns the border color for the border drawn around raster symbol items. The border is
* only drawn if drawRasterBorder() is true.
* @see setRasterBorderColor()
* @see drawRasterBorder()
* @see rasterBorderWidth()
/** Returns the stroke color for the stroke drawn around raster symbol items. The stroke is
* only drawn if drawRasterStroke() is true.
* @see setRasterStrokeColor()
* @see drawRasterStroke()
* @see rasterStrokeWidth()
* @note added in QGIS 2.12
*/
QColor rasterBorderColor() const;

/** Sets the border color for the border drawn around raster symbol items. The border is
* only drawn if drawRasterBorder() is true.
* @param color border color
* @see rasterBorderColor()
* @see setDrawRasterBorder()
* @see setRasterBorderWidth()
QColor rasterStrokeColor() const;

/** Sets the stroke color for the stroke drawn around raster symbol items. The stroke is
* only drawn if drawRasterStroke() is true.
* @param color stroke color
* @see rasterStrokeColor()
* @see setDrawRasterStroke()
* @see setRasterStrokeWidth()
* @note added in QGIS 2.12
*/
void setRasterBorderColor( const QColor& color );
void setRasterStrokeColor( const QColor& color );

/** Returns the border width (in millimeters) for the border drawn around raster symbol items. The border is
* only drawn if drawRasterBorder() is true.
* @see setRasterBorderWidth()
* @see drawRasterBorder()
* @see rasterBorderColor()
/** Returns the stroke width (in millimeters) for the stroke drawn around raster symbol items. The stroke is
* only drawn if drawRasterStroke() is true.
* @see setRasterStrokeWidth()
* @see drawRasterStroke()
* @see rasterStrokeColor()
* @note added in QGIS 2.12
*/
double rasterBorderWidth() const;

/** Sets the border width for the border drawn around raster symbol items. The border is
* only drawn if drawRasterBorder() is true.
* @param width border width in millimeters
* @see rasterBorderWidth()
* @see setDrawRasterBorder()
* @see setRasterBorderColor()
double rasterStrokeWidth() const;

/** Sets the stroke width for the stroke drawn around raster symbol items. The stroke is
* only drawn if drawRasterStroke() is true.
* @param width stroke width in millimeters
* @see rasterStrokeWidth()
* @see setDrawRasterStroke()
* @see setRasterStrokeColor()
* @note added in QGIS 2.12
*/
void setRasterBorderWidth( double width );
void setRasterStrokeWidth( double width );

void setComposerMap( const QgsComposerMap* map );
const QgsComposerMap* composerMap() const;
Expand Down
4 changes: 2 additions & 2 deletions python/core/composer/qgscomposermap.sip
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ class QgsComposerMap : QgsComposerItem
/** In case of annotations, the bounding rectangle can be larger than the map item rectangle */
QRectF boundingRect() const;

/* reimplement setFrameOutlineWidth, so that updateBoundingRect() is called after setting the frame width */
virtual void setFrameOutlineWidth( const double outlineWidth );
/* reimplement setFrameStrokeWidth, so that updateBoundingRect() is called after setting the frame width */
virtual void setFrameStrokeWidth( const double strokeWidth );

/** Sets rotation for the map - this does not affect the composer item shape, only the
* way the map is drawn within the item
Expand Down
16 changes: 8 additions & 8 deletions python/core/composer/qgscomposermapgrid.sip
Original file line number Diff line number Diff line change
Expand Up @@ -730,31 +730,31 @@ class QgsComposerMapGrid : QgsComposerMapItem
*/
double frameWidth() const;

/** Sets the width of the outline drawn in the grid frame.
* @param width width of grid frame outline
/** Sets the width of the stroke drawn in the grid frame.
* @param width width of grid frame stroke
* @see framePenSize
* @see setFramePenColor
*/
void setFramePenSize( const double width );

/** Retrieves the width of the outline drawn in the grid frame.
* @returns width of grid frame outline
/** Retrieves the width of the stroke drawn in the grid frame.
* @returns width of grid frame stroke
* @see setFramePenSize
* @see framePenColor
*/
double framePenSize() const;

/** Sets the color of the outline drawn in the grid frame.
* @param color color of grid frame outline
/** Sets the color of the stroke drawn in the grid frame.
* @param color color of grid frame stroke
* @see framePenColor
* @see setFramePenSize
* @see setFrameFillColor1
* @see setFrameFillColor2
*/
void setFramePenColor( const QColor& color );

/** Retrieves the color of the outline drawn in the grid frame.
* @returns color of grid frame outline
/** Retrieves the color of the stroke drawn in the grid frame.
* @returns color of grid frame stroke
* @see setFramePenColor
* @see framePenSize
* @see frameFillColor1
Expand Down
Loading

0 comments on commit 47683fc

Please sign in to comment.