feather/src/CalcWidget.h

39 lines
756 B
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, 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>
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);
2021-05-02 18:22:38 +00:00
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::CalcWidget> ui;
bool m_comboBoxInit = false;
};
2021-05-20 14:04:59 +00:00
#endif // FEATHER_CALCWIDGET_H