void BftpMaker::add() { Question q; q.setText(tr("empty")); q.addAnswer(Answer(tr("empty"), false)); q.addAnswer(Answer(tr("empty"), false)); q.addAnswer(Answer(tr("empty"), false)); _test.insertQuestion(++_currentQ, q); setQuestion(_currentQ); }
void BftpMaker::prev() { _test.removeQuestion(_currentQ); Question q; q.setText(textEdit->text()); for (int i = 0; i < ansList.size(); i++) { q.addAnswer(ansList[i]->answer()); } _test.insertQuestion(_currentQ, q); if (_currentQ != 0) setQuestion(--_currentQ); }
void BftpMaker::next() { _test.removeQuestion(_currentQ); Question q; q.setText(textEdit->text()); for (int i = 0; i < ansList.size(); i++) { q.addAnswer(ansList[i]->answer()); } _test.insertQuestion(_currentQ, q); if (_currentQ < _test.questions().size() - 1) setQuestion(++_currentQ); }