示例#1
0
service::service( ) {
    timer1 = new QTimer(this);
    timer1->setSingleShot(true);
    timer2 = new QTimer(this);
    timer2->setSingleShot(true);
    timer3 = new QTimer(this);
    timer3->setSingleShot(true);
    distimer = new QTimer(this);
    server = new socket;

    connected = false;

    QObject::connect( timer1, SIGNAL(timeout()), this, SLOT(JoinRaffle1()) );
    QObject::connect( timer2, SIGNAL(timeout()), this, SLOT(JoinRaffle2()) );
    QObject::connect( timer3, SIGNAL(timeout()), this, SLOT(JoinRaffle3()) );
    QObject::connect( distimer, SIGNAL(timeout()), this, SLOT(reconnect()) );
    QObject::connect( server, SIGNAL(NewData(QString)), this, SLOT(ParseString(QString)) );
    QObject::connect( server, SIGNAL(Disconnected()), this, SLOT(Disconnection()) );
    QObject::connect( server, SIGNAL(Connected()), this, SLOT(Connection()) );
}
示例#2
0
void HumanClientApp::DisconnectedFromServer() {
    DebugLogger() << "HumanClientApp::DisconnectedFromServer";
    m_fsm->process_event(Disconnection());
}