Пример #1
0
CRSPCWaitRemoveAckState::CRSPCWaitRemoveAckState(CRSPlayerConnection *ownerConnection):
m_ownerConnection(ownerConnection)
{
	setStateName("WaitRemoveAcc State");
	// notice addrTypeMask -- signal only available for internal calls
	registerSlot(ireon::net::rspcCodes::scCharRemAck, (CGenericSlot) &CRSPCWaitRemoveAckState::onRemoveAck, netAddress::atInternalAddress);
}
Пример #2
0
CRSPCHelloState::CRSPCHelloState(CRSPlayerConnection *ownerConnection):
m_ownerConnection(ownerConnection)
{
	setStateName("Hello State");
	registerSlot(ireon::net::rspcCodes::scHelloLogin, (CGenericSlot) &CRSPCHelloState::onLoginRequest);
	registerSlot(ireon::net::rspcCodes::scHelloRegister, (CGenericSlot) &CRSPCHelloState::onRegisterRequest);
}
Пример #3
0
CPCWSMainState::CPCWSMainState(CNetConnection *ownerConnection):
CGenericState(ownerConnection)
{
	setStateName("PC <=> WS Main State");

	//registerSlot(ireon::net_pcInitiateLogin, static_cast<CGenericSlot> (&CPCWSHelloState::onInitiateLoginSignal), ireon::net::netAddress::atInternalAddress);
	//registerSlot(ireon::net::pcrsLoginResponse, static_cast<CGenericSlot> (&CPCWSHelloState::onLoginResponse), ireon::net::netAddress::atExternalAddress);

	//setSignalsProcessingMode(CGenericState::denyWithExceptions);
	//addProcessingException(ireon::net_pcInitiateLogin);
}
Пример #4
0
CPCRCHelloState::CPCRCHelloState(CPCRSConnection *ownerConnection):
    m_ownerConnection(ownerConnection)
{
    setStateName("Hello State");
    registerSlot(ireon::net::pcrsCodes::scSendVersionInfo, (CGenericSlot) &CPCRCHelloState::onSendVersionSignal, ireon::net::netAddress::atInternalAddress);
    registerSlot(ireon::net::pcrsCodes::scCheckVersionOk, (CGenericSlot) &CPCRCHelloState::onCheckVersionOk);
    registerSlot(ireon::net::pcrsCodes::scCheckVersionOld, (CGenericSlot) &CPCRCHelloState::onCheckVersionOld);

    registerSlot(ireon::net::pcrsCodes::scSendRegistrationRequest, (CGenericSlot) &CPCRCHelloState::onRegisterSignal, ireon::net::netAddress::atInternalAddress);
    registerSlot(ireon::net::pcrsCodes::scSendLoginRequest, (CGenericSlot) &CPCRCHelloState::onLoginSignal, ireon::net::netAddress::atInternalAddress);
}
Пример #5
0
CCMRCMainState::CCMRCMainState(CCMRSConnection *ownerConnection):
m_ownerConnection(ownerConnection)
{
	setStateName("Hello State");
/*
	/// register external signals
	registerSlot(ireon::net::cmwcCodes::scMainGetAccount, (CGenericSlot) &CCMWCMainState::onGetAccount);
	registerSlot(ireon::net::cmwcCodes::scMainSendPlayerChar, (CGenericSlot) &CCMWCMainState::onSendPlayerChar);
	registerSlot(ireon::net::cmwcCodes::scMainNewChar, (CGenericSlot) &CCMWCMainState::onNewChar);
	registerSlot(ireon::net::cmwcCodes::scMainRemoveChar, (CGenericSlot) &CCMWCMainState::onRemoveChar);
	/// register internal signals, etc network command
	registerSlot(ireon::net::cmwcCodes::iscMainSendNewChar, (CGenericSlot) &CCMWCMainState::sendNewChar, ireon::net::netAddress::atInternalAddress );
	registerSlot(ireon::net::cmwcCodes::iscMainRemoveChar, (CGenericSlot) &CCMWCMainState::removeChar, ireon::net::netAddress::atInternalAddress);
	registerSlot(ireon::net::cmwcCodes::iscMainSendAccount, (CGenericSlot) &CCMWCMainState::sendAccount, ireon::net::netAddress::atInternalAddress);
*/
}
Пример #6
0
CRSCCHelloState::CRSCCHelloState(CRSCMConnection *ownerConnection):
m_ownerConnection(ownerConnection)
{
	setStateName("CM Connection Hello State");
	registerSlot(ireon::net::rsccCodes::scHelloLogin, (CGenericSlot) &CRSCCHelloState::onLoginRequest);
}
Пример #7
0
	CTestClientState (CNetConnection *ownerConnection):
	  CGenericState(ownerConnection)
	{
		setStateName("Client Test State");
		registerSlot(testConversation1, static_cast<CGenericSlot> (&CTestClientState::onTest1));
	}
