Bitcoin Core 28.99.0
P2P Digital Currency
|
Interface from Qt to configuration data structure for Bitcoin client. More...
#include <optionsmodel.h>
Public Types | |
enum | OptionID { StartAtStartup , ShowTrayIcon , MinimizeToTray , MapPortNatpmp , MinimizeOnClose , ProxyUse , ProxyIP , ProxyPort , ProxyUseTor , ProxyIPTor , ProxyPortTor , DisplayUnit , ThirdPartyTxUrls , Language , FontForMoney , CoinControlFeatures , SubFeeFromAmount , ThreadsScriptVerif , Prune , PruneSize , DatabaseCache , ExternalSignerPath , SpendZeroConfChange , Listen , Server , EnablePSBTControls , MaskValues , OptionIDRowCount } |
enum class | FontChoiceAbstract { EmbeddedFont , BestSystemFont } |
typedef std::variant< FontChoiceAbstract, QFont > | FontChoice |
Signals | |
void | displayUnitChanged (BitcoinUnit unit) |
void | coinControlFeaturesChanged (bool) |
void | showTrayIconChanged (bool) |
void | fontForMoneyChanged (const QFont &) |
Public Member Functions | |
OptionsModel (interfaces::Node &node, QObject *parent=nullptr) | |
bool | Init (bilingual_str &error) |
void | Reset () |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
QVariant | getOption (OptionID option, const std::string &suffix="") const |
bool | setOption (OptionID option, const QVariant &value, const std::string &suffix="") |
void | setDisplayUnit (const QVariant &new_unit) |
Updates current unit in memory, settings and emits displayUnitChanged(new_unit) signal. More... | |
bool | getShowTrayIcon () const |
bool | getMinimizeToTray () const |
bool | getMinimizeOnClose () const |
BitcoinUnit | getDisplayUnit () const |
QString | getThirdPartyTxUrls () const |
QFont | getFontForMoney () const |
bool | getCoinControlFeatures () const |
bool | getSubFeeFromAmount () const |
bool | getEnablePSBTControls () const |
const QString & | getOverriddenByCommandLine () |
bool | hasSigner () |
Whether -signer was set or not. More... | |
void | SetPruneTargetGB (int prune_target_gb) |
void | setRestartRequired (bool fRequired) |
bool | isRestartRequired () const |
interfaces::Node & | node () const |
Static Public Member Functions | |
static QFont | getFontForChoice (const FontChoice &fc) |
Static Public Attributes | |
static const FontChoice | UseBestSystemFont {FontChoiceAbstract::BestSystemFont} |
Private Member Functions | |
void | addOverriddenOption (const std::string &option) |
void | checkAndMigrate () |
Static Private Member Functions | |
static QString | FontChoiceToString (const OptionsModel::FontChoice &) |
static FontChoice | FontChoiceFromString (const QString &) |
Private Attributes | |
interfaces::Node & | m_node |
bool | m_show_tray_icon |
bool | fMinimizeToTray |
bool | fMinimizeOnClose |
QString | language |
BitcoinUnit | m_display_bitcoin_unit |
QString | strThirdPartyTxUrls |
FontChoice | m_font_money {FontChoiceAbstract::EmbeddedFont} |
bool | fCoinControlFeatures |
bool | m_sub_fee_from_amount |
bool | m_enable_psbt_controls |
bool | m_mask_values |
QString | strOverriddenByCommandLine |
Interface from Qt to configuration data structure for Bitcoin client.
To Qt, the options are presented as a list with the different options laid out vertically. This can be changed to a tree once the settings become sufficiently complex.
Definition at line 42 of file optionsmodel.h.
typedef std::variant<FontChoiceAbstract, QFont> OptionsModel::FontChoice |
Definition at line 84 of file optionsmodel.h.
|
strong |
Enumerator | |
---|---|
EmbeddedFont | |
BestSystemFont |
Definition at line 80 of file optionsmodel.h.
Definition at line 49 of file optionsmodel.h.
|
explicit |
Definition at line 150 of file optionsmodel.cpp.
|
private |
Definition at line 155 of file optionsmodel.cpp.
|
private |
Definition at line 723 of file optionsmodel.cpp.
|
signal |
|
override |
Definition at line 378 of file optionsmodel.cpp.
|
signal |
|
staticprivate |
|
staticprivate |
|
signal |
|
inline |
|
inline |
|
inline |
|
static |
Definition at line 487 of file optionsmodel.cpp.
QFont OptionsModel::getFontForMoney | ( | ) | const |
Definition at line 499 of file optionsmodel.cpp.
|
inline |
|
inline |
QVariant OptionsModel::getOption | ( | OptionID | option, |
const std::string & | suffix = "" |
||
) | const |
Definition at line 402 of file optionsmodel.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
bool OptionsModel::hasSigner | ( | ) |
Whether -signer was set or not.
Definition at line 718 of file optionsmodel.cpp.
bool OptionsModel::Init | ( | bilingual_str & | error | ) |
Definition at line 161 of file optionsmodel.cpp.
bool OptionsModel::isRestartRequired | ( | ) | const |
|
inline |
void OptionsModel::Reset | ( | ) |
Definition at line 282 of file optionsmodel.cpp.
|
override |
Definition at line 310 of file optionsmodel.cpp.
|
override |
Definition at line 388 of file optionsmodel.cpp.
void OptionsModel::setDisplayUnit | ( | const QVariant & | new_unit | ) |
Updates current unit in memory, settings and emits displayUnitChanged(new_unit) signal.
Definition at line 697 of file optionsmodel.cpp.
bool OptionsModel::setOption | ( | OptionID | option, |
const QVariant & | value, | ||
const std::string & | suffix = "" |
||
) |
Definition at line 505 of file optionsmodel.cpp.
void OptionsModel::SetPruneTargetGB | ( | int | prune_target_gb | ) |
Definition at line 351 of file optionsmodel.cpp.
void OptionsModel::setRestartRequired | ( | bool | fRequired | ) |
|
signal |
|
private |
Definition at line 133 of file optionsmodel.h.
|
private |
Definition at line 128 of file optionsmodel.h.
|
private |
Definition at line 127 of file optionsmodel.h.
|
private |
Definition at line 129 of file optionsmodel.h.
|
private |
Definition at line 130 of file optionsmodel.h.
|
private |
Definition at line 135 of file optionsmodel.h.
|
private |
Definition at line 132 of file optionsmodel.h.
|
private |
Definition at line 136 of file optionsmodel.h.
|
private |
Definition at line 124 of file optionsmodel.h.
|
private |
Definition at line 126 of file optionsmodel.h.
|
private |
Definition at line 134 of file optionsmodel.h.
|
private |
Definition at line 139 of file optionsmodel.h.
|
private |
Definition at line 131 of file optionsmodel.h.
|
inlinestatic |
Definition at line 85 of file optionsmodel.h.