feather/src/sendwidget.h

60 lines
1.5 KiB
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.
#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:
explicit SendWidget(QWidget *parent = nullptr);
void fill(const CCSEntry &entry);
2020-12-14 00:59:32 +00:00
void fill(const QString &address, const QString& description, double amount = 0);
void fill(double amount);
void clearFields();
~SendWidget() override;
public slots:
void sendClicked();
void clearClicked();
void aliasClicked();
void btnMaxClicked();
void amountEdited(const QString &text);
void addressEdited(const QString &text);
void currencyComboChanged(int index);
void fillAddress(const QString &address);
void updateConversionLabel();
void onOpenAliasResolveError(const QString &err);
void onOpenAliasResolved(const QString &address, const QString &openAlias);
void onWalletClosed();
void onPreferredFiatCurrencyChanged();
void onInitiateTransaction();
void onEndTransaction();
signals:
void resolveOpenAlias(const QString &address);
2020-12-31 03:26:03 +00:00
void createTransaction(const QString &address, quint64 amount, const QString &description, bool all);
private:
void setupComboBox();
2020-12-31 03:26:03 +00:00
double amountDouble();
Ui::SendWidget *ui;
AppContext *m_ctx;
2020-12-31 03:26:03 +00:00
quint64 amount();
double conversionAmount();
};
#endif // SENDWIDGET_H