31 Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged FINAL)
32 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
33 Q_PROPERTY(
bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged FINAL)
35 QML_ADDED_IN_VERSION(2, 0)
37 QQuickPen(QObject *parent=
nullptr);
40 void setWidth(qreal w);
43 void setColor(
const QColor &c);
45 bool pixelAligned()
const;
46 void setPixelAligned(
bool aligned);
53 void pixelAlignedChanged();
66 Q_PROPERTY(qreal position READ position WRITE setPosition)
67 Q_PROPERTY(QColor color READ color WRITE setColor)
68 QML_NAMED_ELEMENT(GradientStop)
69 QML_ADDED_IN_VERSION(2, 0)
72 QQuickGradientStop(QObject *parent=
nullptr);
74 qreal position()
const;
75 void setPosition(qreal position);
78 void setColor(
const QColor &color);
81 void updateGradient();
84 qreal m_position = 0.0;
92 Q_PROPERTY(QQmlListProperty<QQuickGradientStop> stops READ stops)
93 Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged REVISION(2, 12))
94 Q_CLASSINFO(
"DefaultProperty",
"stops")
95 QML_NAMED_ELEMENT(Gradient)
96 QML_ADDED_IN_VERSION(2, 0)
97 QML_EXTENDED_NAMESPACE(QGradient)
100 QQuickGradient(QObject *parent=
nullptr);
101 ~QQuickGradient() override;
103 enum Orientation { Vertical = Qt::Vertical,
104 Horizontal = Qt::Horizontal };
107 QQmlListProperty<QQuickGradientStop> stops();
109 Orientation orientation()
const {
return m_orientation; }
110 void setOrientation(Orientation orientation);
112 QGradientStops gradientStops()
const;
116 void orientationChanged();
122 QList<QQuickGradientStop *> m_stops;
123 Orientation m_orientation = Vertical;
124 friend class QQuickRectangle;
125 friend class QQuickGradientStop;
133 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
134 Q_PROPERTY(QJSValue gradient READ gradient WRITE setGradient RESET resetGradient)
135 Q_PROPERTY(QQuickPen * border READ border CONSTANT)
136 Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
137 Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY topLeftRadiusChanged RESET resetTopLeftRadius REVISION(6, 7) FINAL)
138 Q_PROPERTY(qreal topRightRadius READ topRightRadius WRITE setTopRightRadius NOTIFY topRightRadiusChanged RESET resetTopRightRadius REVISION(6, 7) FINAL)
139 Q_PROPERTY(qreal bottomLeftRadius READ bottomLeftRadius WRITE setBottomLeftRadius NOTIFY bottomLeftRadiusChanged RESET resetBottomLeftRadius REVISION(6, 7) FINAL)
140 Q_PROPERTY(qreal bottomRightRadius READ bottomRightRadius WRITE setBottomRightRadius NOTIFY bottomRightRadiusChanged RESET resetBottomRightRadius REVISION(6, 7) FINAL)
141 QML_NAMED_ELEMENT(Rectangle)
142 QML_ADDED_IN_VERSION(2, 0)
144 QQuickRectangle(QQuickItem *parent=
nullptr);
146 QColor color()
const;
147 void setColor(
const QColor &);
151 QJSValue gradient()
const;
152 void setGradient(
const QJSValue &gradient);
153 void resetGradient();
155 qreal radius()
const;
156 void setRadius(qreal radius);
158 qreal topLeftRadius()
const;
159 void setTopLeftRadius(qreal radius);
160 void resetTopLeftRadius();
161 qreal topRightRadius()
const;
162 void setTopRightRadius(qreal radius);
163 void resetTopRightRadius();
164 qreal bottomLeftRadius()
const;
165 void setBottomLeftRadius(qreal radius);
166 void resetBottomLeftRadius();
167 qreal bottomRightRadius()
const;
168 void setBottomRightRadius(qreal radius);
169 void resetBottomRightRadius();
173 void radiusChanged();
174 Q_REVISION(6, 7)
void topLeftRadiusChanged();
175 Q_REVISION(6, 7)
void topRightRadiusChanged();
176 Q_REVISION(6, 7)
void bottomLeftRadiusChanged();
177 Q_REVISION(6, 7)
void bottomRightRadiusChanged();
180 QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
186 Q_DISABLE_COPY(QQuickRectangle)
187 Q_DECLARE_PRIVATE(QQuickRectangle)