Пример #1
0
void Calculator::changeOperation(QString newOperation)
{
    if (operation != newOperation)
    {
        operation = newOperation;
        emit operationChanged(operation);
    }
}
Пример #2
0
void EnginioModel::setOperation(Enginio::Operation operation)
{
    Q_D(EnginioModel);
    if (operation == d->operation())
        return;
    d->setOperation(operation);
    emit operationChanged(operation);
}
Пример #3
0
Calculator::Calculator(QObject *parent) :
    QObject(parent), firstOperand(0), secondOperand(0), operation(""), result(0), resultToShow("")
{
    QObject::connect(this, SIGNAL(firstOperandChanged(int)),
                     this, SLOT(getResult()));
    QObject::connect(this, SIGNAL(secondOperandChanged(int)),
                     this, SLOT(getResult()));
    QObject::connect(this, SIGNAL(operationChanged(QString)),
                     this, SLOT(getResult()));
}
void ServiceOperationStatus::setOperation(const QString &operation)
{
    if (m_operation == operation) {
        return;
    }

    m_operation = operation;
    updateStatus();
    emit operationChanged();
}
Пример #5
0
void EnginioModel::setOperation(QtCloudServices::Operation operation)
{
    QTC_D(EnginioModel);

    if (operation == d->operation()) {
        return;
    }

    d->setOperation(operation);
    emit operationChanged(operation);
}