You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
722 B
38 lines
722 B
/* |
|
SPDX-FileCopyrightText: 2010 Matteo Agostinelli <agostinelli@gmail.com> |
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <QAtomicInt> |
|
#include <QObject> |
|
|
|
class KJob; |
|
|
|
class QalculateEngine : public QObject |
|
{ |
|
Q_OBJECT |
|
public: |
|
explicit QalculateEngine(QObject *parent = nullptr); |
|
~QalculateEngine() override; |
|
|
|
QString lastResult() const |
|
{ |
|
return m_lastResult; |
|
} |
|
|
|
public Q_SLOTS: |
|
QString evaluate(const QString &expression, bool *isApproximate = nullptr); |
|
void updateExchangeRates(); |
|
|
|
void copyToClipboard(bool flag = true); |
|
|
|
protected Q_SLOTS: |
|
void updateResult(KJob *); |
|
|
|
private: |
|
QString m_lastResult; |
|
static QAtomicInt s_counter; |
|
};
|
|
|