mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Coin Control Features
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
8dfd8c62dc
commit
6a86c24db1
@@ -59,6 +59,7 @@ void OptionsModel::Init()
|
||||
fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool();
|
||||
nTransactionFee = settings.value("nTransactionFee").toLongLong();
|
||||
language = settings.value("language", "").toString();
|
||||
fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
|
||||
|
||||
// These are shared with core Bitcoin; we want
|
||||
// command-line options to override the GUI settings:
|
||||
@@ -207,6 +208,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
|
||||
return QVariant(bDisplayAddresses);
|
||||
case Language:
|
||||
return settings.value("language", "");
|
||||
case CoinControlFeatures:
|
||||
return QVariant(fCoinControlFeatures);
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
@@ -275,6 +278,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
case Fee:
|
||||
nTransactionFee = value.toLongLong();
|
||||
settings.setValue("nTransactionFee", (qint64) nTransactionFee);
|
||||
emit transactionFeeChanged(nTransactionFee);
|
||||
break;
|
||||
case DisplayUnit:
|
||||
nDisplayUnit = value.toInt();
|
||||
@@ -288,6 +292,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
case Language:
|
||||
settings.setValue("language", value);
|
||||
break;
|
||||
case CoinControlFeatures: {
|
||||
fCoinControlFeatures = value.toBool();
|
||||
settings.setValue("fCoinControlFeatures", fCoinControlFeatures);
|
||||
emit coinControlFeaturesChanged(fCoinControlFeatures);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -302,6 +312,11 @@ qint64 OptionsModel::getTransactionFee()
|
||||
return (qint64) nTransactionFee;
|
||||
}
|
||||
|
||||
bool OptionsModel::getCoinControlFeatures()
|
||||
{
|
||||
return fCoinControlFeatures;
|
||||
}
|
||||
|
||||
bool OptionsModel::getProxySettings(QString& proxyIP, quint16 &proxyPort) const
|
||||
{
|
||||
std::string proxy = GetArg("-proxy", "");
|
||||
|
||||
Reference in New Issue
Block a user