feather/src/SendWidget.h

63 lines
1.5 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2023-01-02 19:30:11 +00:00
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
2021-06-27 12:51:15 +00:00
#ifndef FEATHER_SENDWIDGET_H
#define FEATHER_SENDWIDGET_H
#include <QWidget>
2021-06-27 15:00:09 +00:00
#include "libwalletqt/Wallet.h"
namespace Ui {
class SendWidget;
}
class SendWidget : public QWidget
{
Q_OBJECT
public:
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);
void fill(double amount);
void clearFields();
2021-01-26 23:55:27 +00:00
void payToMany();
~SendWidget() override;
public slots:
2021-06-25 14:14:49 +00:00
void skinChanged();
void scanClicked();
void sendClicked();
void clearClicked();
void aliasClicked();
void btnMaxClicked();
void amountEdited(const QString &text);
2021-01-26 23:55:27 +00:00
void addressEdited();
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);
void onPreferredFiatCurrencyChanged();
2022-03-12 12:53:46 +00:00
void disableSendButton();
void setWebsocketEnabled(bool enabled);
void onInitiateTransaction();
void onEndTransaction();
private slots:
void onDataPasted(const QString &data);
private:
void setupComboBox();
2020-12-31 03:26:03 +00:00
double amountDouble();
2020-12-31 03:26:03 +00:00
quint64 amount();
double conversionAmount();
2022-03-12 12:53:46 +00:00
QScopedPointer<Ui::SendWidget> ui;
Wallet *m_wallet;
2022-03-12 12:53:46 +00:00
bool m_sendDisabled = false;
};
2021-06-27 12:51:15 +00:00
#endif // FEATHER_SENDWIDGET_H