Skip to content

Commit

Permalink
make QgsGeometry a Q_GADGET
Browse files Browse the repository at this point in the history
so Q_ENUM can be used
  • Loading branch information
3nids committed Feb 17, 2018
1 parent 52585cf commit 710beff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Expand Up @@ -669,6 +669,7 @@ SET(QGIS_CORE_MOC_HDRS
raster/qgsrasterlayerrenderer.h

geometry/qgspoint.h
geometry/qgsgeometry.h

geocms/geonode/qgsgeonoderequest.h

Expand Down Expand Up @@ -1090,7 +1091,6 @@ SET(QGIS_CORE_HDRS
geometry/qgsgeometryeditutils.h
geometry/qgsgeometryengine.h
geometry/qgsgeometryfactory.h
geometry/qgsgeometry.h
geometry/qgsgeometryutils.h
geometry/qgsgeos.h
geometry/qgsinternalgeometryengine.h
Expand Down
4 changes: 4 additions & 0 deletions src/core/geometry/qgsgeometry.h
Expand Up @@ -110,6 +110,7 @@ struct QgsGeometryPrivate;

class CORE_EXPORT QgsGeometry
{
Q_GADGET
public:

/**
Expand Down Expand Up @@ -848,6 +849,7 @@ class CORE_EXPORT QgsGeometry
SideLeft = 0, //!< Buffer to left of line
SideRight, //!< Buffer to right of line
};
Q_ENUM( BufferSide );

//! End cap styles for buffers
enum EndCapStyle
Expand All @@ -856,6 +858,7 @@ class CORE_EXPORT QgsGeometry
CapFlat, //!< Flat cap (in line with start/end of line)
CapSquare, //!< Square cap (extends past start/end of line by buffer distance)
};
Q_ENUM( EndCapStyle );

//! Join styles for buffers
enum JoinStyle
Expand All @@ -864,6 +867,7 @@ class CORE_EXPORT QgsGeometry
JoinStyleMiter, //!< Use mitered joins
JoinStyleBevel, //!< Use beveled joins
};
Q_ENUM( JoinStyle );

/**
* Returns a buffer region around this geometry having the given width and with a specified number
Expand Down

0 comments on commit 710beff

Please sign in to comment.