示例#1
0
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);
}
示例#2
0
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);
}
示例#3
0
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);
}