本文整理汇总了C++中SoftSetArg函数的典型用法代码示例。如果您正苦于以下问题:C++ SoftSetArg函数的具体用法?C++ SoftSetArg怎么用?C++ SoftSetArg使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SoftSetArg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
language = settings.value("language", "").toString();
sRecurringSendEntries = settings.value("sRecurringSendEntries","").toString();
bPasswordOnSend = settings.value("bPasswordOnSend", false).toBool();
strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例2: i64_to_mpq
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", CEuroUnits::FRC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = i64_to_mpq(settings.value("nTransactionFee").toLongLong());
language = settings.value("language", "").toString();
// These are shared with core CEuro; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例3: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BSTY).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
bSpendZeroConfChange = settings.value("bSpendZeroConfChange").toBool();
language = settings.value("language", "").toString();
bStartMiningAtStartup = settings.value("bStartMiningAtStartup", false).toBool();
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例4: SoftSetArg
bool ArgsManager::SoftSetBoolArg(const std::string& strArg, bool fValue)
{
if (fValue)
return SoftSetArg(strArg, std::string("1"));
else
return SoftSetArg(strArg, std::string("0"));
}
示例5: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
nReserveBalance = settings.value("nReserveBalance").toLongLong();
language = settings.value("language", "").toString();
fUseBlackTheme = settings.value("fUseBlackTheme", true).toBool();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("fMinimizeCoinAge"))
SoftSetBoolArg("-minimizecoinage", settings.value("fMinimizeCoinAge").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例6: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::ETR).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
language = settings.value("language", "").toString();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
// Mining enabled by default in QT with 1 thread if not overriden
// by command-line options
if (settings.contains("bMiningEnabled"))
SoftSetBoolArg("-gen", settings.value("bMiningEnabled").toBool());
else
SoftSetBoolArg("-gen", true);
if (settings.contains("nMiningIntensity"))
SoftSetArg("-genproclimit", settings.value("nMiningIntensity").toString().toStdString());
else
SoftSetArg("-genproclimit", "1");
}
示例7: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
language = settings.value("language", "").toString();
fNotificationsEnabled = settings.value("fNotificationsEnabled", true).toBool();
fNotificationsOpenPageEnabled = settings.value("fNotificationsOpenPageEnabled", true).toBool();
fNotificationsOpenPageUrl = settings.value("fNotificationsOpenPageUrl",
"http://www.youtube.com/watch?v=McEoTIqoRKk").toString();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例8: SoftSetBoolArg
void OptionsModel::Reset()
{
QSettings settings;
// Remove all entries in this QSettings object
settings.clear();
// default setting for OptionsModel::StartAtStartup - disabled
if (GUIUtil::GetStartOnSystemStartup())
GUIUtil::SetStartOnSystemStartup(false);
if (settings.contains("bMiningEnabled"))
SoftSetBoolArg("-gen", settings.value("bMiningEnabled").toBool());
else
SoftSetBoolArg("-gen", false);
if (settings.contains("nMiningIntensity"))
SoftSetArg("-genproclimit", settings.value("nMiningIntensity").toString().toStdString());
else
SoftSetArg("-genproclimit", "1");
// Re-Init to get default values
Init();
// Ensure Upgrade() is not running again by setting the bImportFinished flag
settings.setValue("bImportFinished", true);
}
示例9: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", TitaniumUnits::TTN).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
language = settings.value("language", "").toString();
bStartMiningAtStartup = settings.value("bStartMiningAtStartup", false).toBool();
// These are shared with core Titanium; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
bAllowSounds = settings.value("bAllowSounds", true).toBool();
bCheckUpdatesAtStartup = settings.value("bCheckUpdatesAtStartup", false).toBool();
bCheckUpdatesAtStartup = false;
}
示例10: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
if (!settings.contains("strThirdPartyTxUrls")) {
if(fTestNet)
settings.setValue("strThirdPartyTxUrls", "");
else
settings.setValue("strThirdPartyTxUrls", "https://bitinfocharts.com/testcoin/tx/%s|https://coinplorer.com/TTC/Transactions/%s|https://explorer.novaco.in/tx/%s|https://bchain.info/TTC/tx/%s");
}
strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "https://bitinfocharts.com/testcoin/tx/%s|https://coinplorer.com/TTC/Transactions/%s|https://explorer.novaco.in/tx/%s|https://bchain.info/TTC/tx/%s").toString();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
language = settings.value("language", "").toString();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例11: SetGenerateThreads
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
if (settings.contains("nBlockRewardVote"))
nBlockRewardVote = settings.value("nBlockRewardVote").toUInt();
else
nBlockRewardVote = nBlockRewardVoteLimit/2;
if (settings.contains("bShowVotingOverview"))
bShowVotingOverview = settings.value("bShowVotingOverview").toBool();
else
bShowVotingOverview = true;
if (settings.contains("bShowSupplyOverview"))
bShowSupplyOverview = settings.value("bShowSupplyOverview").toBool();
else
bShowSupplyOverview = true;
if (settings.contains("nGenerateThreads"))
SetGenerateThreads(settings.value("nGenerateThreads").toInt());
else
SetGenerateThreads(1);
if (settings.contains("bGenerate"))
bGenerate = settings.value("bGenerate").toBool();
else
bGenerate = true;
GenerateBitcoins(bGenerate, pwalletMain);
language = settings.value("language", "").toString();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例12: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::LEO).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
nReserveBalance = settings.value("nReserveBalance").toLongLong();
language = settings.value("language", "").toString();
nRowsPerPage = settings.value("nRowsPerPage", 20).toInt();
notifications = settings.value("notifications", "*").toStringList();
visibleTransactions = settings.value("visibleTransactions", "*").toStringList();
fAutoRingSize = settings.value("fAutoRingSize", false).toBool();
fAutoRedeemLEOcoin = settings.value("fAutoRedeemLEOcoin", false).toBool();
nMinRingSize = settings.value("nMinRingSize", MIN_RING_SIZE).toInt();
nMaxRingSize = settings.value("nMaxRingSize", MAX_RING_SIZE).toInt();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
if (settings.contains("fStaking"))
SoftSetBoolArg("-staking", settings.value("fStaking").toBool());
if (settings.contains("nMinStakeInterval"))
SoftSetArg("-minstakeinterval", settings.value("nMinStakeInterval").toString().toStdString());
if (settings.contains("fSecMsgEnabled"))
SoftSetBoolArg("-nosmsg", !settings.value("fSecMsgEnabled").toBool());
if (settings.contains("fThinMode"))
SoftSetBoolArg("-thinmode", settings.value("fThinMode").toBool());
if (settings.contains("fThinFullIndex"))
SoftSetBoolArg("-thinfullindex", settings.value("fThinFullIndex").toBool());
if (settings.contains("nThinIndexWindow"))
SoftSetArg("-thinindexmax", settings.value("nThinIndexWindow").toString().toStdString());
}
示例13: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
nReserveBalance = settings.value("nReserveBalance").toLongLong();
language = settings.value("language", "").toString();
if (!settings.contains("nDarksendRounds"))
settings.setValue("nDarksendRounds", 2);
if (!settings.contains("nAnonymizePentacoinAmount"))
settings.setValue("nAnonymizePentacoinAmount", 20000);
nDarksendRounds = settings.value("nDarksendRounds").toLongLong();
nAnonymizePentacoinAmount = settings.value("nAnonymizePentacoinAmount").toLongLong();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
if (settings.contains("nDarksendRounds"))
SoftSetArg("-darksendrounds", settings.value("nDarksendRounds").toString().toStdString());
if (settings.contains("nAnonymizePentacoinAmount"))
SoftSetArg("-anonymizePentacoinamount", settings.value("nAnonymizePentacoinAmount").toString().toStdString());
}
示例14: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are Qt-only settings:
nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::BTC).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
nTransactionFee = settings.value("nTransactionFee").toLongLong();
nSoundVolume = settings.value("nSoundVolume",75).toInt();
language = settings.value("language", "").toString();
startup_sound=settings.value("SoundStartup", "startup.wav").toString();
incoming_sound=settings.value("SoundIncoming", "incoming.wav").toString();
mining_sound=settings.value("SoundMining", "mining.wav").toString();
sent_sound=settings.value("SoundSent", "coinssent.wav").toString();
sync_sound=settings.value("SoundSync", "sync.mp3").toString();
about_sound=settings.value("SoundAbout", "about.wav").toString();
bSoundStartup=settings.value("bUseStartup",true).toBool();
bSoundIncoming=settings.value("bUseIncoming",true).toBool();
bSoundMining=settings.value("bUseMining",true).toBool();
bSoundSent=settings.value("bUseSent",true).toBool();
bSoundSync=settings.value("bUseSync",true).toBool();
bSoundAbout=settings.value("bUseAbout",true).toBool();
// These are shared with core Bitcoin; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString());
if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool())
SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
if (!language.isEmpty())
SoftSetArg("-lang", language.toStdString());
}
示例15: SoftSetBoolArg
void OptionsModel::Init()
{
QSettings settings;
// These are QT-only settings:
nDisplayUnit = settings.value("nDisplayUnit", NexusUnits::Niro).toInt();
bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool();
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
Core::nTransactionFee = settings.value("nTransactionFee").toLongLong();
// These are shared with core Nexus; we want
// command-line options to override the GUI settings:
if (settings.contains("fUseUPnP"))
SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool());
if (settings.contains("Net::addrProxy") && settings.value("fUseProxy").toBool())
SoftSetArg("-proxy", settings.value("Net::addrProxy").toString().toStdString());
if (settings.contains("detachDB"))
SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool());
}