diff --git a/res/lock_closed.png b/res/lock_closed.png new file mode 100644 index 0000000..1bd98b2 Binary files /dev/null and b/res/lock_closed.png differ diff --git a/res/lock_open.png b/res/lock_open.png new file mode 100644 index 0000000..a704513 Binary files /dev/null and b/res/lock_open.png differ diff --git a/res/send.png b/res/send.png new file mode 100644 index 0000000..ac76cc1 Binary files /dev/null and b/res/send.png differ diff --git a/res/synced.png b/res/synced.png new file mode 100644 index 0000000..5ac28d3 Binary files /dev/null and b/res/synced.png differ diff --git a/res/transaction0.png b/res/transaction0.png new file mode 100644 index 0000000..72c4456 Binary files /dev/null and b/res/transaction0.png differ diff --git a/res/transaction2.png b/res/transaction2.png new file mode 100644 index 0000000..5ac28d3 Binary files /dev/null and b/res/transaction2.png differ diff --git a/res/transaction_abandoned.png b/res/transaction_abandoned.png new file mode 100644 index 0000000..8ca6445 Binary files /dev/null and b/res/transaction_abandoned.png differ diff --git a/res/transaction_conflicted.png b/res/transaction_conflicted.png new file mode 100644 index 0000000..55e34de Binary files /dev/null and b/res/transaction_conflicted.png differ diff --git a/res/tx_inout.png b/res/tx_inout.png new file mode 100644 index 0000000..0a6e72a Binary files /dev/null and b/res/tx_inout.png differ diff --git a/res/tx_input.png b/res/tx_input.png new file mode 100644 index 0000000..9e9ee92 Binary files /dev/null and b/res/tx_input.png differ diff --git a/res/tx_mined.png b/res/tx_mined.png new file mode 100644 index 0000000..5a6ef52 Binary files /dev/null and b/res/tx_mined.png differ diff --git a/res/tx_output.png b/res/tx_output.png new file mode 100644 index 0000000..6f66ab6 Binary files /dev/null and b/res/tx_output.png differ diff --git a/res/verify.png b/res/verify.png new file mode 100644 index 0000000..8e2cb2c Binary files /dev/null and b/res/verify.png differ diff --git a/res/warning.png b/res/warning.png new file mode 100644 index 0000000..6bc5ac7 Binary files /dev/null and b/res/warning.png differ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5585125..6aa7c08 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1,4 +1,4 @@ -// Copyright 2019-2021 The Hush Developers +// Copyright 2019-2021 The Hush Developers // Released under the GPLv3 #include "mainwindow.h" #include "addressbook.h" @@ -466,19 +466,24 @@ void MainWindow::setupSettingsModal() { settings.lblTor->setToolTip(tooltip); } - //Use Consolidation + // Wallet Size + if (rpc->getConnection() != nullptr) { + int size = 0; + qDebug() << __func__ << ": settings hushDir=" << rpc->getConnection()->config->hushDir; + + QDir hushdir(rpc->getConnection()->config->hushDir); + QFile WalletSize(hushdir.filePath("wallet.dat")); + + if (WalletSize.open(QIODevice::ReadOnly)){ + size = WalletSize.size() / 1000000; //when file does open. + //QString size1 = QString::number(size) ; + settings.WalletSize->setText(QString::number(size)); + WalletSize.close(); + } + } + + // Use Consolidation bool isUsingConsolidation = false; - int size = 0; - qDebug() << __func__ << ": hushDir=" << rpc->getConnection()->config->hushDir; - - QDir hushdir(rpc->getConnection()->config->hushDir); - QFile WalletSize(hushdir.filePath("wallet.dat")); - if (WalletSize.open(QIODevice::ReadOnly)){ - size = WalletSize.size() / 1000000; //when file does open. - //QString size1 = QString::number(size) ; - settings.WalletSize->setText(QString::number(size)); - WalletSize.close(); - } if (rpc->getConnection() != nullptr) { isUsingConsolidation = !rpc->getConnection()->config->consolidation.isEmpty() == true; } @@ -487,8 +492,7 @@ void MainWindow::setupSettingsModal() { settings.chkConso->setEnabled(false); } - //Use Deletetx - + // Use Deletetx bool isUsingDeletetx = false; if (rpc->getConnection() != nullptr) { isUsingDeletetx = !rpc->getConnection()->config->deletetx.isEmpty() == true; @@ -498,8 +502,7 @@ void MainWindow::setupSettingsModal() { settings.chkDeletetx->setEnabled(false); } - //Use Zindex - + // Use Zindex bool isUsingZindex = false; if (rpc->getConnection() != nullptr) { isUsingZindex = !rpc->getConnection()->config->zindex.isEmpty() == true; @@ -1617,6 +1620,7 @@ void MainWindow::setupTransactionsTab() { QString memo = txModel->getMemo(index.row()); if (!memo.isEmpty()) { + /* TODO: Add reply button/functionality */ QMessageBox mb(QMessageBox::Information, tr("Memo"), memo, QMessageBox::Ok, this); mb.setTextFormat(Qt::PlainText); mb.setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f3b73ac..1e7f9b8 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -22,7 +22,7 @@ - 2 + 3 diff --git a/src/txtablemodel.cpp b/src/txtablemodel.cpp index d139aae..4afb531 100644 --- a/src/txtablemodel.cpp +++ b/src/txtablemodel.cpp @@ -161,6 +161,9 @@ void TxTableModel::updateAllData() { } if (role == Qt::DecorationRole && index.column() == 0) { + + qDebug() << "TX Type = " + dat.type; + if (!dat.memo.isEmpty()) { // If the memo is a Payment URI, then show a payment request icon if (dat.memo.startsWith("hush:")) { @@ -172,6 +175,9 @@ void TxTableModel::updateAllData() { return QVariant(icon.pixmap(16, 16)); } } else { + // TODO: Add appropriate icons for types of txs instead of empty pixmap + //if(this->getType(index.row()) == "incoming"){} + // Empty pixmap to make it align QPixmap p(16, 16); p.fill(Qt::white);