Skip to content

Commit

Permalink
Merge branch 'master' into pyflakes
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 6, 2020
2 parents 3e6c7c2 + 1e0b890 commit 0aa1eb0
Show file tree
Hide file tree
Showing 62 changed files with 1,605 additions and 203 deletions.
11 changes: 10 additions & 1 deletion .docker/qgis_resources/test_runner/qgis_testrunner.sh
Expand Up @@ -13,10 +13,19 @@ TEST_NAME=$1
TEST_RUNNER_PATH=${TEST_RUNNER_PATH:-/usr/bin/qgis_testrunner.py}
QGIS_BUILD_PATH=${QGIS_BUILD_PATH:-qgis}

LOGFILE=/tmp/qgis_testrunner_$$

echo "Running test $1 ..."
OUTPUT=$(QGIS_TEST_MODULE=${TEST_NAME} unbuffer ${QGIS_BUILD_PATH} --version-migration --nologo --code ${TEST_RUNNER_PATH} "$TEST_NAME" 2>/dev/null | tee /dev/tty)
QGIS_TEST_MODULE=${TEST_NAME} unbuffer ${QGIS_BUILD_PATH} \
--version-migration --nologo --code \
${TEST_RUNNER_PATH} "$TEST_NAME" \
2>/dev/null | \
tee ${LOGFILE}

# NOTE: EXIT_CODE will always be 0 if "tee" works,
# we could `set -o pipefail` to change this
EXIT_CODE="$?"
OUTPUT=$(cat $LOGFILE) # quick hack to avoid changing too many lines
if [ -z "$OUTPUT" ]; then
echo "ERROR: no output from the test runner! (exit code: ${EXIT_CODE})"
exit 1
Expand Down
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -675,6 +675,7 @@
<file>themes/default/multieditSameValues.svg</file>
<file>themes/default/locked_repeating.svg</file>
<file>themes/default/sort.svg</file>
<file>themes/default/sort-reverse.svg</file>
<file>themes/default/styleicons/multibandcolor.svg</file>
<file>themes/default/styleicons/paletted.svg</file>
<file>themes/default/styleicons/singlebandgray.svg</file>
Expand Down
72 changes: 72 additions & 0 deletions images/themes/default/sort-reverse.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion python/core/auto_additions/qgsscalebarrenderer.py
Expand Up @@ -11,5 +11,6 @@
QgsScaleBarRenderer.Flag.FlagUsesLabelVerticalPlacement.__doc__ = "Renderer uses the QgsScaleBarSettings::labelVerticalPlacement() setting"
QgsScaleBarRenderer.Flag.FlagUsesLabelHorizontalPlacement.__doc__ = "Renderer uses the QgsScaleBarSettings::labelHorizontalPlacement() setting"
QgsScaleBarRenderer.Flag.FlagUsesAlignment.__doc__ = "Renderer uses the QgsScaleBarSettings::alignment() setting"
QgsScaleBarRenderer.Flag.__doc__ = 'Flags which control scalebar renderer behavior.\n\n.. versionadded:: 3.14\n\n' + '* ``FlagUsesLineSymbol``: ' + QgsScaleBarRenderer.Flag.FlagUsesLineSymbol.__doc__ + '\n' + '* ``FlagUsesFillSymbol``: ' + QgsScaleBarRenderer.Flag.FlagUsesFillSymbol.__doc__ + '\n' + '* ``FlagUsesAlternateFillSymbol``: ' + QgsScaleBarRenderer.Flag.FlagUsesAlternateFillSymbol.__doc__ + '\n' + '* ``FlagRespectsUnits``: ' + QgsScaleBarRenderer.Flag.FlagRespectsUnits.__doc__ + '\n' + '* ``FlagRespectsMapUnitsPerScaleBarUnit``: ' + QgsScaleBarRenderer.Flag.FlagRespectsMapUnitsPerScaleBarUnit.__doc__ + '\n' + '* ``FlagUsesUnitLabel``: ' + QgsScaleBarRenderer.Flag.FlagUsesUnitLabel.__doc__ + '\n' + '* ``FlagUsesSegments``: ' + QgsScaleBarRenderer.Flag.FlagUsesSegments.__doc__ + '\n' + '* ``FlagUsesLabelBarSpace``: ' + QgsScaleBarRenderer.Flag.FlagUsesLabelBarSpace.__doc__ + '\n' + '* ``FlagUsesLabelVerticalPlacement``: ' + QgsScaleBarRenderer.Flag.FlagUsesLabelVerticalPlacement.__doc__ + '\n' + '* ``FlagUsesLabelHorizontalPlacement``: ' + QgsScaleBarRenderer.Flag.FlagUsesLabelHorizontalPlacement.__doc__ + '\n' + '* ``FlagUsesAlignment``: ' + QgsScaleBarRenderer.Flag.FlagUsesAlignment.__doc__
QgsScaleBarRenderer.Flag.FlagUsesSubdivisions.__doc__ = "Renderer uses the scalebar subdivisions"
QgsScaleBarRenderer.Flag.__doc__ = 'Flags which control scalebar renderer behavior.\n\n.. versionadded:: 3.14\n\n' + '* ``FlagUsesLineSymbol``: ' + QgsScaleBarRenderer.Flag.FlagUsesLineSymbol.__doc__ + '\n' + '* ``FlagUsesFillSymbol``: ' + QgsScaleBarRenderer.Flag.FlagUsesFillSymbol.__doc__ + '\n' + '* ``FlagUsesAlternateFillSymbol``: ' + QgsScaleBarRenderer.Flag.FlagUsesAlternateFillSymbol.__doc__ + '\n' + '* ``FlagRespectsUnits``: ' + QgsScaleBarRenderer.Flag.FlagRespectsUnits.__doc__ + '\n' + '* ``FlagRespectsMapUnitsPerScaleBarUnit``: ' + QgsScaleBarRenderer.Flag.FlagRespectsMapUnitsPerScaleBarUnit.__doc__ + '\n' + '* ``FlagUsesUnitLabel``: ' + QgsScaleBarRenderer.Flag.FlagUsesUnitLabel.__doc__ + '\n' + '* ``FlagUsesSegments``: ' + QgsScaleBarRenderer.Flag.FlagUsesSegments.__doc__ + '\n' + '* ``FlagUsesLabelBarSpace``: ' + QgsScaleBarRenderer.Flag.FlagUsesLabelBarSpace.__doc__ + '\n' + '* ``FlagUsesLabelVerticalPlacement``: ' + QgsScaleBarRenderer.Flag.FlagUsesLabelVerticalPlacement.__doc__ + '\n' + '* ``FlagUsesLabelHorizontalPlacement``: ' + QgsScaleBarRenderer.Flag.FlagUsesLabelHorizontalPlacement.__doc__ + '\n' + '* ``FlagUsesAlignment``: ' + QgsScaleBarRenderer.Flag.FlagUsesAlignment.__doc__ + '\n' + '* ``FlagUsesSubdivisions``: ' + QgsScaleBarRenderer.Flag.FlagUsesSubdivisions.__doc__
# --
29 changes: 29 additions & 0 deletions python/core/auto_generated/layertree/qgslayertreelayer.sip.in
Expand Up @@ -177,6 +177,35 @@ symbol width or height from :py:class:`QgsLegendSettings`.

.. seealso:: :py:func:`patchSize`

.. versionadded:: 3.14
%End

enum LegendNodesSplitBehavior
{
UseDefaultLegendSetting,
AllowSplittingLegendNodesOverMultipleColumns,
PreventSplittingLegendNodesOverMultipleColumns,
};

LegendNodesSplitBehavior legendSplitBehavior() const;
%Docstring
Returns the column split behavior for the node.

This value controls how legend nodes belonging the to layer may be split over multiple columns in legends.

.. seealso:: :py:func:`setLegendSplitBehavior`

.. versionadded:: 3.14
%End

void setLegendSplitBehavior( LegendNodesSplitBehavior behavior );
%Docstring
Sets the column split ``behavior`` for the node.

This value controls how legend nodes belonging the to layer may be split over multiple columns in legends.

.. seealso:: :py:func:`legendSplitBehavior`

.. versionadded:: 3.14
%End

Expand Down
Expand Up @@ -93,6 +93,24 @@ symbol width or height from :py:class:`QgsLegendSettings`.

.. seealso:: :py:func:`userPatchSize`

.. versionadded:: 3.14
%End

virtual void setColumnBreak( bool breakBeforeNode );
%Docstring
Sets whether a forced column break should occur before the node.

.. seealso:: :py:func:`columnBreak`

.. versionadded:: 3.14
%End

virtual bool columnBreak() const;
%Docstring
Returns whether a forced column break should occur before the node.

.. seealso:: :py:func:`setColumnBreak`

.. versionadded:: 3.14
%End

Expand Down
2 changes: 2 additions & 0 deletions python/core/auto_generated/layout/qgslayoutitem.sip.in
Expand Up @@ -223,6 +223,8 @@ Base class for graphical items within a :py:class:`QgsLayout`.
UndoScaleBarSegmentsLeft,
UndoScaleBarSegments,
UndoScaleBarHeight,
UndoScaleBarSubdivisions,
UndoScaleBarSubdivisionsHeight,
UndoScaleBarFontColor,
UndoScaleBarFillColor,
UndoScaleBarFillColor2,
Expand Down
36 changes: 36 additions & 0 deletions python/core/auto_generated/layout/qgslayoutitemscalebar.sip.in
Expand Up @@ -74,6 +74,42 @@ Sets the number of ``segments`` included in the left part of the scalebar.
.. seealso:: :py:func:`numberOfSegmentsLeft`

.. seealso:: :py:func:`setNumberOfSegments`
%End

int numberOfSubdivisions() const;
%Docstring
Returns the number of subdivisions for segments included in the right part of the scalebar (only used for some scalebar types).

.. seealso:: :py:func:`setNumberOfSubdivisions`

.. versionadded:: 3.14
%End

void setNumberOfSubdivisions( int subdivisions );
%Docstring
Sets the number of ``subdivisions`` for segments included in the right part of the scalebar (only used for some scalebar types).

.. seealso:: :py:func:`numberOfSubdivisions`

.. versionadded:: 3.14
%End

double subdivisionsHeight() const;
%Docstring
Returns the scalebar subdivisions height (in millimeters) for segments included in the right part of the scalebar (only used for some scalebar types).

.. seealso:: :py:func:`setSubdivisionsHeight`

.. versionadded:: 3.14
%End

void setSubdivisionsHeight( double height );
%Docstring
Sets the scalebar subdivisions ``height`` (in millimeters) for segments included in the right part of the scalebar (only used for some scalebar types).

.. seealso:: :py:func:`subdivisionsHeight`

.. versionadded:: 3.14
%End

double unitsPerSegment() const;
Expand Down
28 changes: 28 additions & 0 deletions python/core/auto_generated/mesh/qgsmeshlayer.sip.in
Expand Up @@ -317,6 +317,34 @@ Sets the reference time of the layer

:param referenceTime: the reference time

.. versionadded:: 3.14
%End

QgsPointXY snapOnElement( QgsMesh::ElementType elementType, const QgsPointXY &point, double searchRadius );
%Docstring
Returns the position of the snapped point on the mesh element closest to ``point`` intersecting with
the searching area defined by ``point`` and ``searchRadius``

For vertex, the snapped position is the vertex position
For edge, the snapped position is the projected point on the edge, extremity of edge if outside the edge
For face, the snapped position is the centroid of the face
The returned position is in map coordinates.

.. note::

It uses previously cached and indexed triangular mesh
and so if the layer has not been rendered previously
(e.g. when used in a script) it returns empty :py:class:`QgsPointXY`

.. seealso:: :py:func:`updateTriangularMesh`

:param elementType: the type of element to snap
:param point: the center of the search area in map coordinates
:param searchRadius: the radius of the search area in map units

:return: the position of the snapped point on the closest element, empty QgsPointXY if no element of type ``elementType``


.. versionadded:: 3.14
%End

Expand Down
99 changes: 98 additions & 1 deletion python/core/auto_generated/qgslegendsettings.sip.in
Expand Up @@ -107,19 +107,84 @@ line character.
%End

double columnSpace() const;
%Docstring
Returns the margin space between adjacent columns (in millimeters).

.. seealso:: :py:func:`setColumnSpace`
%End

void setColumnSpace( double s );
%Docstring
Sets the margin space between adjacent columns (in millimeters).

.. seealso:: :py:func:`columnSpace`
%End

int columnCount() const;
%Docstring
Returns the desired minimum number of columns to show in the legend.

If legend components have forced column breaks then the actual number of columns in the rendered
legend may be larger than this value.

.. seealso:: :py:func:`setColumnCount`
%End

void setColumnCount( int c );
%Docstring
Sets the desired minimum number of columns to show in the legend.

If legend components have forced column breaks then the actual number of columns in the rendered
legend may be larger than this value.

.. seealso:: :py:func:`columnCount`
%End

bool splitLayer() const;
%Docstring
Returns ``True`` if layer components can be split over multiple columns.

.. seealso:: :py:func:`setSplitLayer`
%End

void setSplitLayer( bool s );
%Docstring
Sets whether layer components can be split over multiple columns.

.. seealso:: :py:func:`splitLayer`
%End

bool equalColumnWidth() const;
%Docstring
Returns ``True`` if all columns should have equal widths.

If ``False`` is returned then columns will be individually resized to their minimum possible width.

.. seealso:: :py:func:`setEqualColumnWidth`
%End

void setEqualColumnWidth( bool s );
%Docstring
Sets whether all columns should have equal widths.

If ``False``, then then columns will be individually resized to their minimum possible width.

.. seealso:: :py:func:`equalColumnWidth`
%End

QColor fontColor() const;
%Docstring
Returns the font color used for legend items.

.. seealso:: :py:func:`setFontColor`
%End

void setFontColor( const QColor &c );
%Docstring
Sets the font color used for legend items.

.. seealso:: :py:func:`fontColor`
%End

QColor layerFontColor() const;
%Docstring
Expand All @@ -144,9 +209,19 @@ Overrides fontColor()
.. versionadded:: 3.4.7
%End


QSizeF symbolSize() const;
%Docstring
Returns the default symbol size (in millimeters) used for legend items.

.. seealso:: :py:func:`setSymbolSize`
%End

void setSymbolSize( QSizeF s );
%Docstring
Sets the default symbol size (in millimeters) used for legend items.

.. seealso:: :py:func:`symbolSize`
%End

void setSymbolAlignment( Qt::AlignmentFlag alignment );
%Docstring
Expand Down Expand Up @@ -259,10 +334,32 @@ only drawn if drawRasterStroke() is ``True``.
%End

QSizeF wmsLegendSize() const;
%Docstring
Returns the size (in millimeters) of WMS legend graphics shown in the legend.

.. seealso:: :py:func:`setWmsLegendSize`
%End

void setWmsLegendSize( QSizeF s );
%Docstring
Sets the desired size (in millimeters) of WMS legend graphics shown in the legend.

.. seealso:: :py:func:`wmsLegendSize`
%End

double lineSpacing() const;
%Docstring
Returns the line spacing to use between lines of legend text.

.. seealso:: :py:func:`setLineSpacing`
%End

void setLineSpacing( double s );
%Docstring
Sets the line spacing to use between lines of legend text.

.. seealso:: :py:func:`lineSpacing`
%End

double mmPerMapUnit() const /Deprecated/;
%Docstring
Expand Down

0 comments on commit 0aa1eb0

Please sign in to comment.