/*
    Setup common to all button constructors
*/
void QEGenericButton::setup() {
    dataSetup();
//    commandSetup();
    guiSetup();

    // Use push button signals
    QObject::connect( getButtonQObject(), SIGNAL( pressed() ), getButtonQObject(), SLOT( userPressed() ) );
    QObject::connect( getButtonQObject(), SIGNAL( released() ), getButtonQObject(), SLOT( userReleased() ) );
    QObject::connect( getButtonQObject(), SIGNAL( clicked( bool ) ), getButtonQObject(), SLOT( userClicked( bool ) ) );
}
Exemplo n.º 2
0
// Run the function of the next state
void state() {

    switch (NEXT_STATE) {

    case STATE_NO_SD:
        STATE = STATE_NO_SD;
        noSD();
        break;

    case STATE_SD_SETUP:
        STATE = STATE_SD_SETUP;
        sdSetup();
        break;

    case STATE_STANDBY:
        STATE = STATE_STANDBY;
        standby();
        break;

    case STATE_DATA_SETUP:
        STATE = STATE_DATA_SETUP;
        dataSetup();
        break;

    case STATE_DATA_COLLECT:
        STATE = STATE_DATA_COLLECT;
        dataCollect_fixed();
        break;

    case STATE_DATA_CONCLUDE:
        STATE = STATE_DATA_CONCLUDE;
        dataConclude();
        break;

    case STATE_WARNING:
        STATE = STATE_WARNING;
        warning();
        break;

    case STATE_ERROR:
        STATE = STATE_ERROR;
        error();
        break;

    } // End of switch

} // End of state