diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-04-29 10:20:11 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-04-29 10:20:11 (GMT) |
commit | 6ca9c87235b057bc635576b0c414ca789afaf592 (patch) | |
tree | 3ba290fc3edabbb1372dba253cbe5d3526f80f14 /src/gui | |
parent | 35f353f16f696a7362d3e899c9a7e2066dc09c65 (diff) | |
download | Qt-6ca9c87235b057bc635576b0c414ca789afaf592.zip Qt-6ca9c87235b057bc635576b0c414ca789afaf592.tar.gz Qt-6ca9c87235b057bc635576b0c414ca789afaf592.tar.bz2 |
rename QBoundEvent to QWrappedEvent and make it public
Result of API review.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/statemachine/qkeyeventtransition.cpp | 18 | ||||
-rw-r--r-- | src/gui/statemachine/qkeyeventtransition.h | 1 | ||||
-rw-r--r-- | src/gui/statemachine/qmouseeventtransition.cpp | 18 |
3 files changed, 14 insertions, 23 deletions
diff --git a/src/gui/statemachine/qkeyeventtransition.cpp b/src/gui/statemachine/qkeyeventtransition.cpp index 7c1ae8a..37f4dd9 100644 --- a/src/gui/statemachine/qkeyeventtransition.cpp +++ b/src/gui/statemachine/qkeyeventtransition.cpp @@ -11,6 +11,7 @@ #include "qkeyeventtransition.h" #include "qbasickeyeventtransition_p.h" +#include <QtCore/qwrappedevent.h> #if defined(QT_EXPERIMENTAL_SOLUTION) # include "qeventtransition_p.h" @@ -139,19 +140,14 @@ void QKeyEventTransition::setModifiersMask(Qt::KeyboardModifiers modifiersMask) /*! \reimp */ -bool QKeyEventTransition::testEventCondition(QEvent *event) const -{ - Q_D(const QKeyEventTransition); - d->transition->setEventType(event->type()); - return QAbstractTransitionPrivate::get(d->transition)->callEventTest(event); -} - -/*! - \reimp -*/ bool QKeyEventTransition::eventTest(QEvent *event) const { - return QEventTransition::eventTest(event); + Q_D(const QKeyEventTransition); + if (!QEventTransition::eventTest(event)) + return false; + QWrappedEvent *we = static_cast<QWrappedEvent*>(event); + d->transition->setEventType(we->event()->type()); + return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event()); } /*! diff --git a/src/gui/statemachine/qkeyeventtransition.h b/src/gui/statemachine/qkeyeventtransition.h index ef814db..fa95c1b 100644 --- a/src/gui/statemachine/qkeyeventtransition.h +++ b/src/gui/statemachine/qkeyeventtransition.h @@ -47,7 +47,6 @@ public: protected: void onTransition(); bool eventTest(QEvent *event) const; - bool testEventCondition(QEvent *event) const; private: Q_DISABLE_COPY(QKeyEventTransition) diff --git a/src/gui/statemachine/qmouseeventtransition.cpp b/src/gui/statemachine/qmouseeventtransition.cpp index d6d9b62..353b833 100644 --- a/src/gui/statemachine/qmouseeventtransition.cpp +++ b/src/gui/statemachine/qmouseeventtransition.cpp @@ -11,6 +11,7 @@ #include "qmouseeventtransition.h" #include "qbasicmouseeventtransition_p.h" +#include <QtCore/qwrappedevent.h> #include <QtGui/qpainterpath.h> #if defined(QT_EXPERIMENTAL_SOLUTION) @@ -169,19 +170,14 @@ void QMouseEventTransition::setPath(const QPainterPath &path) /*! \reimp */ -bool QMouseEventTransition::testEventCondition(QEvent *event) const -{ - Q_D(const QMouseEventTransition); - d->transition->setEventType(event->type()); - return QAbstractTransitionPrivate::get(d->transition)->callEventTest(event); -} - -/*! - \reimp -*/ bool QMouseEventTransition::eventTest(QEvent *event) const { - return QEventTransition::eventTest(event); + Q_D(const QMouseEventTransition); + if (!QEventTransition::eventTest(event)) + return false; + QWrappedEvent *we = static_cast<QWrappedEvent*>(event); + d->transition->setEventType(we->event()->type()); + return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event()); } /*! |