From a70f8a2b0966420e1911554a117e066592b1822c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 30 Jul 2009 16:03:49 +1000 Subject: More QFxItem cleanup. --- src/declarative/fx/qfxitem.cpp | 40 ---------------------------------------- src/declarative/fx/qfxitem.h | 3 --- src/declarative/fx/qfxitem_p.h | 3 --- 3 files changed, 46 deletions(-) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 569af43..6df538e 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1592,18 +1592,6 @@ QmlList* QFxItem::transitions() */ /*! - Returns the state with \a name. Returns 0 if no matching state is found. -*/ -QmlState *QFxItem::findState(const QString &name) const -{ - Q_D(const QFxItem); - if (!d->_stateGroup) - return 0; - else - return d->_stateGroup->findState(name); -} - -/*! \qmlproperty string Item::state This property holds the name of the current state of the item. @@ -1809,14 +1797,7 @@ QVariant QFxItem::itemChange(GraphicsItemChange change, { Q_D(QFxItem); if (change == ItemSceneHasChanged) { - if (options() & QFxItem::MouseFilter) - d->gvRemoveMouseFilter(); - d->canvas = qvariant_cast(value); - - if (options() & QFxItem::MouseFilter) - d->gvAddMouseFilter(); - } else if (change == ItemChildAddedChange || change == ItemChildRemovedChange) { childrenChanged(); @@ -2082,13 +2063,6 @@ void QFxItem::setOptions(Options options, bool set) setFiltersChildEvents(d->options & ChildMouseFilter); setFlag(QGraphicsItem::ItemAutoDetectsFocusProxy, d->options & IsFocusRealm); - - if ((old & MouseFilter) != (d->options & MouseFilter)) { - if (d->options & MouseFilter) - d->gvAddMouseFilter(); - else - d->gvRemoveMouseFilter(); - } } void QFxItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) @@ -2096,18 +2070,4 @@ void QFxItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) paintContents(*p); } -void QFxItemPrivate::gvRemoveMouseFilter() -{ - Q_Q(QFxItem); - if (q->scene()) - q->removeSceneEventFilter(q); -} - -void QFxItemPrivate::gvAddMouseFilter() -{ - Q_Q(QFxItem); - if (q->scene()) - q->installSceneEventFilter(q); -} - QT_END_NAMESPACE diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h index ba3ab4f..c31b8bb 100644 --- a/src/declarative/fx/qfxitem.h +++ b/src/declarative/fx/qfxitem.h @@ -154,7 +154,6 @@ class Q_DECLARATIVE_EXPORT QFxItem : public QGraphicsObject, public QmlParserSta public: enum Option { NoOption = 0x00000000, - MouseFilter = 0x00000001, ChildMouseFilter = 0x00000002, IsFocusRealm = 0x00000080 }; Q_DECLARE_FLAGS(Options, Option) @@ -183,8 +182,6 @@ public: void setClip(bool); QmlList* states(); - QmlState *findState(const QString &name) const; - QmlList* transitions(); QString state() const; diff --git a/src/declarative/fx/qfxitem_p.h b/src/declarative/fx/qfxitem_p.h index a013897..181c91d 100644 --- a/src/declarative/fx/qfxitem_p.h +++ b/src/declarative/fx/qfxitem_p.h @@ -196,9 +196,6 @@ public: QPointF computeTransformOrigin() const; - void gvRemoveMouseFilter(); - void gvAddMouseFilter(); - virtual void setPosHelper(const QPointF &pos) { Q_Q(QFxItem); -- cgit v0.12