diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-09-28 11:13:47 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-28 11:21:50 (GMT) |
commit | 587c004ce82844980c679547f86109174cbe6202 (patch) | |
tree | 5614136a0a10622fb7a119772e545d4c26aa9af4 /src/corelib/statemachine/qsignaltransition.cpp | |
parent | 9021dd294b4d998192ed9b06ce86be6ed8ffddf2 (diff) | |
download | Qt-587c004ce82844980c679547f86109174cbe6202.zip Qt-587c004ce82844980c679547f86109174cbe6202.tar.gz Qt-587c004ce82844980c679547f86109174cbe6202.tar.bz2 |
Make QSignalEvent and QWrappedEvent inner classes of QStateMachine
Those two classes are specific to the state machine framework, but
their names were so generic that we felt they were polluting the
Q-namespace. They are now QStateMachine::SignalEvent and
QStateMachine::WrappedEvent.
Reviewed-by: Eskil Abrahamsen Blomfeldt
Diffstat (limited to 'src/corelib/statemachine/qsignaltransition.cpp')
-rw-r--r-- | src/corelib/statemachine/qsignaltransition.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp index 74655e6..9811725 100644 --- a/src/corelib/statemachine/qsignaltransition.cpp +++ b/src/corelib/statemachine/qsignaltransition.cpp @@ -44,7 +44,6 @@ #ifndef QT_NO_STATEMACHINE #include "qsignaltransition_p.h" -#include "qsignalevent.h" #include "qstate.h" #include "qstate_p.h" #include "qstatemachine.h" @@ -68,7 +67,7 @@ QT_BEGIN_NAMESPACE You can subclass QSignalTransition and reimplement eventTest() to make a signal transition conditional; the event object passed to eventTest() will - be a QSignalEvent object. Example: + be a QStateMachine::SignalEvent object. Example: \code class CheckedTransition : public QSignalTransition @@ -80,7 +79,7 @@ QT_BEGIN_NAMESPACE bool eventTest(QEvent *e) const { if (!QSignalTransition::eventTest(e)) return false; - QSignalEvent *se = static_cast<QSignalEvent*>(e); + QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e); return (se->arguments().at(0).toInt() == Qt::Checked); } }; @@ -212,9 +211,9 @@ void QSignalTransition::setSignal(const QByteArray &signal) /*! \reimp - The \a event is a QSignalEvent object. The default implementation returns - true if the event's sender and signal index match this transition, and - returns false otherwise. + The default implementation returns true if the \a event is a + QStateMachine::SignalEvent object and the event's sender and signal index + match this transition, and returns false otherwise. */ bool QSignalTransition::eventTest(QEvent *event) { @@ -222,7 +221,7 @@ bool QSignalTransition::eventTest(QEvent *event) if (event->type() == QEvent::Signal) { if (d->signalIndex == -1) return false; - QSignalEvent *se = static_cast<QSignalEvent*>(event); + QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(event); return (se->sender() == d->sender) && (se->signalIndex() == d->signalIndex); } @@ -250,7 +249,7 @@ void QSignalTransitionPrivate::callOnTransition(QEvent *e) Q_Q(QSignalTransition); if (e->type() == QEvent::Signal) { - QSignalEvent *se = static_cast<QSignalEvent *>(e); + QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent *>(e); int savedSignalIndex = se->m_signalIndex; se->m_signalIndex = originalSignalIndex; q->onTransition(e); |