2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2020-12-26 19:56:06 +00:00
|
|
|
// Copyright (c) 2020-2021, The Monero Project.
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#ifndef CALC_H
|
|
|
|
#define CALC_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include "appcontext.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class CalcWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class CalcWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CalcWidget(QWidget *parent = nullptr);
|
2020-12-28 04:39:20 +00:00
|
|
|
~CalcWidget() override;
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void closed();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void fromChanged(const QString& data);
|
|
|
|
void toChanged(const QString& data);
|
|
|
|
void toComboChanged(const QString& data);
|
|
|
|
void initFiat();
|
|
|
|
void initCrypto();
|
2021-02-03 19:40:35 +00:00
|
|
|
void skinChanged();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::CalcWidget *ui;
|
2020-10-11 17:15:21 +00:00
|
|
|
AppContext *m_ctx;
|
2020-10-07 10:36:04 +00:00
|
|
|
bool m_comboBoxInit = false;
|
|
|
|
void initComboBox();
|
|
|
|
bool m_changing = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CALC_H
|