void CInteractionAreaDialog::UpdateMouseAction(int actionId, UINT nControlID, CMouseAction *pMouseAction, CComboBox *pComboBoxWnd, CButton *pStartCheckBox, CButton *pStopCheckBox) { if (!(pComboBoxWnd && pStartCheckBox && pStopCheckBox)) { ASSERT(FALSE); return; } m_nActionTypeId[actionId] = pMouseAction->GetActionId(); if (pMouseAction->GetNextAction()) m_nNextActionTypeId[actionId] = pMouseAction->GetNextAction()->GetActionId(); else m_nNextActionTypeId[actionId] = INTERACTION_NO_ACTION; for (int i =0; i< pComboBoxWnd->GetCount(); i++) { if (pComboBoxWnd->GetItemData(i) == m_nActionTypeId[actionId]) { pComboBoxWnd->SetCurSel(i); break; } } if (m_nNextActionTypeId[actionId] == INTERACTION_START_REPLAY || m_nActionTypeId[actionId] == INTERACTION_JUMP_RANDOM_QUESTION) { pStartCheckBox->SetCheck(1); pStopCheckBox->SetCheck(0); } else if (m_nNextActionTypeId[actionId] == INTERACTION_STOP_REPLAY) { pStartCheckBox->SetCheck(0); pStopCheckBox->SetCheck(1); } else { pStartCheckBox->SetCheck(0); pStopCheckBox->SetCheck(0); } bool bDisableCheckBox = (m_nActionTypeId[actionId] == INTERACTION_NO_ACTION || m_nActionTypeId[actionId] == INTERACTION_START_REPLAY || m_nActionTypeId[actionId] == INTERACTION_STOP_REPLAY || m_nActionTypeId[actionId] == INTERACTION_EXIT_PROCESS || m_nActionTypeId[actionId] == INTERACTION_JUMP_RANDOM_QUESTION); pStartCheckBox->EnableWindow(bDisableCheckBox ? 0 : 1); pStopCheckBox->EnableWindow(bDisableCheckBox ? 0 : 1); SetActionText(pMouseAction, nControlID); m_nMarkOrPageId[actionId] = pMouseAction->GetPageMarkId(); }
void ATopLevelWindow::setWindowTitle(const QString& title_string) { QWidget::setWindowTitle(title_string); SetActionText(title_string); }