2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2024-01-01 17:07:58 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-06-27 12:51:15 +00:00
|
|
|
#ifndef FEATHER_SENDWIDGET_H
|
|
|
|
#define FEATHER_SENDWIDGET_H
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#include <QWidget>
|
2021-06-27 15:00:09 +00:00
|
|
|
|
2023-03-01 02:05:56 +00:00
|
|
|
#include "libwalletqt/Wallet.h"
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class SendWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class SendWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-03-01 02:05:56 +00:00
|
|
|
explicit SendWidget(Wallet *wallet, QWidget *parent = nullptr);
|
2021-07-02 16:01:11 +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();
|
2021-10-22 22:14:34 +00:00
|
|
|
void onOpenAliasResolved(const QString &openAlias, const QString &address, bool dnssecValid);
|
2020-10-15 02:17:57 +00:00
|
|
|
void onPreferredFiatCurrencyChanged();
|
2023-02-13 09:41:07 +00:00
|
|
|
void setWebsocketEnabled(bool enabled);
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2024-04-28 19:26:54 +00:00
|
|
|
void setManualFeeSelectionEnabled(bool enabled);
|
|
|
|
void setSubtractFeeFromAmountEnabled(bool enabled);
|
|
|
|
|
2023-12-15 13:10:55 +00:00
|
|
|
void disableSendButton();
|
|
|
|
void enableSendButton();
|
|
|
|
|
|
|
|
void disallowSending();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-07-07 22:48:17 +00:00
|
|
|
private slots:
|
|
|
|
void onDataPasted(const QString &data);
|
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
private:
|
2020-11-24 21:16:24 +00:00
|
|
|
void setupComboBox();
|
2020-12-31 03:26:03 +00:00
|
|
|
double amountDouble();
|
2023-12-02 18:28:31 +00:00
|
|
|
bool keyImageSync(bool sendAll, quint64 amount);
|
2020-11-24 21:16:24 +00:00
|
|
|
|
2020-12-31 03:26:03 +00:00
|
|
|
quint64 amount();
|
2020-10-07 10:36:04 +00:00
|
|
|
double conversionAmount();
|
2022-03-12 12:53:46 +00:00
|
|
|
|
|
|
|
QScopedPointer<Ui::SendWidget> ui;
|
2023-03-01 02:05:56 +00:00
|
|
|
Wallet *m_wallet;
|
2023-12-15 13:10:55 +00:00
|
|
|
bool m_disallowSending = false;
|
2020-10-07 10:36:04 +00:00
|
|
|
};
|
|
|
|
|
2021-06-27 12:51:15 +00:00
|
|
|
#endif // FEATHER_SENDWIDGET_H
|