merge and updates

This commit is contained in:
DenioD
2019-10-27 19:46:36 +01:00
35 changed files with 661 additions and 1253 deletions

View File

@@ -2,12 +2,10 @@
#define SETTINGS_H
#include "precompiled.h"
#include "camount.h"
struct Config {
QString host;
QString port;
QString rpcuser;
QString rpcpassword;
QString server;
};
struct ToFields;
@@ -29,7 +27,7 @@ public:
static Settings* getInstance();
Config getSettings();
void saveSettings(const QString& host, const QString& port, const QString& username, const QString& password);
void saveSettings(const QString& server);
bool isTestnet();
void setTestnet(bool isTestnet);
@@ -54,15 +52,6 @@ public:
int getBlockNumber();
void setBlockNumber(int number);
bool getSaveZtxs();
void setSaveZtxs(bool save);
bool getAutoShield();
void setAutoShield(bool allow);
bool getAllowCustomFees();
void setAllowCustomFees(bool allow);
bool getAllowFetchPrices();
void setAllowFetchPrices(bool allow);
@@ -74,15 +63,9 @@ public:
bool isSaplingActive();
void setUsinghushConf(QString confLocation);
const QString& gethushdConfLocation() { return _confLocation; }
void sethushPrice(double p) { hushPrice = p; }
double gethushPrice();
void setPeers(int peers);
int getPeers();
// Static stuff
static const QString txidStatusMessage;
@@ -98,27 +81,18 @@ public:
static bool isZAddress(QString addr);
static bool isTAddress(QString addr);
static QString getDecimalString(double amt);
static QString getUSDFormat(double bal);
static QString gethushDisplayFormat(double bal);
static QString gethushUSDDisplayFormat(double bal);
static QString getTokenName();
static QString getDonationAddr();
static double getMinerFee();
static double getZboardAmount();
static QString getZboardAddr();
static QString getDefaultServer();
static CAmount getMinerFee();
static int getMaxMobileAppTxns() { return 30; }
static int getNumberOfDecimalPlaces() {return 8;}
static bool isValidAddress(QString addr);
static bool addTohushConf(QString confLocation, QString line);
static bool removeFromhushConf(QString confLocation, QString option);
static QString getChainName() { return QString("main"); }
static const QString labelRegExp;
@@ -134,7 +108,6 @@ private:
static Settings* instance;
QString _confLocation;
QString _executable;
bool _isTestnet = false;
bool _isSyncing = false;
@@ -142,7 +115,6 @@ private:
int _hushdVersion = 0;
bool _useEmbedded = false;
bool _headless = false;
int _peerConnections = 0;
double hushPrice = 0.0;
};