aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrectangle_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2012-07-03 15:04:19 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-03 07:27:22 +0200
commitf39c22ecec295d44eb1604e0a5dd5400093f0322 (patch)
tree836c1f2d9abe90bf6214e19301dd518a65201f8b /src/quick/items/qquickrectangle_p.h
parente1b3ad7c831023c3e336414a16b69773adea4e26 (diff)
Allow resetting a Rectangle gradient.
If a gradient and a color are set on a rectangle, the gradient is used. This means that if you wish to override the gradient on a component with a color, you have to unset the gradient. Also remove the unused QQuickGradient::gradient() method. Task-number: QTBUG-23238 Change-Id: Ibd43cfe1bd4b867e4f6103f1d0dc0ed6176ab5c1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/items/qquickrectangle_p.h')
-rw-r--r--src/quick/items/qquickrectangle_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/quick/items/qquickrectangle_p.h b/src/quick/items/qquickrectangle_p.h
index f077e7fbe2..0ac2ea6aaa 100644
--- a/src/quick/items/qquickrectangle_p.h
+++ b/src/quick/items/qquickrectangle_p.h
@@ -120,8 +120,6 @@ public:
QQmlListProperty<QQuickGradientStop> stops();
- const QGradient *gradient() const;
-
Q_SIGNALS:
void updated();
@@ -130,7 +128,6 @@ private:
private:
QList<QQuickGradientStop *> m_stops;
- mutable QGradient *m_gradient;
friend class QQuickRectangle;
friend class QQuickGradientStop;
};
@@ -141,7 +138,7 @@ class Q_AUTOTEST_EXPORT QQuickRectangle : public QQuickItem
Q_OBJECT
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
- Q_PROPERTY(QQuickGradient *gradient READ gradient WRITE setGradient)
+ Q_PROPERTY(QQuickGradient *gradient READ gradient WRITE setGradient RESET resetGradient)
Q_PROPERTY(QQuickPen * border READ border CONSTANT)
Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged)
public:
@@ -154,6 +151,7 @@ public:
QQuickGradient *gradient() const;
void setGradient(QQuickGradient *gradient);
+ void resetGradient();
qreal radius() const;
void setRadius(qreal radius);