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/qstatemachine.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/qstatemachine.cpp')
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 7876d43..503eec0 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -50,7 +50,6 @@ #include "qabstracttransition_p.h" #include "qsignaltransition.h" #include "qsignaltransition_p.h" -#include "qsignalevent.h" #include "qsignaleventgenerator_p.h" #include "qabstractstate.h" #include "qabstractstate_p.h" @@ -63,7 +62,6 @@ #ifndef QT_NO_STATEMACHINE_EVENTFILTER #include "qeventtransition.h" #include "qeventtransition_p.h" -#include "qwrappedevent.h" #endif #ifndef QT_NO_ANIMATION @@ -1534,7 +1532,7 @@ void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalInd qDebug() << q_func() << ": sending signal event ( sender =" << sender << ", signal =" << sender->metaObject()->method(signalIndex).signature() << ')'; #endif - internalEventQueue.append(new QSignalEvent(sender, signalIndex, vargs)); + internalEventQueue.append(new QStateMachine::SignalEvent(sender, signalIndex, vargs)); scheduleProcess(); } @@ -1880,7 +1878,7 @@ bool QStateMachine::eventFilter(QObject *watched, QEvent *event) Q_D(QStateMachine); Q_ASSERT(d->qobjectEvents.contains(watched)); if (d->qobjectEvents[watched].contains(event->type())) - postEvent(new QWrappedEvent(watched, d->handler->cloneEvent(event))); + postEvent(new QStateMachine::WrappedEvent(watched, d->handler->cloneEvent(event))); return false; } #endif @@ -2076,16 +2074,16 @@ QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent) } /*! - \class QSignalEvent + \class QStateMachine::SignalEvent - \brief The QSignalEvent class represents a Qt signal event. + \brief The SignalEvent class represents a Qt signal event. \since 4.6 \ingroup statemachine A signal event is generated by a QStateMachine in response to a Qt signal. The QSignalTransition class provides a transition associated with a - signal event. QSignalEvent is part of \l{The State Machine Framework}. + signal event. QStateMachine::SignalEvent is part of \l{The State Machine Framework}. The sender() function returns the object that generated the signal. The signalIndex() function returns the index of the signal. The arguments() @@ -2097,25 +2095,25 @@ QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent) /*! \internal - Constructs a new QSignalEvent object with the given \a sender, \a + Constructs a new SignalEvent object with the given \a sender, \a signalIndex and \a arguments. */ -QSignalEvent::QSignalEvent(QObject *sender, int signalIndex, - const QList<QVariant> &arguments) +QStateMachine::SignalEvent::SignalEvent(QObject *sender, int signalIndex, + const QList<QVariant> &arguments) : QEvent(QEvent::Signal), m_sender(sender), m_signalIndex(signalIndex), m_arguments(arguments) { } /*! - Destroys this QSignalEvent. + Destroys this SignalEvent. */ -QSignalEvent::~QSignalEvent() +QStateMachine::SignalEvent::~SignalEvent() { } /*! - \fn QSignalEvent::sender() const + \fn QStateMachine::SignalEvent::sender() const Returns the object that emitted the signal. @@ -2123,7 +2121,7 @@ QSignalEvent::~QSignalEvent() */ /*! - \fn QSignalEvent::signalIndex() const + \fn QStateMachine::SignalEvent::signalIndex() const Returns the index of the signal. @@ -2131,23 +2129,24 @@ QSignalEvent::~QSignalEvent() */ /*! - \fn QSignalEvent::arguments() const + \fn QStateMachine::SignalEvent::arguments() const Returns the arguments of the signal. */ /*! - \class QWrappedEvent + \class QStateMachine::WrappedEvent - \brief The QWrappedEvent class holds a clone of an event associated with a QObject. + \brief The WrappedEvent class holds a clone of an event associated with a QObject. \since 4.6 \ingroup statemachine A wrapped event is generated by a QStateMachine in response to a Qt event. The QEventTransition class provides a transition associated with a - such an event. QWrappedEvent is part of \l{The State Machine Framework}. + such an event. QStateMachine::WrappedEvent is part of \l{The State Machine + Framework}. The object() function returns the object that generated the event. The event() function returns a clone of the original event. @@ -2158,32 +2157,32 @@ QSignalEvent::~QSignalEvent() /*! \internal - Constructs a new QWrappedEvent object with the given \a object + Constructs a new WrappedEvent object with the given \a object and \a event. - The QWrappedEvent object takes ownership of \a event. + The WrappedEvent object takes ownership of \a event. */ -QWrappedEvent::QWrappedEvent(QObject *object, QEvent *event) +QStateMachine::WrappedEvent::WrappedEvent(QObject *object, QEvent *event) : QEvent(QEvent::Wrapped), m_object(object), m_event(event) { } /*! - Destroys this QWrappedEvent. + Destroys this WrappedEvent. */ -QWrappedEvent::~QWrappedEvent() +QStateMachine::WrappedEvent::~WrappedEvent() { delete m_event; } /*! - \fn QWrappedEvent::object() const + \fn QStateMachine::WrappedEvent::object() const Returns the object that the event is associated with. */ /*! - \fn QWrappedEvent::event() const + \fn QStateMachine::WrappedEvent::event() const Returns a clone of the original event. */ |