66 class Q_AUTOTEST_EXPORT QDeclarativePathAttribute : public QDeclarativePathElement |
66 class Q_AUTOTEST_EXPORT QDeclarativePathAttribute : public QDeclarativePathElement |
67 { |
67 { |
68 Q_OBJECT |
68 Q_OBJECT |
69 |
69 |
70 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) |
70 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) |
71 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed) |
71 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged) |
72 public: |
72 public: |
73 QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {} |
73 QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {} |
74 |
74 |
75 |
75 |
76 QString name() const; |
76 QString name() const; |
79 qreal value() const; |
79 qreal value() const; |
80 void setValue(qreal value); |
80 void setValue(qreal value); |
81 |
81 |
82 Q_SIGNALS: |
82 Q_SIGNALS: |
83 void nameChanged(); |
83 void nameChanged(); |
|
84 void valueChanged(); |
84 |
85 |
85 private: |
86 private: |
86 QString _name; |
87 QString _name; |
87 qreal _value; |
88 qreal _value; |
88 }; |
89 }; |
89 |
90 |
90 class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement |
91 class Q_AUTOTEST_EXPORT QDeclarativeCurve : public QDeclarativePathElement |
91 { |
92 { |
92 Q_OBJECT |
93 Q_OBJECT |
93 |
94 |
94 Q_PROPERTY(qreal x READ x WRITE setX NOTIFY changed) |
95 Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged) |
95 Q_PROPERTY(qreal y READ y WRITE setY NOTIFY changed) |
96 Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged) |
96 public: |
97 public: |
97 QDeclarativeCurve(QObject *parent=0) : QDeclarativePathElement(parent), _x(0), _y(0) {} |
98 QDeclarativeCurve(QObject *parent=0) : QDeclarativePathElement(parent), _x(0), _y(0) {} |
98 |
99 |
99 qreal x() const; |
100 qreal x() const; |
100 void setX(qreal x); |
101 void setX(qreal x); |
120 |
125 |
121 class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve |
126 class Q_AUTOTEST_EXPORT QDeclarativePathQuad : public QDeclarativeCurve |
122 { |
127 { |
123 Q_OBJECT |
128 Q_OBJECT |
124 |
129 |
125 Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY changed) |
130 Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY controlXChanged) |
126 Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY changed) |
131 Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY controlYChanged) |
127 public: |
132 public: |
128 QDeclarativePathQuad(QObject *parent=0) : QDeclarativeCurve(parent), _controlX(0), _controlY(0) {} |
133 QDeclarativePathQuad(QObject *parent=0) : QDeclarativeCurve(parent), _controlX(0), _controlY(0) {} |
129 |
134 |
130 qreal controlX() const; |
135 qreal controlX() const; |
131 void setControlX(qreal x); |
136 void setControlX(qreal x); |
133 qreal controlY() const; |
138 qreal controlY() const; |
134 void setControlY(qreal y); |
139 void setControlY(qreal y); |
135 |
140 |
136 void addToPath(QPainterPath &path); |
141 void addToPath(QPainterPath &path); |
137 |
142 |
|
143 Q_SIGNALS: |
|
144 void controlXChanged(); |
|
145 void controlYChanged(); |
|
146 |
138 private: |
147 private: |
139 qreal _controlX; |
148 qreal _controlX; |
140 qreal _controlY; |
149 qreal _controlY; |
141 }; |
150 }; |
142 |
151 |
143 class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve |
152 class Q_AUTOTEST_EXPORT QDeclarativePathCubic : public QDeclarativeCurve |
144 { |
153 { |
145 Q_OBJECT |
154 Q_OBJECT |
146 |
155 |
147 Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY changed) |
156 Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY control1XChanged) |
148 Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY changed) |
157 Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY control1YChanged) |
149 Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY changed) |
158 Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY control2XChanged) |
150 Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY changed) |
159 Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY control2YChanged) |
151 public: |
160 public: |
152 QDeclarativePathCubic(QObject *parent=0) : QDeclarativeCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {} |
161 QDeclarativePathCubic(QObject *parent=0) : QDeclarativeCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {} |
153 |
162 |
154 qreal control1X() const; |
163 qreal control1X() const; |
155 void setControl1X(qreal x); |
164 void setControl1X(qreal x); |
163 qreal control2Y() const; |
172 qreal control2Y() const; |
164 void setControl2Y(qreal y); |
173 void setControl2Y(qreal y); |
165 |
174 |
166 void addToPath(QPainterPath &path); |
175 void addToPath(QPainterPath &path); |
167 |
176 |
168 private: |
177 Q_SIGNALS: |
169 int _control1X; |
178 void control1XChanged(); |
170 int _control1Y; |
179 void control1YChanged(); |
171 int _control2X; |
180 void control2XChanged(); |
172 int _control2Y; |
181 void control2YChanged(); |
|
182 |
|
183 private: |
|
184 qreal _control1X; |
|
185 qreal _control1Y; |
|
186 qreal _control2X; |
|
187 qreal _control2Y; |
173 }; |
188 }; |
174 |
189 |
175 class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement |
190 class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement |
176 { |
191 { |
177 Q_OBJECT |
192 Q_OBJECT |
178 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed) |
193 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged) |
179 public: |
194 public: |
180 QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {} |
195 QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {} |
181 |
196 |
182 qreal value() const; |
197 qreal value() const; |
183 void setValue(qreal value); |
198 void setValue(qreal value); |
|
199 |
|
200 signals: |
|
201 void valueChanged(); |
184 |
202 |
185 private: |
203 private: |
186 qreal _value; |
204 qreal _value; |
187 }; |
205 }; |
188 |
206 |