QQuickCanvas renames
[profile/ivi/qtdeclarative.git] / src / quick / items / qquickitem.h
index 16dee80..61bb325 100644 (file)
@@ -88,8 +88,7 @@ class QQuickTransition;
 class QQuickKeyEvent;
 class QQuickAnchors;
 class QQuickItemPrivate;
-class QQuickCanvas;
-class QSGEngine;
+class QQuickWindow;
 class QTouchEvent;
 class QSGNode;
 class QSGTransformNode;
@@ -143,6 +142,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus
     Q_PROPERTY(QQmlListProperty<QQuickTransform> transform READ transform DESIGNABLE false FINAL)
 
     Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
+    Q_PROPERTY(bool antialiasing READ antialiasing WRITE setAntialiasing NOTIFY antialiasingChanged)
     Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged)
     Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged)
 
@@ -166,7 +166,7 @@ public:
     enum ItemChange {
         ItemChildAddedChange,      // value.item
         ItemChildRemovedChange,    // value.item
-        ItemSceneChange,           // value.canvas
+        ItemSceneChange,           // value.window
         ItemVisibleHasChanged,     // value.boolValue
         ItemParentHasChanged,      // value.item
         ItemOpacityHasChanged,     // value.realValue
@@ -176,12 +176,12 @@ public:
 
     union ItemChangeData {
         ItemChangeData(QQuickItem *v) : item(v) {}
-        ItemChangeData(QQuickCanvas *v) : canvas(v) {}
+        ItemChangeData(QQuickWindow *v) : window(v) {}
         ItemChangeData(qreal v) : realValue(v) {}
         ItemChangeData(bool v) : boolValue(v) {}
 
         QQuickItem *item;
-        QQuickCanvas *canvas;
+        QQuickWindow *window;
         qreal realValue;
         bool boolValue;
     };
@@ -195,9 +195,9 @@ public:
     QQuickItem(QQuickItem *parent = 0);
     virtual ~QQuickItem();
 
-    QSGEngine *sceneGraphEngine() const;
-
-    QQuickCanvas *canvas() const;
+    //canvas() is being removed in favor of window() really soon now
+    QQuickWindow *canvas() const { return window(); }
+    QQuickWindow *window() const;
     QQuickItem *parentItem() const;
     void setParentItem(QQuickItem *parent);
     void stackBefore(const QQuickItem *);
@@ -261,6 +261,9 @@ public:
     bool smooth() const;
     void setSmooth(bool);
 
+    bool antialiasing() const;
+    void setAntialiasing(bool);
+
     Flags flags() const;
     void setFlag(Flag flag, bool enabled = true);
     void setFlags(Flags flags);
@@ -287,11 +290,13 @@ public:
     bool filtersChildMouseEvents() const;
     void setFiltersChildMouseEvents(bool filter);
 
-    void grabTouchPoints(const QList<int> &ids);
+    void grabTouchPoints(const QVector<int> &ids);
     void ungrabTouchPoints();
     bool keepTouchGrab() const;
     void setKeepTouchGrab(bool);
 
+    Q_INVOKABLE virtual bool contains(const QPointF &point) const;
+
     QTransform itemTransform(QQuickItem *, bool *) const;
     QPointF mapToItem(const QQuickItem *item, const QPointF &point) const;
     QPointF mapToScene(const QPointF &point) const;
@@ -314,7 +319,7 @@ public:
     struct UpdatePaintNodeData {
        QSGTransformNode *transformNode;
     private:
-       friend class QQuickCanvasPrivate;
+       friend class QQuickWindowPrivate;
        UpdatePaintNodeData();
     };
 
@@ -333,6 +338,7 @@ Q_SIGNALS:
     void parentChanged(QQuickItem *);
     void transformOriginChanged(TransformOrigin);
     void smoothChanged(bool);
+    void antialiasingChanged(bool);
     void clipChanged(bool);
 
     // XXX todo
@@ -385,10 +391,12 @@ protected:
     virtual void hoverEnterEvent(QHoverEvent *event);
     virtual void hoverMoveEvent(QHoverEvent *event);
     virtual void hoverLeaveEvent(QHoverEvent *event);
+#ifndef QT_NO_DRAGANDDROP
     virtual void dragEnterEvent(QDragEnterEvent *);
     virtual void dragMoveEvent(QDragMoveEvent *);
     virtual void dragLeaveEvent(QDragLeaveEvent *);
     virtual void dropEvent(QDropEvent *);
+#endif
     virtual bool childMouseEventFilter(QQuickItem *, QEvent *);
     virtual void windowDeactivateEvent();
 
@@ -403,8 +411,8 @@ protected:
     QQuickItem(QQuickItemPrivate &dd, QQuickItem *parent = 0);
 
 private:
-    friend class QQuickCanvas;
-    friend class QQuickCanvasPrivate;
+    friend class QQuickWindow;
+    friend class QQuickWindowPrivate;
     friend class QSGRenderer;
     friend class QAccessibleQuickItem;
     friend class QQuickAccessibleAttached;