void EsPoolDisconnect::Update() { EsPoolYesNo::Update(); #ifdef POOL_ONLINE // Keep polling: updates our connect time on the server. // If opponent has re-connected, go back to the game. if (!ThePoolOnlineManager::Instance()->OpponentHasDisconnected()) { OnNo(); } #endif }
//-------------------------------------------------------------------------------------------- // //-------------------------------------------------------------------------------------------- tApVrfCalibrationWizard::tApVrfCalibrationWizard( tPilotController& pilotDevice, QWidget* pParent ) : tDialog( tDialog::Partial, pParent ) , m_CalibrationStep( eCS_Initial ) , m_pText( 0 ) , m_pYesAct( 0 ) , m_pNoAct( 0 ) , m_pCancelAct( 0 ) , m_pMovePortBtn( 0 ) , m_pNextAct( 0 ) , m_pCloseAct( 0 ) , m_pDummyAct( 0 ) , m_pDummy2Act( 0 ) , m_TurnState( eTS_Normal ) , m_PilotDevice( pilotDevice ) { setWindowTitle( tr( "Virtual Rudder Feedback Calibration" ) ); QGridLayout* pLayout = new QGridLayout; pLayout->setContentsMargins( 30, 0, 10, 0 ); pLayout->setSpacing( 5 ); m_pText = new QLabel( tr( "Use wheel to center the rudder." ) ); m_pText->setWordWrap(true); m_pText->setMinimumHeight( m_pText->fontMetrics().height() * 3 + 20 ); m_pMovePortBtn = new tPushButton(); m_pMovePortBtn->hide(); Connect( m_pMovePortBtn, SIGNAL( pressed() ), this, SLOT( OnLeftBtnPressed() ) ); Connect( m_pMovePortBtn, SIGNAL( released() ), this, SLOT( OnLeftBtnReleased() ) ); pLayout->addWidget( m_pText, 0, 0, 1, 3 ); pLayout->addWidget( m_pMovePortBtn, 0, 4, 1, 1 ); setLayout( pLayout ); m_pNextAct = new tAction( tr( "Next", "button" ), this ); Connect( m_pNextAct, SIGNAL( triggered() ), this, SLOT( OnNext() ) ); m_pCancelAct = new tAction( tr( "Cancel", "button" ), this ); Connect( m_pCancelAct, SIGNAL( triggered() ), this, SLOT( reject() ) ); m_pYesAct = new tAction( tr( "Yes", "button" ), this ); Connect( m_pYesAct, SIGNAL( triggered() ), this, SLOT( OnYes() ) ); m_pNoAct = new tAction( tr( "No", "button" ), this ); Connect( m_pNoAct, SIGNAL( triggered() ), this, SLOT( OnNo() ) ); m_pCloseAct = new tAction( tr( "Close", "button" ), this ); Connect( m_pCloseAct, SIGNAL( triggered() ), this, SLOT( accept() ) ); m_pDummyAct = new tAction( this ); m_pDummyAct->setSeparator( true ); m_pDummy2Act = new tAction( this ); m_pDummy2Act->setSeparator( true ); // add dummy to provide space for max of 3 softkeys m_ActionList << m_pDummyAct << m_pNextAct << m_pCancelAct; setSoftKeys( m_ActionList, true ); SoftKeyBar()->SetFocus( m_pNextAct ); // Connect to the pilot virtual device for rudder test mode changes Connect( m_PilotDevice.GetRudderTestInterface(), SIGNAL( RudderTestModeChanged(tDriveProxy::eRudderTestMode) ), this, SLOT( OnRudderTestModeChanged(tDriveProxy::eRudderTestMode) ) ); }