コード例 #1
0
ファイル: service.cpp プロジェクト: Edxo/botfiesta
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());
}