Logo Search packages:      
Sourcecode: kbruch version File versions  Download package

void ExerciseMixedNumbers::nextTask (  ) [private]

shows next task; hides previous solution

Definition at line 239 of file ExerciseMixedNumbers.cpp.

References createTask(), m_isMixedTask, m_task, ResultWidget::setResult(), and TaskWidget::setTask().

Referenced by forceNewTask(), and slotCheckButtonClicked().

{
    // create a new task
    //
    // alternate between converting ratio into mixed number and vice versa
    m_isMixedTask = ! m_isMixedTask;
    QApplication::setOverrideCursor (Qt::WaitCursor);   // show the sand clock
    createTask();
    QApplication::restoreOverrideCursor(); // show the normal cursor

    // update the task widget
    m_taskWidget->setQuestionMixed (m_isMixedTask);
    m_taskWidget->setTask ( (const task) m_task);

    // hide result widget
    m_resultWidget->setResult (ratio(), -1);

    // change check button
    m_checkButton->setToolTip (i18n ("Click this button to check your result. The button will not work if you have not entered a result yet."));
    m_checkButton->setText (i18n ("&Check"));

    // clear user input and restore input fields
    m_denoEdit->setText ("");
    m_numerEdit->setText ("");
    m_integerEdit->setText ("");
    m_numerEdit->setEnabled (true);
    m_denoEdit->setEnabled (true);
    m_skipButton->setEnabled (true);
    if (m_isMixedTask) {
        m_integerEdit->hide();
        m_integerEdit->setEnabled (false);
        m_numerEdit->setFocus();
    } else {
        m_integerEdit->setEnabled (true);
        m_integerEdit->show();
        m_integerEdit->setFocus();
    }

    return;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index