summaryrefslogtreecommitdiff
path: root/platform/qt/include/qmapbox.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qt/include/qmapbox.hpp')
-rw-r--r--platform/qt/include/qmapbox.hpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/platform/qt/include/qmapbox.hpp b/platform/qt/include/qmapbox.hpp
index 1b61d3270f..d138f4057b 100644
--- a/platform/qt/include/qmapbox.hpp
+++ b/platform/qt/include/qmapbox.hpp
@@ -26,6 +26,11 @@ struct Q_DECL_EXPORT Feature {
LineStringType,
PolygonType
};
+
+ Feature(Type type_ = PointType, const CoordinatesCollections& geometry_ = CoordinatesCollections(),
+ const QVariantMap& properties_ = QVariantMap(), const QVariant& id_ = QVariant())
+ : type(type_), geometry(geometry_), properties(properties_), id(id_) {}
+
Type type;
CoordinatesCollections geometry;
QVariantMap properties;
@@ -34,11 +39,15 @@ struct Q_DECL_EXPORT Feature {
struct Q_DECL_EXPORT ShapeAnnotationGeometry {
enum Type {
- LineStringType,
+ LineStringType = 1,
PolygonType,
MultiLineStringType,
MultiPolygonType
};
+
+ ShapeAnnotationGeometry(Type type_ = LineStringType, const CoordinatesCollections& geometry_ = CoordinatesCollections())
+ : type(type_), geometry(geometry_) {}
+
Type type;
CoordinatesCollections geometry;
};
@@ -49,16 +58,24 @@ struct Q_DECL_EXPORT SymbolAnnotation {
};
struct Q_DECL_EXPORT LineAnnotation {
+ LineAnnotation(const ShapeAnnotationGeometry& geometry_ = ShapeAnnotationGeometry(), float opacity_ = 1.0f,
+ float width_ = 1.0f, const QColor& color_ = Qt::black)
+ : geometry(geometry_), opacity(opacity_), width(width_), color(color_) {}
+
ShapeAnnotationGeometry geometry;
- float opacity = 1.0f;
- float width = 1.0f;
- QColor color = Qt::black;
+ float opacity;
+ float width;
+ QColor color;
};
struct Q_DECL_EXPORT FillAnnotation {
+ FillAnnotation(const ShapeAnnotationGeometry& geometry_ = ShapeAnnotationGeometry(), float opacity_ = 1.0f,
+ const QColor& color_ = Qt::black, const QVariant& outlineColor_ = QVariant())
+ : geometry(geometry_), opacity(opacity_), color(color_), outlineColor(outlineColor_) {}
+
ShapeAnnotationGeometry geometry;
- float opacity = 1.0f;
- QColor color = Qt::black;
+ float opacity;
+ QColor color;
QVariant outlineColor;
};