bool ConditionalDialog::checkInputData() { if (m_dlg->m_firstValue_1->isEnabled() && !checkInputData(m_dlg->m_firstValue_1, m_dlg->m_secondValue_1)) return false; if (m_dlg->m_firstValue_2->isEnabled() && !checkInputData(m_dlg->m_firstValue_2, m_dlg->m_secondValue_2)) return false; if (m_dlg->m_firstValue_3->isEnabled() && !checkInputData(m_dlg->m_firstValue_3, m_dlg->m_secondValue_3)) return false; return true; }
void ConditionalDialog::slotOk() { kDebug() << "slotOk"; if (!checkInputData()) return; kDebug() << "Input data is valid"; QLinkedList<KCConditional> newList; KCConditional newCondition; if (getCondition(newCondition, m_dlg->m_condition_1, m_dlg->m_firstValue_1, m_dlg->m_secondValue_1, m_dlg->m_style_1)) newList.append(newCondition); if (getCondition(newCondition, m_dlg->m_condition_2, m_dlg->m_firstValue_2, m_dlg->m_secondValue_2, m_dlg->m_style_2)) newList.append(newCondition); if (getCondition(newCondition, m_dlg->m_condition_3, m_dlg->m_firstValue_3, m_dlg->m_secondValue_3, m_dlg->m_style_3)) newList.append(newCondition); kDebug() << "Setting conditional list"; KCConditionCommand* manipulator = new KCConditionCommand(); manipulator->setSheet(m_selection->activeSheet()); manipulator->setConditionList(newList); manipulator->add(*m_selection); manipulator->execute(m_selection->canvas()); accept(); }
void Taskmanager::printMenu(Day &day, Day &dDay) { IoHandler ioh; while (true) { try { printDay(day, dDay); string inputData = ioh.inputMenu("날짜 이동(년월일, (다음날)+, (전날)-), D-day 계산(+/- 날짜), 종료(Q) : "); if (inputData == "q" || inputData == "Q") { break; } int menu = checkInputData(inputData); switch (menu) { //하루이동 case ONE_DAY_MOVE: { oneDayMove(day, dDay, inputData); break; } //DDay지정 case SET_D_DAY: { setDDay(day, dDay); break; } //지정날짜이동 case SET_DAY: { setDay(day, dDay, inputData); break; } default: { ioh.putMsg("잘못된 기능 입력"); ioh.putNewLine(); break; } } } catch (string error) { ioh.putMsg(error); ioh.putNewLine(); } ioh.putNewLine(); } ioh.putNewLine(); }
Foam::janafThermo<EquationOfState>::janafThermo(Istream& is) : EquationOfState(is), Tlow_(readScalar(is)), Thigh_(readScalar(is)), Tcommon_(readScalar(is)) { checkInputData(); forAll(highCpCoeffs_, i) { is >> highCpCoeffs_[i]; }
void LogInDoctorDialog::on_pushButton_2_clicked() { //emitir señal de comprobación emit( checkInputData(ui->edtDocID->text(),ui->edtDocPassword->text()) ); }