Logo Search packages:      
Sourcecode: qt-at-spi version File versions  Download package

void Calculator::digitClicked (  ) [private, slot]

[6]

[7]

Definition at line 125 of file calculator.cpp.

References display, and waitingForOperand.

Referenced by Calculator().

{
    Button *clickedButton = qobject_cast<Button *>(sender());
    int digitValue = clickedButton->text().toInt();
    if (display->text() == "0" && digitValue == 0.0)
        return;

    if (waitingForOperand) {
        display->clear();
      waitingForOperand = false;
    }
    display->setText(display->text() + QString::number(digitValue));
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index