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

KalculView::KalculView ( QWidget *  parent  ) 

Default constructor

Definition at line 46 of file kalculview.cpp.

References clock, correct, intValidator, mode, paused, and total.

    : kalculview_base(parent)
{
    mode = Settings::operation();
    paused = false;
    total = 0;
    correct = 0;
    firstNum = 0;
    secondNum = 0;
    kProgress1->setFormat("%v");
    kProgress2->setFormat("%v");
    kProgress1->setTotalSteps(Settings::numOp());
    kProgress2->setTotalSteps(Settings::numOp());
    clock = new KClock(clockFrame);

    resultLabel->setText( i18n("Click on the Start button") );
    if (Settings::timerBool())
        clock->setTimeLeft(Settings::time() * 60);
    else
        clock->setTimeLeft(0);
    //TODO: make sure the upper limit is appropriate for the maximum possible value.
    //If you use multiply and limits of e.g. 50 and 50, it could be higher than 999
    intValidator = new QIntValidator(0, 999, this);
    answerLine->setValidator(intValidator);

    connect(startButton, SIGNAL(clicked()), this, SLOT(slotStart()));
    connect(answerLine, SIGNAL(returnPressed()), this, SLOT(slotCheck()));
    connect(pauseButton, SIGNAL(clicked()), this, SLOT(slotPause()));
    connect(clock, SIGNAL(signalTimeout()), this, SLOT(timerDone()));
}


Generated by  Doxygen 1.6.0   Back to index