Make fees on send tab labels
This commit is contained in:
@@ -328,6 +328,7 @@ void MainWindow::setupRecieveTab() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// zAddr toggle button
|
||||||
QObject::connect(ui->rdioZAddr, &QRadioButton::toggled, addZAddrsToComboList);
|
QObject::connect(ui->rdioZAddr, &QRadioButton::toggled, addZAddrsToComboList);
|
||||||
|
|
||||||
// Explicitly get new address button.
|
// Explicitly get new address button.
|
||||||
|
|||||||
@@ -474,6 +474,27 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Fee</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="sendTxFees">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="sendTxFeesUSD">
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -573,6 +594,9 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="duplicatesEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -55,6 +55,19 @@ void MainWindow::setupSendTab() {
|
|||||||
QFont f = ui->Address1->font();
|
QFont f = ui->Address1->font();
|
||||||
f.setPointSize(f.pointSize() - 1);
|
f.setPointSize(f.pointSize() - 1);
|
||||||
ui->MemoTxt1->setFont(f);
|
ui->MemoTxt1->setFont(f);
|
||||||
|
|
||||||
|
// Set up focus enter to set fees
|
||||||
|
QObject::connect(ui->tabWidget, &QTabWidget::currentChanged, [=] (int pos) {
|
||||||
|
if (pos == 1) {
|
||||||
|
// Set the fees
|
||||||
|
ui->sendTxFees->setText(QString::number(Utils::getTotalFee(), 'g', 8) %
|
||||||
|
" " % Utils::getTokenName());
|
||||||
|
ui->sendTxFeesUSD->setText(Settings::getInstance()->getUSDFormat(Utils::getTotalFee()));
|
||||||
|
// Set focus to the first address box
|
||||||
|
ui->Address1->setFocus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setDefaultPayFrom() {
|
void MainWindow::setDefaultPayFrom() {
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ public:
|
|||||||
QSpacerItem *horizontalSpacer_3;
|
QSpacerItem *horizontalSpacer_3;
|
||||||
QSpacerItem *verticalSpacer_2;
|
QSpacerItem *verticalSpacer_2;
|
||||||
QHBoxLayout *horizontalLayout_6;
|
QHBoxLayout *horizontalLayout_6;
|
||||||
|
QLabel *label_7;
|
||||||
|
QLabel *sendTxFees;
|
||||||
|
QLabel *sendTxFeesUSD;
|
||||||
QSpacerItem *horizontalSpacer;
|
QSpacerItem *horizontalSpacer;
|
||||||
QPushButton *sendTransactionButton;
|
QPushButton *sendTransactionButton;
|
||||||
QPushButton *cancelSendButton;
|
QPushButton *cancelSendButton;
|
||||||
@@ -466,6 +469,21 @@ public:
|
|||||||
horizontalLayout_6 = new QHBoxLayout();
|
horizontalLayout_6 = new QHBoxLayout();
|
||||||
horizontalLayout_6->setSpacing(6);
|
horizontalLayout_6->setSpacing(6);
|
||||||
horizontalLayout_6->setObjectName(QStringLiteral("horizontalLayout_6"));
|
horizontalLayout_6->setObjectName(QStringLiteral("horizontalLayout_6"));
|
||||||
|
label_7 = new QLabel(tab_2);
|
||||||
|
label_7->setObjectName(QStringLiteral("label_7"));
|
||||||
|
|
||||||
|
horizontalLayout_6->addWidget(label_7);
|
||||||
|
|
||||||
|
sendTxFees = new QLabel(tab_2);
|
||||||
|
sendTxFees->setObjectName(QStringLiteral("sendTxFees"));
|
||||||
|
|
||||||
|
horizontalLayout_6->addWidget(sendTxFees);
|
||||||
|
|
||||||
|
sendTxFeesUSD = new QLabel(tab_2);
|
||||||
|
sendTxFeesUSD->setObjectName(QStringLiteral("sendTxFeesUSD"));
|
||||||
|
|
||||||
|
horizontalLayout_6->addWidget(sendTxFeesUSD);
|
||||||
|
|
||||||
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
|
||||||
horizontalLayout_6->addItem(horizontalSpacer);
|
horizontalLayout_6->addItem(horizontalSpacer);
|
||||||
@@ -532,6 +550,7 @@ public:
|
|||||||
sizePolicy1.setVerticalStretch(0);
|
sizePolicy1.setVerticalStretch(0);
|
||||||
sizePolicy1.setHeightForWidth(listRecieveAddresses->sizePolicy().hasHeightForWidth());
|
sizePolicy1.setHeightForWidth(listRecieveAddresses->sizePolicy().hasHeightForWidth());
|
||||||
listRecieveAddresses->setSizePolicy(sizePolicy1);
|
listRecieveAddresses->setSizePolicy(sizePolicy1);
|
||||||
|
listRecieveAddresses->setDuplicatesEnabled(false);
|
||||||
|
|
||||||
horizontalLayout_10->addWidget(listRecieveAddresses);
|
horizontalLayout_10->addWidget(listRecieveAddresses);
|
||||||
|
|
||||||
@@ -673,6 +692,9 @@ public:
|
|||||||
MemoBtn1->setText(QApplication::translate("MainWindow", "Memo", nullptr));
|
MemoBtn1->setText(QApplication::translate("MainWindow", "Memo", nullptr));
|
||||||
MemoTxt1->setText(QString());
|
MemoTxt1->setText(QString());
|
||||||
addAddressButton->setText(QApplication::translate("MainWindow", "Add Address", nullptr));
|
addAddressButton->setText(QApplication::translate("MainWindow", "Add Address", nullptr));
|
||||||
|
label_7->setText(QApplication::translate("MainWindow", "Fee", nullptr));
|
||||||
|
sendTxFees->setText(QApplication::translate("MainWindow", "TextLabel", nullptr));
|
||||||
|
sendTxFeesUSD->setText(QApplication::translate("MainWindow", "TextLabel", nullptr));
|
||||||
sendTransactionButton->setText(QApplication::translate("MainWindow", "Send", nullptr));
|
sendTransactionButton->setText(QApplication::translate("MainWindow", "Send", nullptr));
|
||||||
cancelSendButton->setText(QApplication::translate("MainWindow", "Cancel", nullptr));
|
cancelSendButton->setText(QApplication::translate("MainWindow", "Cancel", nullptr));
|
||||||
tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Send", nullptr));
|
tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate("MainWindow", "Send", nullptr));
|
||||||
|
|||||||
Reference in New Issue
Block a user