Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
optionsmodel.cpp
Go to the documentation of this file.
44 strOverriddenByCommandLine += QString::fromStdString(option) + "=" + QString::fromStdString(gArgs.GetArg(option, "")) + " ";
98 settings.setValue("fontWeightNormal", GUIUtil::weightToArg(GUIUtil::getFontWeightNormalDefault()));
99 if (!gArgs.SoftSetArg("-font-weight-normal", settings.value("fontWeightNormal").toString().toStdString()))
104 if (!gArgs.SoftSetArg("-font-weight-bold", settings.value("fontWeightBold").toString().toStdString()))
119 if (!gArgs.SoftSetBoolArg("-enableprivatesend", settings.value("fPrivateSendEnabled").toBool())) {
157 if (!gArgs.SoftSetBoolArg("-spendzeroconfchange", settings.value("bSpendZeroConfChange").toBool()))
163 if (!gArgs.SoftSetArg("-privatesendrounds", settings.value("nPrivateSendRounds").toString().toStdString()))
174 if (!gArgs.SoftSetArg("-privatesendamount", settings.value("nPrivateSendAmount").toString().toStdString()))
180 if (!gArgs.SoftSetBoolArg("-privatesendmultisession", settings.value("fPrivateSendMultiSession").toBool()))
182 privateSendClient.fPrivateSendMultiSession = settings.value("fPrivateSendMultiSession").toBool();
201 if (settings.value("fUseProxy").toBool() && !gArgs.SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()))
211 if (settings.value("fUseSeparateProxyTor").toBool() && !gArgs.SoftSetArg("-onion", settings.value("addrSeparateProxyTor").toString().toStdString()))
213 else if(!settings.value("fUseSeparateProxyTor").toBool() && !gArgs.GetArg("-onion", "").empty())
272 static const ProxySetting default_val = {false, DEFAULT_GUI_PROXY_HOST, QString("%1").arg(DEFAULT_GUI_PROXY_PORT)};
286 static void SetProxySetting(QSettings &settings, const QString &name, const ProxySetting &ip_port)
676 int settingsVersion = settings.contains(strSettingsVersionKey) ? settings.value(strSettingsVersionKey).toInt() : 0;
682 if (settingsVersion < 130000 && settings.contains("nDatabaseCache") && settings.value("nDatabaseCache").toLongLong() == 100)
696 if (settings.contains("addrSeparateProxyTor") && settings.value("addrSeparateProxyTor").toString().endsWith("%2")) {
Definition: optionsmodel.h:62
static const int DEFAULT_SCRIPTCHECK_THREADS
-par default (number of script-checking threads, 0 = auto)
Definition: validation.h:85
bool weightFromArg(int nArg, QFont::Weight &weight)
Convert weight value from args (0-8) to QFont::Weight.
Definition: guiutil.cpp:1313
FontFamily getFontFamilyDefault()
set/get font family: GUIUtil::fontFamily
Definition: guiutil.cpp:1303
Definition: optionsmodel.h:59
int weightToArg(const QFont::Weight weight)
Convert QFont::Weight to an arg value (0-8)
Definition: guiutil.cpp:1334
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Definition: optionsmodel.cpp:399
static void BackupSettings(const fs::path &filename, const QSettings &src)
Back up a QSettings to an ini-formatted file.
Definition: optionsmodel.cpp:236
QFont::Weight supportedWeightFromIndex(int nIndex)
Convert an index to a weight in the supported weights vector.
Definition: guiutil.cpp:1751
void addOverriddenOption(const std::string &option)
Definition: optionsmodel.cpp:42
Definition: optionsmodel.h:44
void hideTrayIconChanged(bool)
Definition: optionsmodel.h:46
bool SoftSetBoolArg(const std::string &strArg, bool fValue)
Set a boolean argument if it doesn't already have a value.
Definition: util.cpp:840
Definition: optionsmodel.h:37
bool getProxySettings(QNetworkProxy &proxy) const
Definition: optionsmodel.cpp:635
Definition: optionsmodel.h:65
Definition: netaddress.h:24
static void CopySettings(QSettings &dst, const QSettings &src)
Helper function to copy contents from one QSettings to another.
Definition: optionsmodel.cpp:228
static const int DEFAULT_PRIVATESEND_AMOUNT
Definition: privatesend-client.h:31
QFont::Weight getFontWeightNormalDefault()
set/get normal font weight: GUIUtil::fontWeightNormal
Definition: guiutil.cpp:1351
void coinControlFeaturesChanged(bool)
Definition: optionsmodel.h:66
Definition: optionsmodel.h:40
Definition: optionsmodel.h:55
QFont::Weight getFontWeightBoldDefault()
set/get bold font weight: GUIUtil::fontWeightBold
Definition: guiutil.cpp:1372
Definition: bitcoinunits.h:60
bool SoftSetArg(const std::string &strArg, const std::string &strValue)
Set an argument if it doesn't already have a value.
Definition: util.cpp:832
Definition: optionsmodel.h:38
std::string ToStringIP(bool fUseGetnameinfo=true) const
Definition: netaddress.cpp:261
Definition: optionsmodel.h:35
Definition: netbase.h:29
Definition: optionsmodel.h:63
int nPrivateSendAmount
Definition: privatesend-client.h:210
void privateSentAmountChanged()
Definition: optionsmodel.cpp:264
static const int DEFAULT_PRIVATESEND_ROUNDS
Definition: privatesend-client.h:30
void setDisplayUnit(const QVariant &value)
Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal.
Definition: optionsmodel.cpp:624
Definition: optionsmodel.h:47
Definition: optionsmodel.h:33
OptionsModel(QObject *parent=0, bool resetSettings=false)
Definition: optionsmodel.cpp:36
QString fontFamilyToString(FontFamily family)
Definition: guiutil.cpp:1284
Definition: optionsmodel.h:41
Definition: optionsmodel.h:34
Definition: optionsmodel.h:43
int supportedWeightToIndex(QFont::Weight weight)
Convert a weight to an index in the supported weights vector.
Definition: guiutil.cpp:1758
void privateSendEnabledChanged()
Definition: optionsmodel.h:42
void displayUnitChanged(int unit)
Definition: optionsmodel.h:45
void advancedPSUIChanged(bool)
Definition: optionsmodel.h:39
Definition: optionsmodel.h:51
Definition: optionsmodel.h:48
void setRestartRequired(bool fRequired)
Definition: optionsmodel.cpp:658
Definition: optionsmodel.h:52
Definition: optionsmodel.h:36
int nPrivateSendRounds
Definition: privatesend-client.h:208
Definition: optionsmodel.h:50
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: optionsmodel.cpp:297
std::string GetArg(const std::string &strArg, const std::string &strDefault) const
Return string argument or default value.
Definition: util.cpp:808
void emitPrivateSendEnabledChanged()
Definition: optionsmodel.cpp:653
Definition: optionsmodel.h:49
bool SetStartOnSystemStartup(bool fAutoStart)
Definition: guiutil.cpp:1104
bool fPrivateSendMultiSession
Definition: privatesend-client.h:215
QString boostPathToQString(const fs::path &path)
Definition: guiutil.cpp:1828
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: optionsmodel.cpp:259
static ProxySetting GetProxySetting(QSettings &settings, const QString &name)
Definition: optionsmodel.cpp:270
static const int CLIENT_VERSION
dashd-res.rc includes this file, but it cannot cope with real c++ code.
Definition: clientversion.h:38
void privateSendRoundsChanged()
static const bool DEFAULT_PRIVATESEND_MULTISESSION
Definition: privatesend-client.h:36
static constexpr unsigned short DEFAULT_GUI_PROXY_PORT
Definition: optionsmodel.h:17
QString strOverriddenByCommandLine
Definition: optionsmodel.h:106
static void SetProxySetting(QSettings &settings, const QString &name, const ProxySetting &ip_port)
Definition: optionsmodel.cpp:286
Definition: optionsmodel.h:61