aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpath_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2019-03-24 18:53:52 +0100
committerpaolo <paolo.angelelli@qt.io>2019-05-28 10:02:45 +0200
commit1404009264e3526838c608269a45d9acf61f5e46 (patch)
treea4ec08a2bd9a57bb0fb16a4363a03840afadc771 /src/quick/util/qquickpath_p.h
parent5b96f81fa3c31ea911a08bb28275272b0770a745 (diff)
Add QQuickPathPolyline
And show our users some love. [ChangeLog][QtQuick][Path] Added QQuickPathPolyline. Change-Id: I0fb78ae3e4e7c65e81e100595dc1eb16f88a68ed Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/util/qquickpath_p.h')
-rw-r--r--src/quick/util/qquickpath_p.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h
index 01f60c34d2..5a939f49cb 100644
--- a/src/quick/util/qquickpath_p.h
+++ b/src/quick/util/qquickpath_p.h
@@ -424,6 +424,27 @@ private:
qreal _value = 0;
};
+class Q_QUICK_PRIVATE_EXPORT QQuickPathPolyline : public QQuickCurve
+{
+ Q_OBJECT
+ Q_PROPERTY(QPointF start READ start NOTIFY startChanged)
+ Q_PROPERTY(QVariantList path READ path WRITE setPath NOTIFY pathChanged)
+public:
+ QQuickPathPolyline(QObject *parent=nullptr);
+
+ QVariantList path() const;
+ void setPath(const QVariantList &path);
+ QPointF start() const;
+ void addToPath(QPainterPath &path, const QQuickPathData &data) override;
+
+Q_SIGNALS:
+ void pathChanged();
+ void startChanged();
+
+private:
+ QVector<QPointF> m_path;
+};
+
struct QQuickCachedBezier
{
QQuickCachedBezier() {}
@@ -545,6 +566,7 @@ QML_DECLARE_TYPE(QQuickPathArc)
QML_DECLARE_TYPE(QQuickPathAngleArc)
QML_DECLARE_TYPE(QQuickPathSvg)
QML_DECLARE_TYPE(QQuickPathPercent)
+QML_DECLARE_TYPE(QQuickPathPolyline)
QML_DECLARE_TYPE(QQuickPath)
#endif // QQUICKPATH_H