mirror of
https://github.com/wownero/wowlet.git
synced 2026-11-29 03:24:15 +01:00
Send: focus amount field on fill
This commit is contained in:
+2
-2
@@ -885,8 +885,8 @@ void MainWindow::payToMany() {
|
||||
"A maximum of 16 addresses may be specified.");
|
||||
}
|
||||
|
||||
void MainWindow::showSendScreen(const CCSEntry &entry) {
|
||||
m_sendWidget->fill(entry);
|
||||
void MainWindow::showSendScreen(const CCSEntry &entry) { // TODO: rename this function
|
||||
m_sendWidget->fill(entry.address, QString("CCS: %1").arg(entry.title));
|
||||
ui->tabWidget->setCurrentIndex(Tabs::SEND);
|
||||
}
|
||||
|
||||
|
||||
+4
-6
@@ -87,22 +87,20 @@ void SendWidget::amountEdited(const QString &text) {
|
||||
this->updateConversionLabel();
|
||||
}
|
||||
|
||||
void SendWidget::fill(const CCSEntry &entry) {
|
||||
this->fill(entry.address, QString("CCS: %1").arg(entry.title), 0.0);
|
||||
}
|
||||
|
||||
void SendWidget::fill(double amount) {
|
||||
ui->lineAmount->setText(QString::number(amount));
|
||||
}
|
||||
|
||||
void SendWidget::fill(const QString &address, const QString &description, double amount) {
|
||||
ui->lineDescription->setText(description);
|
||||
ui->lineAddress->setText(address);
|
||||
|
||||
ui->lineAddress->moveCursor(QTextCursor::Start);
|
||||
|
||||
ui->lineDescription->setText(description);
|
||||
|
||||
if (amount > 0)
|
||||
ui->lineAmount->setText(QString::number(amount));
|
||||
ui->lineAmount->setFocus();
|
||||
|
||||
this->updateConversionLabel();
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SendWidget(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
|
||||
void fill(const CCSEntry &entry);
|
||||
void fill(const QString &address, const QString& description, double amount = 0);
|
||||
void fill(const QString &address, const QString &description, double amount = 0);
|
||||
void fill(double amount);
|
||||
void clearFields();
|
||||
void payToMany();
|
||||
|
||||
Reference in New Issue
Block a user