From 47292f768d17760500c1ed875064886f3fd5cad1 Mon Sep 17 00:00:00 2001 From: Denio Date: Thu, 5 Dec 2019 23:20:25 +0100 Subject: [PATCH 1/6] add taddr supply,zaddr supply and total supply --- src/controller.cpp | 10 + src/liteinterface.cpp | 7 + src/liteinterface.h | 3 + src/mainwindow.ui | 473 ++++++++++++++++++++++++------------------ 4 files changed, 292 insertions(+), 201 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index f6eac3b..587ed7d 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -254,6 +254,16 @@ void Controller::getInfoThenRefresh(bool force) { model->setEncryptionStatus(isEncrypted, isLocked); }); + zrpc->fetchSupply([=] (const json& reply) { + + int supply = reply["supply"].get(); + ui->supply_taddr->setText(QString::number(supply)); + int zfunds = reply["zfunds"].get(); + ui->supply_zaddr->setText(QString::number(zfunds)); + int total = reply["total"].get(); + ui->supply_total->setText(QString::number(total)); + }); + if ( doUpdate ) { // Something changed, so refresh everything. refreshBalances(); diff --git a/src/liteinterface.cpp b/src/liteinterface.cpp index 57eaeb1..f430664 100644 --- a/src/liteinterface.cpp +++ b/src/liteinterface.cpp @@ -137,6 +137,13 @@ void LiteInterface::fetchInfo(const std::function& cb, conn->doRPC("info", "", cb, err); } +void LiteInterface::fetchSupply(const std::function& cb) { + if (conn == nullptr) + return; + + conn->doRPCWithDefaultErrorHandling("coinsupply", "", cb); +} + void LiteInterface::fetchLatestBlock(const std::function& cb, const std::function& err) { diff --git a/src/liteinterface.h b/src/liteinterface.h index 43c5e6c..842fd1c 100644 --- a/src/liteinterface.h +++ b/src/liteinterface.h @@ -45,6 +45,8 @@ public: void fetchInfo(const std::function& cb, const std::function& err); + + void fetchLatestBlock(const std::function& cb, const std::function& err); @@ -62,6 +64,7 @@ public: void clearWallet(const std::function& cb); void fetchWalletEncryptionStatus(const std::function& cb); + void fetchSupply(const std::function& cb); void encryptWallet(QString password, const std::function& cb); void unlockWallet(QString password, const std::function& cb); void removeWalletEncryption(QString password, const std::function& cb); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 7effeea..f8286a9 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -18,11 +18,11 @@ :/icons/res/icon.ico:/icons/res/icon.ico - - + + - 2 + 4 @@ -948,7 +948,7 @@ - Hush Daemon + Information about Hush @@ -972,8 +972,8 @@ - - + + Qt::Vertical @@ -986,7 +986,7 @@ - + @@ -998,168 +998,235 @@ - + Qt::Horizontal - - - - BlockHeight - - + + + + + + | + + + + + + + Loading... + + + + + + + | + + + + + + + Next Halving + + + + + + + Loading... + + + + + + + | + + + + + + + Loading... + + + + + + + Vendor + + + + + + + Loading... + + + + + + + Loading... + + + + + + + Loading... + + + + + + + Loading... + + + + + + + | + + + + + + + | + + + + + + + Difficulty + + + + + + + | + + + + + + + Last Notarized Block + + + + + + + Loading... + + + + + + + | + + + + + + + Total Supply + + + + + + + | + + + + + + + Longestchain + + + + + + + | + + + + + + + Version hushlightd + + + + + + + BlockHeight + + + + + + + Supply zAddr + + + + + + + | + + + + + + + Loading... + + + + + + + Loading... + + + + + + + Supply tAddr + + + + - - - - | - - - - - - - Loading... - - - - - - - Vendor - - - - - - - | - - - - - - - Loading... - - - - - - - Version hushlightd - - - - - - - | - - - - - - - Loading... - - - - - - - Next Halving - - - - - - - | - - - - - - - Loading... - - - - - - - Last Notarized Block - - - - - - - | - - - - - - - Loading... - - - - - - - Longestchain - - - - - - - | - - - - - - - Loading... - - - - - - - Difficulty - - - - - - - | - - - - - - - Loading... - - - - + Qt::Horizontal - + @@ -1171,70 +1238,74 @@ - + Qt::Horizontal - - - - Market Cap - - + + + + + + Loading... + + + + + + + Market Cap + + + + + + + | + + + + + + + Loading... + + + + + + + Volume on Exchanges + + + + + + + | + + + + - - - - | - - - - - - - Loading... - - - - - - - Volume on Exchanges - - - - - - - | - - - - - - - Loading... - - - - + Qt::Horizontal - + This is a Lightwallet, you cant mine with it! - + Qt::Vertical From 6da7614bbd49f2df59d1e5faac5e8c6fa65c31af Mon Sep 17 00:00:00 2001 From: Denio Date: Sun, 8 Dec 2019 09:46:32 +0100 Subject: [PATCH 2/6] update sdl-cli lib --- lib/Cargo.lock | 6 +++--- lib/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cargo.lock b/lib/Cargo.lock index dc45f9c..afa3726 100644 --- a/lib/Cargo.lock +++ b/lib/Cargo.lock @@ -1051,7 +1051,7 @@ version = "0.1.0" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=473d476274077d88104392dc6ad384a06b5d2554)", + "silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=b5534d6f830b9af2e6a2992d67c99fea2ef5f21a)", ] [[package]] @@ -1467,7 +1467,7 @@ dependencies = [ [[package]] name = "silentdragonlitelib" version = "0.1.0" -source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=473d476274077d88104392dc6ad384a06b5d2554#473d476274077d88104392dc6ad384a06b5d2554" +source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=b5534d6f830b9af2e6a2992d67c99fea2ef5f21a#b5534d6f830b9af2e6a2992d67c99fea2ef5f21a" dependencies = [ "base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)", @@ -2481,7 +2481,7 @@ dependencies = [ "checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" "checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" -"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=473d476274077d88104392dc6ad384a06b5d2554)" = "" +"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=b5534d6f830b9af2e6a2992d67c99fea2ef5f21a)" = "" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" "checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b" diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 42d2cee..d09f64b 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -11,4 +11,4 @@ crate-type = ["staticlib"] [dependencies] libc = "0.2.58" lazy_static = "1.4.0" -silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "473d476274077d88104392dc6ad384a06b5d2554" } +silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "b5534d6f830b9af2e6a2992d67c99fea2ef5f21a" } From 3e98390af95532b1acb8d436ccac48cc6f97d823 Mon Sep 17 00:00:00 2001 From: Denio Date: Sun, 8 Dec 2019 12:30:36 +0100 Subject: [PATCH 3/6] fix a problem with the theme, render Market Price and other values with thousand decimal with QTLocal --- res/silentdragonlite_de.qm | Bin 42377 -> 40558 bytes res/silentdragonlite_de.ts | 347 +++++++++++++++++++++------------- src/controller.cpp | 168 ++++++++++++---- src/scripts/dotranslations.sh | 4 +- src/settings.ui | 4 +- 5 files changed, 349 insertions(+), 174 deletions(-) diff --git a/res/silentdragonlite_de.qm b/res/sil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Ty(U>X%?gYeRM>boza1o82<08(P1UL=oYIT<^hQbVg*0j!HMo_ zyD)A5=SJTQw+L_t@3%`F=W$pBm)+(N;$a!P(-jvs0{==%;s+#77I>F~o8oi{3DG#k zk(dz8<5Pi;RAqFaa$ncRU|F4S@tSa7c4L0q`Zr4C-D1$hW>Dz2zTekyg>U@peSG BalancesTableModel - + Address Adresse - + Amount Betrag @@ -47,29 +47,29 @@ Controller - + Wallet Password Wallet Passwort - + Your wallet is encrypted. Please enter your wallet password Ihr Wallet ist verschlüsselt. Bitte geben Sie das Passwort ein - - + + Wallet Decryption Failed Entschlüsslung gescheitert - + Please enter a valid password Bitte geben Sie ein gültiges Passwort ein - + Failed to unlock wallet Konnte das Wallet nicht entsperren @@ -217,8 +217,8 @@ Please enter your wallet password - - + + Memo Nachricht hinzufügen @@ -280,9 +280,8 @@ Please enter your wallet password Sichtbare Adresse - New Address - Neue Adresse + Neue Adresse @@ -311,7 +310,7 @@ Please enter your wallet password - + Export Private Key Private Key exportieren @@ -321,47 +320,45 @@ Please enter your wallet password Transaktionen - Hush Daemon - Hush Daemon + Hush Daemon - blockHeight - Blockhöhe + Blockhöhe - + Version hushlightd Hushdlight Version - + &Send DenioD Feedback Sende DenioD Feedback - + &Export seed phrase Seed exportieren - + Encrypt Wallet Wallet verschlüsseln - + Remove Wallet Encryption Verschlüsslung entfernen - + Rescan Neu Scannen - + This is a Lightwallet, you cant mine with it! Dies ist ein Lightwallet, sie können damit nicht Minen! @@ -371,9 +368,18 @@ Please enter your wallet password - - - + + + + + + + + + + + + Loading... Lade... @@ -386,126 +392,205 @@ Please enter your wallet password Version hushd light - + Vendor Vendor - - - + + + + + + + + + + + + | - + + Next Address + + + + + Information about Hush + + + + + <html><head/><body><p align="center"><span style=" font-weight:600;">Hush Blockchain Information</span></p></body></html> + + + + + Next Halving + + + + + Difficulty + + + + + Last Notarized Block + + + + + Total Supply + + + + + Longestchain + + + + + BlockHeight + + + + + Supply zAddr + + + + + Supply tAddr + + + + + <html><head/><body><p align="center"><span style=" font-weight:600;">Hush Market Information</span></p></body></html> + + + + + Market Cap + + + + + Volume on Exchanges + + + + &File Datei - + &Help Hilfe - + &Apps Smartphone - + &Edit Bearbeiten - + E&xit Beenden - + &About Über - + &Settings Einstellungen - + Ctrl+P Ctrl+P - + &Hush Discord &Hush Discord - + &Hush Website &Hush Website - + Check github.com for &updates Überprüfe Github für Updates - + &Export all private keys Alle private Keys exportieren - + Address &book Adressbuch - + Ctrl+B Ctrl+B - - + + Export transactions Transaktionen exportieren - + Pay hush &URI... Zahlungs Hush &URI... - + Connect mobile &app Smartphone verbinden - + Ctrl+M Ctrl+M - + &Recurring Payments Wiederkehrende Zahlung - + Request hush... Hush anfordern... - + File a bug... Fehler melden... - + Copy txid Transaktions ID kopieren @@ -520,12 +605,12 @@ Please enter your wallet password Aktualisieren - + Restart Neustart - + Please restart Silentdragonlite to have the theme apply Bitte starten sie SilentDragonLite neu @@ -534,68 +619,72 @@ Please enter your wallet password Starte SilentDragonLite neu - + Some feedback about SilentDragonlite or Hush... Etwas Feedback über SilentDragonLite... - Send Duke some private and shielded feedback about - Sende DenioD anonym Feedback über + Sende DenioD anonym Feedback über - + or SilentDragonLite oder SilentDragonLite - + + Send DenioD some private and shielded feedback about + + + + Paste HUSH URI Hush URI einfügen - + Error paying HUSH URI Fehler bei HUSH URI - + URI should be of the form 'hush:<addr>?amt=x&memo=y Die URI sollte folgendemaßen aussehen 'hush:<addr>?amt=x&memo=y - + Error Fehler - + Error exporting transactions, file was not saved Fehler beim exportieren der Transaktionen. Die Datei wurde nicht gespeichert - + Error getting private keys Fehler beim empfangen der private Keys - + Error loading private keys: Fehler beim laden der private Keys: - + These are all the private keys for all the addresses in your wallet Dies sind alle private Keys für ihr Wallet - + Private key for Private Key für - - + + Save File Datei sichern @@ -681,82 +770,86 @@ Please use 'Remove Wallet Encryption' if you want to remove the wallet SilentDragonLite wurde erfolgreich entschlüsselt. Sie benötigen Ihr Passwort nicht mehr. - + Currency Change Währungszeichen wechseln - - Please restart SilentDragonLite to have new currencies apply - Bitte starten sie SilentDragonLite neu + + This change can take a few seconds. + - + Please restart SilentDragonLite to have new currencies apply + Bitte starten sie SilentDragonLite neu + + + This is your wallet seed. Please back it up carefully and safely. Dies ist Ihr SilentDragonLite Seed. Bitte sichern Sie ihn sorgfältig. - - + + Unable to open file Konnte die Datei nicht öffnen - - + + Copy address Adresse kopieren - - - + + + Copied to clipboard In die Zwischenablage kopiert - + Get private key Private Key erhalten - - + + View on block explorer Auf dem Blockexplorer anschauen - + View Payment Request Zahlungsanforderung ansehen - + View Memo Nachricht ansehen - + Reply to Antworten an - + Created new t-Addr Neue sichtbare Adresse erstellen - + Copy Address Adresse kopieren - + Address has been previously used Diese Adresse wurde schon einmal benutzt - + Address is unused Adresse ist unbenutzt @@ -1092,13 +1185,13 @@ Anmerkung: Sie bnötigen 2 Bestätigungen - + Connection Error Verbsindungsfehler - + Transaction Error Transaktionsfehler @@ -1115,43 +1208,43 @@ Anmerkung: Sie bnötigen 2 Bestätigungen keine Verbindung - + There was an error connecting to hushd. The error was Es gab einen Fehler zum server zu verbinden - + Tx Transaktion - + failed gescheitert - + The transaction with id Die Transaktion mit der ID - + failed. The error was ist gescheitert - + Update Available Update verfügbar - + A new release v%1 is available! You have v%2. Would you like to visit the releases page? @@ -1160,22 +1253,22 @@ Would you like to visit the releases page? Möchten Sie die Release Seite besuchen? - + No updates available keine Updates verfügbar - + You already have the latest release v%1 Sie haben bereits die neueste Version v%1 - + Please wait for SilentDragonLite to exit Bitte warten Sie bis SilentDragonLite beendet ist - + Waiting for hushd to exit Warten auf beendigung der Serververbindung @@ -1211,7 +1304,7 @@ Möchten Sie die Release Seite besuchen? Alle geplanten zukünftigen Zahlungen werden nicht durchgeführt. - + Tx submitted (right click to copy) txid: Transaktions ID übermittelt (Rechtsklick zum anschauen) : @@ -1241,22 +1334,22 @@ Möchten Sie die Release Seite besuchen? Betrag - + Connected directly Direkt verbunden - + Connected over the internet via silentdragon wormhole service Über das Internet verbunden - + Node is still syncing. SilentDragonLite synchronisiert noch. - + No sapling or transparent addresses with enough balance to spend. Nicht genügend Guthaben verfügbar. @@ -1646,7 +1739,7 @@ Möchten Sie die Release Seite besuchen? default - Normal + default @@ -1660,17 +1753,17 @@ Möchten Sie die Release Seite besuchen? blue - Blau + blue light - Hell + light dark - Dark + dark @@ -1843,17 +1936,16 @@ Möchten Sie die Release Seite besuchen? Konfiguriere HUSH3.conf - + Your hush node will be configured for you automatically Ihr Hush Node wird automatisch für Sie konfiguriert - Enable Fast Sync - Schneller synchronisieren + Schneller synchronisieren - + Show Advanced Configuration Erweiterte Einstellungen anzeigen @@ -1862,44 +1954,43 @@ Möchten Sie die Release Seite besuchen? Hush Preise abrufen (dies kann Ihre Privatssphäre einschränken)... - + Allow connections to the internet to check for updates, get hush prices etc... Hush Preise abrufen (dies kann Ihre Privatssphäre einschränken)... - + Use custom datadir Benutzerdefinierten Datei Pfad benutzen - + Choose directory Wählen Sie einen Ordner - + Please note that you'll need to already have a Tor service configured on port 9050 Stellen Sie sicher, dass der Tor Service bereits für den Port 9050 konfiguriert ist - + Connect to the internet for updates and price feeds Hush Preise abrufen (dies kann Ihre Privatssphäre einschränken) - + Please choose a directory to store your wallet.dat and blockchain Wählen Sie einen Ordner aus, wo Ihre wallet.dat und Blockhain gespeichert wird - + Connect over Tor Verbinden über Tor - <html><head/><body><p>Skips the most expensive checks during the initial block download. <a href="https://docs.silentdragon.co/using-silentdragon/#fastsync"><span style=" text-decoration: underline; color:#0000ff;">Learn More</span></a></p></body></html> - Überspringt die meisten Checks beim Start + Überspringt die meisten Checks beim Start diff --git a/src/controller.cpp b/src/controller.cpp index 587ed7d..cdd071c 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -170,14 +170,36 @@ void Controller::getInfoThenRefresh(bool force) { sprintf(halving_days, "%.2f", (double) (blocks_until_halving * 150) / (60*60*24) ); bool doUpdate = force || (model->getLatestBlock() != curBlock); model->setLatestBlock(curBlock); - ui->blockHeight->setText(QString::number(curBlock)); - ui->last_notarized->setText(QString::number(notarized)); - ui->longestchain->setText(QString::number(longestchain)); - ui->difficulty->setText(QString::number(difficulty)); + + if (Settings::getInstance()->get_currency_name() == "EUR") { + ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} + + else if (Settings::getInstance()->get_currency_name() == "CHF") { + ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} + + else if (Settings::getInstance()->get_currency_name() == "RUB") { + ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} + + else + ui->blockHeight->setText(QLocale(QLocale::English).toString(curBlock)); + ui->last_notarized->setText(QLocale(QLocale::English).toString(notarized)); + ui->longestchain->setText(QLocale(QLocale::English).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::English).toString(difficulty)); + + ui->halvingTime->setText( QString::number(blocks_until_halving) % " blocks, " % QString::fromStdString(halving_days) % " days" ); ui->Version->setText(QString::fromStdString(reply["version"].get())); ui->Vendor->setText(QString::fromStdString(reply["vendor"].get())); - ui->volumeExchange->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCVolume() ,'f',8)); + main->logger->write(QString("Refresh. curblock ") % QString::number(curBlock) % ", update=" % (doUpdate ? "true" : "false") ); @@ -191,49 +213,92 @@ void Controller::getInfoThenRefresh(bool force) { // use currency ComboBox as input if (Settings::getInstance()->get_currency_name() == "USD") { - main->statusLabel->setText(" HUSH/USD=$ " + QString::number( (double) Settings::getInstance()->getZECPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getUSDVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getUSDCAP() ,'f',2)); + double price = Settings::getInstance()->getZECPrice(); + double volume = Settings::getInstance()->getUSDVolume(); + double cap = Settings::getInstance()->getUSDCAP(); + main->statusLabel->setText(" HUSH/USD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "EUR") { - main->statusLabel->setText(" HUSH/EUR= " + QString::number( (double) Settings::getInstance()->getEURPrice() ,'f',2) + " €"); - ui->volumeExchange->setText(QString::number((double) Settings::getInstance()->getEURVolume() ,'f',2) + " €"); - ui->marketcapTab->setText(QString::number((double) Settings::getInstance()->getEURCAP() ,'f',2)+ " €"); + double price = Settings::getInstance()->getEURPrice(); + double volume = Settings::getInstance()->getEURVolume(); + double cap = Settings::getInstance()->getEURCAP(); + main->statusLabel->setText("HUSH/EUR "+(QLocale(QLocale::German).toString(price,'f', 2))+ " €"); + ui->volumeExchange->setText(QLocale(QLocale::German).toString(volume,'f', 2)+ " €"); + ui->marketcapTab->setText(QLocale(QLocale::German).toString(cap,'f', 2)+ " €"); + } else if (Settings::getInstance()->get_currency_name() == "BTC") { - main->statusLabel->setText(" HUSH/BTC=BTC " + QString::number((double) Settings::getInstance()->getBTCPrice() ,'f',8)); - ui->volumeExchange->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCVolume() ,'f',8)); - ui->marketcapTab->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCCAP() ,'f',8)); + double price = Settings::getInstance()->getBTCPrice(); + double volume = Settings::getInstance()->getBTCVolume(); + double cap = Settings::getInstance()->getBTCCAP(); + main->statusLabel->setText(" HUSH/BTC=BTC " + (QLocale(QLocale::English).toString(price, 'f',8))); + ui->volumeExchange->setText(" BTC " + (QLocale(QLocale::English).toString(volume, 'f',8))); + ui->marketcapTab->setText(" BTC " + (QLocale(QLocale::English).toString(cap, 'f',8))); + } else if (Settings::getInstance()->get_currency_name() == "CNY") { - main->statusLabel->setText(" HUSH/CNY=¥ /元 " + QString::number( (double) Settings::getInstance()->getCNYPrice() ,'f',2)); - ui->volumeExchange->setText(" ¥ /元 " + QString::number((double) Settings::getInstance()->getCNYVolume() ,'f',2)); - ui->marketcapTab->setText(" ¥ /元 " + QString::number((double) Settings::getInstance()->getCNYCAP() ,'f',2)); + double price = Settings::getInstance()->getCNYPrice(); + double volume = Settings::getInstance()->getCNYVolume(); + double cap = Settings::getInstance()->getCNYCAP(); + main->statusLabel->setText(" HUSH/CNY=¥ /元 " + (QLocale(QLocale::Chinese).toString(price,'f', 2))); + ui->volumeExchange->setText(" ¥ /元 " + (QLocale(QLocale::Chinese).toString(volume,'f', 2))); + ui->marketcapTab->setText(" ¥ /元 " + (QLocale(QLocale::Chinese).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "RUB") { - main->statusLabel->setText(" HUSH/RUB=₽ " + QString::number((double) Settings::getInstance()->getRUBPrice() ,'f',2)); - ui->volumeExchange->setText(" ₽ " + QString::number((double) Settings::getInstance()->getRUBVolume() ,'f',2)); - ui->marketcapTab->setText(" ₽ " + QString::number((double) Settings::getInstance()->getRUBCAP() ,'f',2)); + double price = Settings::getInstance()->getRUBPrice(); + double volume = Settings::getInstance()->getRUBVolume(); + double cap = Settings::getInstance()->getRUBCAP(); + main->statusLabel->setText(" HUSH/RUB=₽ " + (QLocale(QLocale::German).toString(price,'f', 2))); + ui->volumeExchange->setText(" ₽ " + (QLocale(QLocale::German).toString(volume,'f', 2))); + ui->marketcapTab->setText(" ₽ " + (QLocale(QLocale::German).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "CAD") { - main->statusLabel->setText(" HUSH/CAD=$ " + QString::number( (double) Settings::getInstance()->getCADPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getCADVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getCADCAP() ,'f',2)); + double price = Settings::getInstance()->getCADPrice(); + double volume = Settings::getInstance()->getCADVolume(); + double cap = Settings::getInstance()->getCADCAP(); + main->statusLabel->setText(" HUSH/CAD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "SGD") { - main->statusLabel->setText(" HUSH/SGD=$ " + QString::number((double) Settings::getInstance()->getSGDPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getSGDVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getSGDCAP() ,'f',2)); + double price = Settings::getInstance()->getSGDPrice(); + double volume = Settings::getInstance()->getSGDVolume(); + double cap = Settings::getInstance()->getSGDCAP(); + main->statusLabel->setText(" HUSH/SGD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "CHF") { - main->statusLabel->setText(" HUSH/CHF=CHF " + QString::number((double) Settings::getInstance()->getCHFPrice() ,'f',2)); - ui->volumeExchange->setText(" CHF " + QString::number((double) Settings::getInstance()->getCHFVolume() ,'f',2)); - ui->marketcapTab->setText(" CHF " + QString::number((double) Settings::getInstance()->getCHFCAP() ,'f',2)); + double price = Settings::getInstance()->getCHFPrice(); + double volume = Settings::getInstance()->getCHFVolume(); + double cap = Settings::getInstance()->getCHFCAP(); + main->statusLabel->setText(" HUSH/CHF= " + (QLocale(QLocale::German).toString(price,'f', 2))+ "CHF"); + ui->volumeExchange->setText(QLocale(QLocale::German).toString(volume,'f', 2)+ " CHF"); + ui->marketcapTab->setText(QLocale(QLocale::German).toString(cap,'f', 2)+ " CHF"); + } else if (Settings::getInstance()->get_currency_name() == "INR") { - main->statusLabel->setText(" HUSH/INR=₹ " + QString::number( (double) Settings::getInstance()->getINRPrice() ,'f',2)); - ui->volumeExchange->setText(" ₹ " + QString::number((double) Settings::getInstance()->getINRVolume() ,'f',2)); - ui->marketcapTab->setText(" ₹ " + QString::number((double) Settings::getInstance()->getINRCAP() ,'f',2)); + double price = Settings::getInstance()->getINRPrice(); + double volume = Settings::getInstance()->getINRVolume(); + double cap = Settings::getInstance()->getINRCAP(); + main->statusLabel->setText(" HUSH/INR=₹ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" ₹ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" ₹ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + } else if (Settings::getInstance()->get_currency_name() == "GBP") { - main->statusLabel->setText(" HUSH/GBP=£ " + QString::number((double) Settings::getInstance()->getGBPPrice() ,'f',2)); - ui->volumeExchange->setText(" £ " + QString::number((double) Settings::getInstance()->getGBPVolume() ,'f',2)); - ui->marketcapTab->setText(" £ " + QString::number((double) Settings::getInstance()->getRUBCAP() ,'f',2)); + double price = Settings::getInstance()->getGBPPrice(); + double volume = Settings::getInstance()->getGBPVolume(); + double cap = Settings::getInstance()->getGBPCAP(); + main->statusLabel->setText(" HUSH/GBP=£ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" £ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" £ " + (QLocale(QLocale::English).toString(cap,'f', 2))); + }else if (Settings::getInstance()->get_currency_name() == "AUD") { - main->statusLabel->setText(" HUSH/AUD=$ " + QString::number((double) Settings::getInstance()->getAUDPrice() ,'f',2)); - ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getAUDVolume() ,'f',2)); - ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getAUDCAP() ,'f',2)); + double price = Settings::getInstance()->getAUDPrice(); + double volume = Settings::getInstance()->getAUDVolume(); + double cap = Settings::getInstance()->getAUDCAP(); + main->statusLabel->setText(" HUSH/AUD=$ " + (QLocale(QLocale::English).toString(price,'f', 2))); + ui->volumeExchange->setText(" $ " + (QLocale(QLocale::English).toString(volume,'f', 2))); + ui->marketcapTab->setText(" $ " + (QLocale(QLocale::English).toString(cap,'f', 2))); } else { main->statusLabel->setText(" HUSH/USD=$" + QString::number(Settings::getInstance()->getZECPrice(),'f',2 )); @@ -253,15 +318,34 @@ void Controller::getInfoThenRefresh(bool force) { model->setEncryptionStatus(isEncrypted, isLocked); }); - + // Get the total supply and render it with thousand decimal zrpc->fetchSupply([=] (const json& reply) { int supply = reply["supply"].get(); - ui->supply_taddr->setText(QString::number(supply)); int zfunds = reply["zfunds"].get(); - ui->supply_zaddr->setText(QString::number(zfunds)); int total = reply["total"].get(); - ui->supply_total->setText(QString::number(total)); + + if (Settings::getInstance()->get_currency_name() == "EUR") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} + + else if (Settings::getInstance()->get_currency_name() == "CHF") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} + + else if (Settings::getInstance()->get_currency_name() == "RUB") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} + + else + ui->supply_taddr->setText((QLocale(QLocale::English).toString(supply))); + ui->supply_zaddr->setText((QLocale(QLocale::English).toString(zfunds))); + ui->supply_total->setText((QLocale(QLocale::English).toString(total))); + + }); if ( doUpdate ) { diff --git a/src/scripts/dotranslations.sh b/src/scripts/dotranslations.sh index 7e7ad24..5909023 100755 --- a/src/scripts/dotranslations.sh +++ b/src/scripts/dotranslations.sh @@ -11,7 +11,7 @@ $QT_STATIC/bin/lrelease silentdragon-lite.pro # Then update the qt base translations. First, get all languages ls res/*.qm | awk -F '[_.]' '{print $4}' | while read -r language ; do if [ -f $QT_STATIC/translations/qtbase_$language.qm ]; then - $QT_STATIC/bin/lconvert -o res/silentdragonlite_$language.qm $QT_STATIC/translations/qtbase_$language.qm res/silentdragonlite_$language.qm - mv res/silentdragonlite_$language.qm res/silentdragonlite_$language.qm + $QT_STATIC/bin/lconvert -o res/zec_$language.qm $QT_STATIC/translations/qtbase_$language.qm res/silentdragonlite_$language.qm + mv res/zec_$language.qm res/silentdragonlite_$language.qm fi done diff --git a/src/settings.ui b/src/settings.ui index 5f2bf52..c9cec4c 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -182,7 +182,7 @@ 10 180 - 500 + 691 16 @@ -201,7 +201,7 @@ 9 90 - 297 + 601 17 From bd4cb5aef1b7c73906e2acca7f46bc33b63ab171 Mon Sep 17 00:00:00 2001 From: Denio Date: Sun, 8 Dec 2019 12:42:52 +0100 Subject: [PATCH 4/6] fix BlockHeight format --- src/controller.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/controller.cpp b/src/controller.cpp index cdd071c..5f3b7ec 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -189,11 +189,11 @@ void Controller::getInfoThenRefresh(bool force) { ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} - else + else { ui->blockHeight->setText(QLocale(QLocale::English).toString(curBlock)); ui->last_notarized->setText(QLocale(QLocale::English).toString(notarized)); ui->longestchain->setText(QLocale(QLocale::English).toString(longestchain)); - ui->difficulty->setText(QLocale(QLocale::English).toString(difficulty)); + ui->difficulty->setText(QLocale(QLocale::English).toString(difficulty));} ui->halvingTime->setText( QString::number(blocks_until_halving) % " blocks, " % QString::fromStdString(halving_days) % " days" ); @@ -272,7 +272,7 @@ void Controller::getInfoThenRefresh(bool force) { double price = Settings::getInstance()->getCHFPrice(); double volume = Settings::getInstance()->getCHFVolume(); double cap = Settings::getInstance()->getCHFCAP(); - main->statusLabel->setText(" HUSH/CHF= " + (QLocale(QLocale::German).toString(price,'f', 2))+ "CHF"); + main->statusLabel->setText(" HUSH/CHF= " + (QLocale(QLocale::German).toString(price,'f', 2))+ " CHF"); ui->volumeExchange->setText(QLocale(QLocale::German).toString(volume,'f', 2)+ " CHF"); ui->marketcapTab->setText(QLocale(QLocale::German).toString(cap,'f', 2)+ " CHF"); @@ -340,10 +340,10 @@ void Controller::getInfoThenRefresh(bool force) { ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} - else + else{ ui->supply_taddr->setText((QLocale(QLocale::English).toString(supply))); ui->supply_zaddr->setText((QLocale(QLocale::English).toString(zfunds))); - ui->supply_total->setText((QLocale(QLocale::English).toString(total))); + ui->supply_total->setText((QLocale(QLocale::English).toString(total)));} }); From 8635a3386101fb37fd6ff87eab9bbab7af1319ed Mon Sep 17 00:00:00 2001 From: Denio Date: Sun, 8 Dec 2019 15:26:55 +0100 Subject: [PATCH 5/6] improvements to render the price --- src/camount.cpp | 4 +-- src/controller.cpp | 66 ++++++++++++++++------------------------------ src/mainwindow.ui | 24 ++++++++--------- 3 files changed, 37 insertions(+), 57 deletions(-) diff --git a/src/camount.cpp b/src/camount.cpp index f811d1c..9e78381 100644 --- a/src/camount.cpp +++ b/src/camount.cpp @@ -44,7 +44,7 @@ QString CAmount::toDecimalEURString() const { double dblAmount = static_cast(this->amount) / COIN; double price = Settings::getInstance()->getEURPrice(); - return QLocale(QLocale::English).toString(dblAmount*price, 'f', 2) + " €"; + return QLocale(QLocale::German).toString(dblAmount*price, 'f', 2) + " €"; } QString CAmount::toDecimalBTCString() const { double dblAmount = static_cast(this->amount) / COIN; @@ -80,7 +80,7 @@ QString CAmount::toDecimalCHFString() const { double dblAmount = static_cast(this->amount) / COIN; double price = Settings::getInstance()->getCHFPrice(); - return "CHF " + QLocale(QLocale::English).toString(dblAmount*price, 'f', 2); + return "CHF " + QLocale(QLocale::German).toString(dblAmount*price, 'f', 2); } QString CAmount::toDecimalINRString() const { double dblAmount = static_cast(this->amount) / COIN; diff --git a/src/controller.cpp b/src/controller.cpp index 5f3b7ec..104f01e 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -166,37 +166,28 @@ void Controller::getInfoThenRefresh(bool force) { int notarized = reply["notarized"].get(); int difficulty = reply["difficulty"].get(); int blocks_until_halving= 340000 - curBlock; - char halving_days[8]; - sprintf(halving_days, "%.2f", (double) (blocks_until_halving * 150) / (60*60*24) ); + int halving_days = + (blocks_until_halving * 150) / (60*60*24) ; bool doUpdate = force || (model->getLatestBlock() != curBlock); model->setLatestBlock(curBlock); - if (Settings::getInstance()->get_currency_name() == "EUR") { - ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); - ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); - ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); - ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} - - else if (Settings::getInstance()->get_currency_name() == "CHF") { - ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); - ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); - ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); - ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} - - else if (Settings::getInstance()->get_currency_name() == "RUB") { - ui->blockHeight->setText(QLocale(QLocale::German).toString(curBlock)); - ui->last_notarized->setText(QLocale(QLocale::German).toString(notarized)); - ui->longestchain->setText(QLocale(QLocale::German).toString(longestchain)); - ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty));} - + if (Settings::getInstance()->get_currency_name() == "EUR" || Settings::getInstance()->get_currency_name() == "CHF" || Settings::getInstance()->get_currency_name() == "RUB") { + ui->blockHeight->setText("Block: " + QLocale(QLocale::German).toString(curBlock)); + ui->last_notarized->setText("Block: " + QLocale(QLocale::German).toString(notarized)); + ui->longestchain->setText("Block: " + QLocale(QLocale::German).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::German).toString(difficulty)); + ui->halvingTime->setText((QLocale(QLocale::German).toString(blocks_until_halving)) + " Blocks or , " + (QLocale(QLocale::German).toString(halving_days) + " days" )); + } else { - ui->blockHeight->setText(QLocale(QLocale::English).toString(curBlock)); - ui->last_notarized->setText(QLocale(QLocale::English).toString(notarized)); - ui->longestchain->setText(QLocale(QLocale::English).toString(longestchain)); - ui->difficulty->setText(QLocale(QLocale::English).toString(difficulty));} + ui->blockHeight->setText("Block: " + QLocale(QLocale::English).toString(curBlock)); + ui->last_notarized->setText("Block: " + QLocale(QLocale::English).toString(notarized)); + ui->longestchain->setText("Block: " + QLocale(QLocale::English).toString(longestchain)); + ui->difficulty->setText(QLocale(QLocale::English).toString(difficulty)); + ui->halvingTime->setText((QLocale(QLocale::English).toString(blocks_until_halving)) + " Blocks or , " + (QLocale(QLocale::English).toString(halving_days) + " days" )); + + } - ui->halvingTime->setText( QString::number(blocks_until_halving) % " blocks, " % QString::fromStdString(halving_days) % " days" ); ui->Version->setText(QString::fromStdString(reply["version"].get())); ui->Vendor->setText(QString::fromStdString(reply["vendor"].get())); @@ -325,25 +316,14 @@ void Controller::getInfoThenRefresh(bool force) { int zfunds = reply["zfunds"].get(); int total = reply["total"].get(); - if (Settings::getInstance()->get_currency_name() == "EUR") { - ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); - ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); - ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} - - else if (Settings::getInstance()->get_currency_name() == "CHF") { - ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); - ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); - ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} - - else if (Settings::getInstance()->get_currency_name() == "RUB") { - ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply))); - ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds))); - ui->supply_total->setText((QLocale(QLocale::German).toString(total)));} - + if (Settings::getInstance()->get_currency_name() == "EUR" || Settings::getInstance()->get_currency_name() == "CHF" || Settings::getInstance()->get_currency_name() == "RUB") { + ui->supply_taddr->setText((QLocale(QLocale::German).toString(supply)+ " Hush")); + ui->supply_zaddr->setText((QLocale(QLocale::German).toString(zfunds)+ " Hush")); + ui->supply_total->setText((QLocale(QLocale::German).toString(total)+ " Hush"));} else{ - ui->supply_taddr->setText((QLocale(QLocale::English).toString(supply))); - ui->supply_zaddr->setText((QLocale(QLocale::English).toString(zfunds))); - ui->supply_total->setText((QLocale(QLocale::English).toString(total)));} + ui->supply_taddr->setText("Hush " + (QLocale(QLocale::English).toString(supply))); + ui->supply_zaddr->setText("Hush " +(QLocale(QLocale::English).toString(zfunds))); + ui->supply_total->setText("Hush " +(QLocale(QLocale::English).toString(total)));} }); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f8286a9..7edd54a 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1010,7 +1010,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1024,7 +1024,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1045,7 +1045,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1094,14 +1094,14 @@ - | + <html><head/><body><p align="center">|</p></body></html> - | + <html><head/><body><p align="center">|</p></body></html> @@ -1115,7 +1115,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1136,7 +1136,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1150,7 +1150,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1164,7 +1164,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1192,7 +1192,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1264,7 +1264,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> @@ -1285,7 +1285,7 @@ - | + <html><head/><body><p align="center">|</p></body></html> From 4f7017356e29180ff95f82c71c40b140d1f4bef3 Mon Sep 17 00:00:00 2001 From: Denio Date: Sun, 8 Dec 2019 15:50:58 +0100 Subject: [PATCH 6/6] change some window size on hush information tab --- src/mainwindow.ui | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 7edd54a..7bf7539 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -969,11 +969,23 @@ + + + 650 + 650 + + + + + 16777215 + 16777215 + + - - + + Qt::Vertical @@ -986,7 +998,7 @@ - + @@ -998,14 +1010,14 @@ - + Qt::Horizontal - + @@ -1219,14 +1231,14 @@ - + Qt::Horizontal - + @@ -1238,14 +1250,14 @@ - + Qt::Horizontal - + @@ -1291,21 +1303,21 @@ - + Qt::Horizontal - + - This is a Lightwallet, you cant mine with it! + <html><head/><body><p align="center">This is a Lightwallet, you cant mine with it!</p></body></html> - + Qt::Vertical