コード例 #1
0
ファイル: dialogcommand.cpp プロジェクト: KDE/simon
void DialogCommand::createStateLink(int thisState)
{
    setBoundState(thisState);
    if (m_changeDialogState)
        setTargetState(SimonCommand::GreedyState|m_nextDialogState);
    else
        setTargetState(thisState);
}
コード例 #2
0
 void SwingingBlade::updateImpl(const std::chrono::microseconds& deltaTime)
 {
     if( updateTriggerTimeout( deltaTime ) )
     {
         if( getCurrentState() == 0 )
             setTargetState( 2 );
     }
     else if( getCurrentState() == 2 )
     {
         setTargetState( 0 );
     }
 }
コード例 #3
0
/*!
    Constructor
    \param aOperation Menu event specific type.
    \param aSourceState Source state.
    \param aTargetState Target state.
*/
HsMenuEventTransition::HsMenuEventTransition(
    HsMenuEvent::OperationType aOperation, QState *aSourceState, QState *aTargetState) :
    QEventTransition(aSourceState),
    mOperation(aOperation)
{
    setTargetState(aTargetState);
}
コード例 #4
0
ReceivedMessageTransition::ReceivedMessageTransition(QObject* sender,
        QState* sourceState,
        QState* targetState,
        const MessageNumber& expectedMessageNumber)
    : QSignalTransition(sender, SIGNAL(dataReceived(const AddressedMessage&)), sourceState),
      expectedMessageNumber(expectedMessageNumber)
{
    setTargetState(targetState);
}
コード例 #5
0
ファイル: lifecycle.cpp プロジェクト: BGmot/Qt
 KeyPressTransition(GraphicsView *receiver, Qt::Key key)
     : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key)
 {
 }
 KeyPressTransition(GraphicsView *receiver, Qt::Key key, QAbstractState *target)
     : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key)
 {
     setTargetState(target);
 }
コード例 #6
0
bool
HibernationManager::setTargetLevel ( int level )
{
	HibernatorBase::SLEEP_STATE	state =
		m_hibernator->intToSleepState( level );
	if ( state == HibernatorBase::NONE ) {
		dprintf( D_ALWAYS, "Can't switch to invalid level %d\n", level );
		return false;
	}
	return setTargetState( state );
}
コード例 #7
0
bool
HibernationManager::setTargetState( const char *name )
{
	HibernatorBase::SLEEP_STATE	state =
		m_hibernator->stringToSleepState( name );
	if ( state == HibernatorBase::NONE ) {
		dprintf( D_ALWAYS, "Can't set invalid target state '%s'\n", name );
		return false;
	}
	return setTargetState( state );
}
コード例 #8
0
void QmlCppEngine::notifyInferiorIll()
{
    //This will eventually shutdown the engine
    //Set final state to avoid quitDebugger() being called
    //after this call
    setTargetState(DebuggerFinished);

    //Call notifyInferiorIll of cpp engine
    //as qml engine will follow state transitions
    //of cpp engine
    m_cppEngine->notifyInferiorIll();
}
コード例 #9
0
int QAbstractTransition::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 1)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 1;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QState**>(_v) = sourceState(); break;
        case 1: *reinterpret_cast< QAbstractState**>(_v) = targetState(); break;
        case 2: *reinterpret_cast< QList<QAbstractState*>*>(_v) = targetStates(); break;
        }
        _id -= 3;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: setTargetState(*reinterpret_cast< QAbstractState**>(_v)); break;
        case 2: setTargetStates(*reinterpret_cast< QList<QAbstractState*>*>(_v)); break;
        }
        _id -= 3;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 3;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 3;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 3;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 3;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 3;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 3;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
コード例 #10
0
MaximizeToFocusTransition::MaximizeToFocusTransition(CardWindowManager* wm, QState* target)
	: QSignalTransition(wm, SIGNAL(signalFocusWindow(CardWindow*)))
{
	setTargetState(target);
}