Пример #8
0
/**
 * @brief SCGraphicsView::connectState
 * @param state
 * @param stateGraphic
 *
 * sets the connections for the SCState and its graphic whenever a new state is created
 *
 */
void SCGraphicsView::connectState(SCState* state, StateBoxGraphic* stateGraphic)
{
//    qDebug() << "SCGraphicsView::connectState";
    connect(state, SIGNAL(markedForDeletion(QObject*)), this, SLOT(handleStateDeleted(QObject*)));
    connect(stateGraphic, SIGNAL(destroyed(QObject*)), this, SLOT(handleStateGraphicDeleted(QObject*)));

    connect(state, SIGNAL(changedParent(SCState*,SCState*)), this, SLOT(handleChangedParent(SCState*, SCState*)));
    connect(state, SIGNAL(bringToFront(SCState*)), this, SLOT(handleBringToFront(SCState*)));
    connect(state, SIGNAL(sendToBack(SCState*)), this, SLOT(handleSendToBack(SCState*)));

    // when the graphic is clicked also emit clicked for the state
    connect(stateGraphic, SIGNAL(clicked(SCState*)), state, SIGNAL(clicked(SCState*)));

    // when the graphic is minimized, also emit minimized/unminimized for the state
    connect(stateGraphic, SIGNAL(minimized(SCState*)), state, SIGNAL(minimized(SCState*)));
    connect(stateGraphic, SIGNAL(expanded(SCState*)), state, SIGNAL(expanded(SCState*)));


    // set up data model changes to update the state box graphic
    StateName* name = state->getStateNameAttr();
    connect(name, SIGNAL(changed(StateName*)), stateGraphic, SLOT(handleAttributeChanged(StateName*)));

    SizeAttribute* size = state->getSizeAttr();
    connect(size, SIGNAL(changed(SizeAttribute*)), stateGraphic, SLOT(handleAttributeChanged(SizeAttribute*)));

    PositionAttribute* pos = state->getPosAttr();
    connect(pos, SIGNAL(changed(PositionAttribute*)), stateGraphic, SLOT(handleAttributeChanged(PositionAttribute*)));

    StateString* ips = state->getStringAttr("parallelState");
    connect(ips, SIGNAL(changed(StateString*)), stateGraphic, SLOT(handleIsParallelStateChanged(StateString*)));

    StateString* initialState = state->getStringAttr("initialState");
    connect(initialState, SIGNAL(changed(StateString*)), stateGraphic, SLOT(handleInitialStateChanged(StateString*)));

    StateString* subautomatHistory = state->getStringAttr("subautomatHistory");
    connect(subautomatHistory, SIGNAL(changed(StateString*)), stateGraphic, SLOT(handleSubautomatHistoryChanged(StateString*)));

    StateString* ena = state->getStringAttr("entryAction");
    connect(ena ,SIGNAL(changed(StateString*)), stateGraphic, SLOT(handleEntryActionChanged(StateString*)));

    StateString* exa = state->getStringAttr("exitAction");
    connect(exa , SIGNAL(changed(StateString*)), stateGraphic, SLOT(handleExitActionChanged(StateString*)));

    //connect(state, SIGNAL(positionChangedInFormView(SCState*,QPointF)), this, SLOT(handleStatePositionChangedInFormView(SCState*, QPointF)));
    //connect(state, SIGNAL(sizeChangedInFormView(SCState*,QPointF)), this, SLOT(handleStateSizeChangedInFormView(SCState*,QPointF)));



    // set up state box graphic changes to update the data model
    // handle when a state is double clicked
    connect(stateGraphic, SIGNAL(resizeState(StateBoxGraphic*)), this, SLOT(handleAutoResize(StateBoxGraphic*)));

    // handle a state name change from the graphics view
    connect(stateGraphic, SIGNAL(nameChanged(QString)), state, SLOT(setStateName(QString)));

    // handle a state entry action change
    connect(stateGraphic, SIGNAL(entryActionChanged(QString)), state, SLOT(handleEntryActionChanged(QString)));

    // handle state exit action change to update the data model
    connect(stateGraphic, SIGNAL(exitActionChanged(QString)), state, SLOT(handleExitActionChanged(QString)));



    // font connects
    connect(state->getIDTextBlock()->getFontFamilyAttr(), SIGNAL(changed(FontFamilyAttribute*)), stateGraphic->getStateTitle(), SLOT(handleFontChanged(FontFamilyAttribute*)));

    connect(state->getIDTextBlock()->getFontSizeAttr(), SIGNAL(changed(FontSizeAttribute*)), stateGraphic->getStateTitle(), SLOT(handleFontChanged(FontSizeAttribute*)));

    connect(state->getIDTextBlock()->getFontBoldAttr(), SIGNAL(changed(FontBoldAttribute*)), stateGraphic->getStateTitle(), SLOT(handleFontChanged(FontBoldAttribute*)));
}