Exemplo n.º 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);
}
Exemplo n.º 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);
}
Exemplo n.º 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);
}