4#include "qml_material/export.hpp"
8class QML_MATERIAL_API CornersGroup {
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 bool operator==(
const CornersGroup&)
const =
default;
20 Q_INVOKABLE CornersGroup() noexcept;
23 Q_INVOKABLE CornersGroup(qreal) noexcept;
24 Q_INVOKABLE CornersGroup(qreal bottomRight, qreal topRight, qreal bottomLeft,
25 qreal topLeft) noexcept;
26 Q_INVOKABLE CornersGroup(QVector4D vec4) noexcept;
28 CornersGroup(const CornersGroup&) = default;
29 CornersGroup(CornersGroup&&) = default;
30 CornersGroup& operator=(const CornersGroup&) = default;
31 CornersGroup& operator=(CornersGroup&&) = default;
33 Q_INVOKABLE qreal radius() const noexcept;
34 void setRadius(qreal) noexcept;
36 qreal& operator[](
int index) noexcept;
37 qreal operator[](
int index) const noexcept;
39 CornersGroup operator+(const CornersGroup& other) const noexcept;
40 CornersGroup operator-(const CornersGroup& other) const noexcept;
41 CornersGroup operator*(qreal scalar) const noexcept;
42 CornersGroup operator/(qreal scalar) const noexcept;
44 CornersGroup& operator+=(const CornersGroup& other) noexcept;
45 CornersGroup& operator-=(const CornersGroup& other) noexcept;
46 CornersGroup& operator*=(qreal scalar) noexcept;
47 CornersGroup& operator/=(qreal scalar) noexcept;
49 qreal topLeft() const noexcept;
50 void setTopLeft(qreal newTopLeft) noexcept;
52 qreal topRight() const noexcept;
53 void setTopRight(qreal newTopRight) noexcept;
55 qreal bottomLeft() const noexcept;
56 void setBottomLeft(qreal newBottomLeft) noexcept;
58 qreal bottomRight() const noexcept;
59 void setBottomRight(qreal newBottomRight) noexcept;
61 Q_INVOKABLE QVector4D toVector4D() const noexcept;
62 Q_INVOKABLE
bool isUniform() const noexcept;
64 operator QVector4D() const noexcept;
66 static auto interpolated(const CornersGroup& from, const CornersGroup& to, qreal progress)