Directory structure

This commit is contained in:
Aditya Kulkarni
2018-10-13 23:04:36 -07:00
parent 684edead71
commit e99c75b54a
35 changed files with 40 additions and 43 deletions

View File

@@ -1,2 +0,0 @@
# zcash-qt-wallet
Wallet UI for zcashd

View File

@@ -278,16 +278,9 @@ void RPC::getInfoThenRefresh() {
main->statusLabel->setText(statusText); main->statusLabel->setText(statusText);
main->statusIcon->clear(); // TODO: Add checked icon main->statusIcon->clear(); // TODO: Add checked icon
// Now, refreshing the balances and transactions causes UI flicked and selections // Refresh everything.
// to disappear, so we'll only do it if the balance in the wallet has refreshBalances();
// updated (i.e., something changed) refreshTransactions();
if (QString::number(reply["balance"].get<json::number_float_t>()) != currentBalance) {
currentBalance = QString::number(reply["balance"].get<json::number_float_t>());
refreshBalances();
refreshTransactions();
}
// Addresses can be created without a transaction, so we'll call that outside
refreshAddresses(); refreshAddresses();
}); });
} }
@@ -357,10 +350,15 @@ void RPC::refreshBalances() {
ui->balancesTable->setColumnWidth(0, 300); ui->balancesTable->setColumnWidth(0, 300);
// Add all the addresses into the inputs combo box // Add all the addresses into the inputs combo box
auto lastFromAddr = ui->inputsCombo->currentText().split("(")[0].trimmed();
ui->inputsCombo->clear(); ui->inputsCombo->clear();
auto i = allBalances->constBegin(); auto i = allBalances->constBegin();
while (i != allBalances->constEnd()) { while (i != allBalances->constEnd()) {
ui->inputsCombo->addItem(i.key() % "(" % QString::number(i.value(), 'f', 8) % " ZEC)"); QString item = i.key() % "(" % QString::number(i.value(), 'f', 8) % " ZEC)";
ui->inputsCombo->addItem(item);
if (item.startsWith(lastFromAddr)) ui->inputsCombo->setCurrentText(item);
++i; ++i;
} }
}; };

View File

View File

@@ -8,7 +8,7 @@ QT += core gui network
CONFIG += precompile_header CONFIG += precompile_header
PRECOMPILED_HEADER = precompiled.h PRECOMPILED_HEADER = src/precompiled.h
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
@@ -21,48 +21,49 @@ TEMPLATE = app
# deprecated API in order to know how to port your code away from it. # deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
INCLUDEPATH += 3rdparty/ INCLUDEPATH += src/3rdparty/
RESOURCES = application.qrc RESOURCES = application.qrc
MOC_DIR = bin MOC_DIR = bin
OBJECTS_DIR = bin OBJECTS_DIR = bin
UI_DIR = src
CONFIG += c++14 CONFIG += c++14
SOURCES += \ SOURCES += \
main.cpp \ src/main.cpp \
mainwindow.cpp \ src/mainwindow.cpp \
rpc.cpp \ src/rpc.cpp \
balancestablemodel.cpp \ src/balancestablemodel.cpp \
unspentoutput.cpp \ src/unspentoutput.cpp \
3rdparty/qrcode/BitBuffer.cpp \ src/3rdparty/qrcode/BitBuffer.cpp \
3rdparty/qrcode/QrCode.cpp \ src/3rdparty/qrcode/QrCode.cpp \
3rdparty/qrcode/QrSegment.cpp \ src/3rdparty/qrcode/QrSegment.cpp \
settings.cpp \ src/settings.cpp \
sendtab.cpp \ src/sendtab.cpp \
txtablemodel.cpp \ src/txtablemodel.cpp \
transactionitem.cpp src/transactionitem.cpp
HEADERS += \ HEADERS += \
mainwindow.h \ src/mainwindow.h \
precompiled.h \ src/precompiled.h \
rpc.h \ src/rpc.h \
balancestablemodel.h \ src/balancestablemodel.h \
unspentoutput.h \ src/unspentoutput.h \
3rdparty/qrcode/BitBuffer.hpp \ src/3rdparty/qrcode/BitBuffer.hpp \
3rdparty/qrcode/QrCode.hpp \ src/3rdparty/qrcode/QrCode.hpp \
3rdparty/qrcode/QrSegment.hpp \ src/3rdparty/qrcode/QrSegment.hpp \
3rdparty/json/json.hpp \ src/3rdparty/json/json.hpp \
settings.h \ src/settings.h \
txtablemodel.h \ src/txtablemodel.h \
transactionitem.h src/transactionitem.h
FORMS += \ FORMS += \
mainwindow.ui \ src/mainwindow.ui \
settings.ui \ src/settings.ui \
about.ui \ src/about.ui \
confirm.ui src/confirm.ui
# Default rules for deployment. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin