Skip to content
Permalink
Browse files

Travis says no to enum class

  • Loading branch information
nyalldawson committed May 1, 2020
1 parent d6637c5 commit 6ec369e6b7803098128971f598ec0671a90435d0
@@ -6,8 +6,3 @@
QgsLabeling.LinePlacementFlag.MapOrientation.__doc__ = "Signifies that the AboveLine and BelowLine flags should respect the map's orientation rather than the feature's orientation. For example, AboveLine will always result in label's being placed above a line, regardless of the line's direction."
QgsLabeling.LinePlacementFlag.__doc__ = 'Line placement flags, which control how candidates are generated for a linear feature.\n\n' + '* ``OnLine``: ' + QgsLabeling.LinePlacementFlag.OnLine.__doc__ + '\n' + '* ``AboveLine``: ' + QgsLabeling.LinePlacementFlag.AboveLine.__doc__ + '\n' + '* ``BelowLine``: ' + QgsLabeling.LinePlacementFlag.BelowLine.__doc__ + '\n' + '* ``MapOrientation``: ' + QgsLabeling.LinePlacementFlag.MapOrientation.__doc__
# --
# monkey patching scoped based enum
QgsLabeling.PolygonPlacementFlag.AllowPlacementOutsideOfPolygon.__doc__ = "Labels can be placed outside of a polygon feature"
QgsLabeling.PolygonPlacementFlag.AllowPlacementInsideOfPolygon.__doc__ = "Labels can be placed inside a polygon feature"
QgsLabeling.PolygonPlacementFlag.__doc__ = 'Polygon placement flags, which control how candidates are generated for a polygon feature.\n\n.. versionadded:: 3.14\n\n' + '* ``AllowPlacementOutsideOfPolygon``: ' + QgsLabeling.PolygonPlacementFlag.AllowPlacementOutsideOfPolygon.__doc__ + '\n' + '* ``AllowPlacementInsideOfPolygon``: ' + QgsLabeling.PolygonPlacementFlag.AllowPlacementInsideOfPolygon.__doc__
# --
@@ -32,7 +32,7 @@ Contains constants and enums relating to labeling.
typedef QFlags<QgsLabeling::LinePlacementFlag> LinePlacementFlags;


enum class PolygonPlacementFlag
enum PolygonPlacementFlag
{
AllowPlacementOutsideOfPolygon,
AllowPlacementInsideOfPolygon,
@@ -49,7 +49,7 @@ class CORE_EXPORT QgsLabeling
*
* \since QGIS 3.14
*/
enum class PolygonPlacementFlag : int
enum PolygonPlacementFlag
{
AllowPlacementOutsideOfPolygon = 1 << 0, //!< Labels can be placed outside of a polygon feature
AllowPlacementInsideOfPolygon = 1 << 1, //!< Labels can be placed inside a polygon feature

0 comments on commit 6ec369e

Please sign in to comment.
You can’t perform that action at this time.