85 Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL) |
85 Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine verticalCenter READ verticalCenter CONSTANT FINAL) |
86 Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine baseline READ baseline CONSTANT FINAL) |
86 Q_PRIVATE_PROPERTY(QDeclarativeItem::d_func(), QDeclarativeAnchorLine baseline READ baseline CONSTANT FINAL) |
87 Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged) |
87 Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged) |
88 Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged) // ### move to QGI/QGO, NOTIFY |
88 Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged) // ### move to QGI/QGO, NOTIFY |
89 Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL) |
89 Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL) |
90 Q_PROPERTY(bool wantsFocus READ wantsFocus NOTIFY wantsFocusChanged) |
90 Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged) |
91 Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL) |
91 Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL) |
92 Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged) |
92 Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged) |
|
93 Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item |
93 Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) |
94 Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) |
94 Q_ENUMS(TransformOrigin) |
95 Q_ENUMS(TransformOrigin) |
95 Q_CLASSINFO("DefaultProperty", "data") |
96 Q_CLASSINFO("DefaultProperty", "data") |
96 |
97 |
97 public: |
98 public: |
136 void setSmooth(bool); |
137 void setSmooth(bool); |
137 |
138 |
138 QRectF boundingRect() const; |
139 QRectF boundingRect() const; |
139 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
140 virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
140 |
141 |
141 bool wantsFocus() const; |
142 bool hasActiveFocus() const; |
142 bool hasFocus() const; |
143 bool hasFocus() const; |
143 void setFocus(bool); |
144 void setFocus(bool); |
144 |
145 |
145 bool keepMouseGrab() const; |
146 bool keepMouseGrab() const; |
146 void setKeepMouseGrab(bool); |
147 void setKeepMouseGrab(bool); |
147 |
148 |
148 Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const; |
149 Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const; |
149 Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const; |
150 Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const; |
150 Q_INVOKABLE void forceFocus(); |
151 Q_INVOKABLE void forceActiveFocus(); |
|
152 Q_INVOKABLE QDeclarativeItem *childAt(qreal x, qreal y) const; |
151 |
153 |
152 Q_SIGNALS: |
154 Q_SIGNALS: |
153 void childrenChanged(); |
|
154 void childrenRectChanged(const QRectF &); |
155 void childrenRectChanged(const QRectF &); |
155 void baselineOffsetChanged(qreal); |
156 void baselineOffsetChanged(qreal); |
156 void stateChanged(const QString &); |
157 void stateChanged(const QString &); |
157 void focusChanged(bool); |
158 void focusChanged(bool); |
158 void wantsFocusChanged(bool); |
159 void activeFocusChanged(bool); |
159 void parentChanged(QDeclarativeItem *); |
160 void parentChanged(QDeclarativeItem *); |
160 void transformOriginChanged(TransformOrigin); |
161 void transformOriginChanged(TransformOrigin); |
161 void smoothChanged(bool); |
162 void smoothChanged(bool); |
162 void clipChanged(bool); |
163 void clipChanged(bool); |
163 |
164 |
207 if (!item) return 0; |
208 if (!item) return 0; |
208 QObject *o = item->toGraphicsObject(); |
209 QObject *o = item->toGraphicsObject(); |
209 return qobject_cast<T>(o); |
210 return qobject_cast<T>(o); |
210 } |
211 } |
211 |
212 |
|
213 #ifndef QT_NO_DEBUG_STREAM |
212 QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QDeclarativeItem *item); |
214 QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, QDeclarativeItem *item); |
|
215 #endif |
213 |
216 |
214 QT_END_NAMESPACE |
217 QT_END_NAMESPACE |
215 |
218 |
216 QML_DECLARE_TYPE(QDeclarativeItem) |
219 QML_DECLARE_TYPE(QDeclarativeItem) |
217 QML_DECLARE_TYPE(QGraphicsObject) |
220 QML_DECLARE_TYPE(QGraphicsObject) |