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

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

[17]

[18]

Definition at line 210 of file calculator.cpp.

References abortOperation(), calculate(), display, factorSoFar, pendingMultiplicativeOperator, and waitingForOperand.

Referenced by Calculator().

{
    Button *clickedButton = qobject_cast<Button *>(sender());
    QString clickedOperator = clickedButton->text();
    double operand = display->text().toDouble();

    if (!pendingMultiplicativeOperator.isEmpty()) {
        if (!calculate(operand, pendingMultiplicativeOperator)) {
            abortOperation();
          return;
        }
        display->setText(QString::number(factorSoFar));
    } else {
        factorSoFar = operand;
    }

    pendingMultiplicativeOperator = clickedOperator;
    waitingForOperand = true;
}

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