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 SENDWIDGET_H
|
|
|
|
#define SENDWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include "appcontext.h"
|
|
|
|
#include "widgets/ccswidget.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SendWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SendWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2021-05-18 15:59:18 +00:00
|
|
|
explicit SendWidget(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
|
2020-10-07 10:36:04 +00:00
|
|
|
void fill(const CCSEntry &entry);
|
2020-12-14 00:59:32 +00:00
|
|
|
void fill(const QString &address, const QString& description, double amount = 0);
|
2020-10-07 10:36:04 +00:00
|
|
|
void fill(double amount);
|
|
|
|
void clearFields();
|
2021-01-26 23:55:27 +00:00
|
|
|
void payToMany();
|
2020-10-07 10:36:04 +00:00
|
|
|
~SendWidget() override;
|
|
|
|
|
|
|
|
public slots:
|
2021-06-25 14:14:49 +00:00
|
|
|
void skinChanged();
|
|
|
|
void scanClicked();
|
2020-10-07 10:36:04 +00:00
|
|
|
void sendClicked();
|
|
|
|
void clearClicked();
|
|
|
|
void aliasClicked();
|
|
|
|
void btnMaxClicked();
|
|
|
|
void amountEdited(const QString &text);
|
2021-01-26 23:55:27 +00:00
|
|
|
void addressEdited();
|
2020-10-07 10:36:04 +00:00
|
|
|
void currencyComboChanged(int index);
|
|
|
|
void fillAddress(const QString &address);
|
|
|
|
void updateConversionLabel();
|
|
|
|
void onOpenAliasResolveError(const QString &err);
|
|
|
|
void onOpenAliasResolved(const QString &address, const QString &openAlias);
|
2020-10-15 02:17:57 +00:00
|
|
|
void onPreferredFiatCurrencyChanged();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
void onInitiateTransaction();
|
|
|
|
void onEndTransaction();
|
|
|
|
|
|
|
|
private:
|
2020-11-24 21:16:24 +00:00
|
|
|
void setupComboBox();
|
2020-12-31 03:26:03 +00:00
|
|
|
double amountDouble();
|
2020-11-24 21:16:24 +00:00
|
|
|
|
2021-06-27 12:13:05 +00:00
|
|
|
QScopedPointer<Ui::SendWidget> ui;
|
2021-05-18 15:59:18 +00:00
|
|
|
QSharedPointer<AppContext> m_ctx;
|
2020-12-31 03:26:03 +00:00
|
|
|
quint64 amount();
|
2020-10-07 10:36:04 +00:00
|
|
|
double conversionAmount();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SENDWIDGET_H
|