Browse Source

Icons for tx table and settings core dump fix

pull/112/head
fekt 2 years ago
parent
commit
6fc4e3731c
  1. BIN
      res/lock_closed.png
  2. BIN
      res/lock_open.png
  3. BIN
      res/send.png
  4. BIN
      res/synced.png
  5. BIN
      res/transaction0.png
  6. BIN
      res/transaction2.png
  7. BIN
      res/transaction_abandoned.png
  8. BIN
      res/transaction_conflicted.png
  9. BIN
      res/tx_inout.png
  10. BIN
      res/tx_input.png
  11. BIN
      res/tx_mined.png
  12. BIN
      res/tx_output.png
  13. BIN
      res/verify.png
  14. BIN
      res/warning.png
  15. 38
      src/mainwindow.cpp
  16. 2
      src/mainwindow.ui
  17. 6
      src/txtablemodel.cpp

BIN
res/lock_closed.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
res/lock_open.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
res/send.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
res/synced.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
res/transaction0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
res/transaction2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
res/transaction_abandoned.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
res/transaction_conflicted.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
res/tx_inout.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
res/tx_input.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
res/tx_mined.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
res/tx_output.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
res/verify.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
res/warning.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

38
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);

2
src/mainwindow.ui

@ -22,7 +22,7 @@
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>2</number>
<number>3</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">

6
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);

Loading…
Cancel
Save