4#include "qml_material/export.hpp"
9 Q_GADGET_EXPORT(QML_MATERIAL_API)
10 QML_VALUE_TYPE(corners)
11 QML_CONSTRUCTIBLE_VALUE
13 Q_PROPERTY(qreal topLeft READ topLeft WRITE setTopLeft FINAL)
14 Q_PROPERTY(qreal topRight READ topRight WRITE setTopRight FINAL)
15 Q_PROPERTY(qreal bottomLeft READ bottomLeft WRITE setBottomLeft FINAL)
16 Q_PROPERTY(qreal bottomRight READ bottomRight WRITE setBottomRight FINAL)
19 QML_MATERIAL_API Q_INVOKABLE CornersGroup() noexcept;
20 QML_MATERIAL_API ~CornersGroup();
22 Q_INVOKABLE CornersGroup(qreal) noexcept;
23 Q_INVOKABLE CornersGroup(qreal bottomRight, qreal topRight, qreal bottomLeft,
24 qreal topLeft) noexcept;
25 Q_INVOKABLE CornersGroup(QVector4D vec4) noexcept;
27 CornersGroup(const CornersGroup&) = default;
28 CornersGroup(CornersGroup&&) = default;
29 CornersGroup& operator=(const CornersGroup&) = default;
30 CornersGroup& operator=(CornersGroup&&) = default;
32 Q_INVOKABLE qreal radius() const noexcept;
33 void setRadius(qreal) noexcept;
35 qreal& operator[](
int index) noexcept;
36 qreal operator[](
int index) const noexcept;
38 CornersGroup operator+(const CornersGroup& other) const noexcept;
39 CornersGroup operator-(const CornersGroup& other) const noexcept;
40 CornersGroup operator*(qreal scalar) const noexcept;
41 CornersGroup operator/(qreal scalar) const noexcept;
43 CornersGroup& operator+=(const CornersGroup& other) noexcept;
44 CornersGroup& operator-=(const CornersGroup& other) noexcept;
45 CornersGroup& operator*=(qreal scalar) noexcept;
46 CornersGroup& operator/=(qreal scalar) noexcept;
48 qreal topLeft() const noexcept;
49 void setTopLeft(qreal newTopLeft) noexcept;
51 qreal topRight() const noexcept;
52 void setTopRight(qreal newTopRight) noexcept;
54 qreal bottomLeft() const noexcept;
55 void setBottomLeft(qreal newBottomLeft) noexcept;
57 qreal bottomRight() const noexcept;
58 void setBottomRight(qreal newBottomRight) noexcept;
60 Q_INVOKABLE QVector4D toVector4D() const noexcept;
61 Q_INVOKABLE
bool isUniform() const noexcept;
63 QML_MATERIAL_API operator QVector4D() const noexcept;
65 QML_MATERIAL_API static auto interpolated(const CornersGroup& from, const CornersGroup& to,
66 qreal progress) -> QVariant;