feather/src/CalcWidget.h

42 lines
833 B
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2022-02-10 10:26:41 +00:00
// SPDX-FileCopyrightText: 2020-2022 The Monero Project
2021-05-20 14:04:59 +00:00
#ifndef FEATHER_CALCWIDGET_H
#define FEATHER_CALCWIDGET_H
2021-05-02 18:22:38 +00:00
#include <QWidget>
2021-05-26 13:14:53 +00:00
#include <QComboBox>
2022-02-23 22:27:20 +00:00
#include <QTimer>
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;
public slots:
void skinChanged();
2021-05-20 14:04:59 +00:00
private slots:
void initComboBox();
2021-05-26 13:14:53 +00:00
void showCalcConfigureDialog();
void onPricesReceived();
2021-05-20 14:04:59 +00:00
private:
2021-05-20 14:04:59 +00:00
void convert(bool reverse);
2021-05-26 13:14:53 +00:00
void setupComboBox(QComboBox *comboBox, const QStringList &crypto, const QStringList &fiat);
2022-02-23 22:27:20 +00:00
void updateStatus();
2021-05-02 18:22:38 +00:00
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::CalcWidget> ui;
bool m_comboBoxInit = false;
2022-02-23 22:27:20 +00:00
QTimer m_statusTimer;
};
2021-05-20 14:04:59 +00:00
#endif // FEATHER_CALCWIDGET_H