Bitcoin Core  21.99.0
P2P Digital Currency
Public Types | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
OptionsModel Class Reference

Interface from Qt to configuration data structure for Bitcoin client. More...

#include <optionsmodel.h>

Inheritance diagram for OptionsModel:
[legend]
Collaboration diagram for OptionsModel:
[legend]

Public Types

enum  OptionID {
  StartAtStartup, ShowTrayIcon, MinimizeToTray, MapPortUPnP,
  MapPortNatpmp, MinimizeOnClose, ProxyUse, ProxyIP,
  ProxyPort, ProxyUseTor, ProxyIPTor, ProxyPortTor,
  DisplayUnit, ThirdPartyTxUrls, Language, UseEmbeddedMonospacedFont,
  CoinControlFeatures, ThreadsScriptVerif, Prune, PruneSize,
  DatabaseCache, ExternalSignerPath, SpendZeroConfChange, Listen,
  OptionIDRowCount
}
 

Signals

void displayUnitChanged (int unit)
 
void coinControlFeaturesChanged (bool)
 
void showTrayIconChanged (bool)
 
void useEmbeddedMonospacedFontChanged (bool)
 

Public Member Functions

 OptionsModel (QObject *parent=nullptr, bool resetSettings=false)
 
void Init (bool resetSettings=false)
 
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
 
void setDisplayUnit (const QVariant &value)
 Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal. More...
 
bool getShowTrayIcon () const
 
bool getMinimizeToTray () const
 
bool getMinimizeOnClose () const
 
int getDisplayUnit () const
 
QString getThirdPartyTxUrls () const
 
bool getUseEmbeddedMonospacedFont () const
 
bool getCoinControlFeatures () const
 
const QString & getOverriddenByCommandLine ()
 
void SetPruneEnabled (bool prune, bool force=false)
 
void SetPruneTargetGB (int prune_target_gb, bool force=false)
 
void setRestartRequired (bool fRequired)
 
bool isRestartRequired () const
 
interfaces::Nodenode () const
 
void setNode (interfaces::Node &node)
 

Private Member Functions

void addOverriddenOption (const std::string &option)
 
void checkAndMigrate ()
 

Private Attributes

interfaces::Nodem_node = nullptr
 
bool m_show_tray_icon
 
bool fMinimizeToTray
 
bool fMinimizeOnClose
 
QString language
 
int nDisplayUnit
 
QString strThirdPartyTxUrls
 
bool m_use_embedded_monospaced_font
 
bool fCoinControlFeatures
 
QString strOverriddenByCommandLine
 

Detailed Description

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 39 of file optionsmodel.h.

Member Enumeration Documentation

◆ OptionID

Enumerator
StartAtStartup 
ShowTrayIcon 
MinimizeToTray 
MapPortUPnP 
MapPortNatpmp 
MinimizeOnClose 
ProxyUse 
ProxyIP 
ProxyPort 
ProxyUseTor 
ProxyIPTor 
ProxyPortTor 
DisplayUnit 
ThirdPartyTxUrls 
Language 
UseEmbeddedMonospacedFont 
CoinControlFeatures 
ThreadsScriptVerif 
Prune 
PruneSize 
DatabaseCache 
ExternalSignerPath 
SpendZeroConfChange 
Listen 
OptionIDRowCount 

Definition at line 46 of file optionsmodel.h.

Constructor & Destructor Documentation

◆ OptionsModel()

OptionsModel::OptionsModel ( QObject *  parent = nullptr,
bool  resetSettings = false 
)
explicit

Definition at line 32 of file optionsmodel.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addOverriddenOption()

void OptionsModel::addOverriddenOption ( const std::string &  option)
private

Definition at line 38 of file optionsmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkAndMigrate()

void OptionsModel::checkAndMigrate ( )
private

Definition at line 554 of file optionsmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coinControlFeaturesChanged

void OptionsModel::coinControlFeaturesChanged ( bool  )
signal
Here is the caller graph for this function:

◆ data()

QVariant OptionsModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 289 of file optionsmodel.cpp.

Here is the call graph for this function:

◆ displayUnitChanged

void OptionsModel::displayUnitChanged ( int  unit)
signal
Here is the caller graph for this function:

◆ getCoinControlFeatures()

bool OptionsModel::getCoinControlFeatures ( ) const
inline

Definition at line 90 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getDisplayUnit()

int OptionsModel::getDisplayUnit ( ) const
inline

Definition at line 87 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getMinimizeOnClose()

bool OptionsModel::getMinimizeOnClose ( ) const
inline

Definition at line 86 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getMinimizeToTray()

bool OptionsModel::getMinimizeToTray ( ) const
inline

Definition at line 85 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getOverriddenByCommandLine()

const QString& OptionsModel::getOverriddenByCommandLine ( )
inline

Definition at line 91 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getShowTrayIcon()

bool OptionsModel::getShowTrayIcon ( ) const
inline

Definition at line 84 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getThirdPartyTxUrls()

QString OptionsModel::getThirdPartyTxUrls ( ) const
inline

Definition at line 88 of file optionsmodel.h.

Here is the caller graph for this function:

◆ getUseEmbeddedMonospacedFont()

bool OptionsModel::getUseEmbeddedMonospacedFont ( ) const
inline

Definition at line 89 of file optionsmodel.h.

Here is the caller graph for this function:

◆ Init()

void OptionsModel::Init ( bool  resetSettings = false)

Definition at line 44 of file optionsmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRestartRequired()

bool OptionsModel::isRestartRequired ( ) const

Definition at line 548 of file optionsmodel.cpp.

Here is the caller graph for this function:

◆ node()

interfaces::Node& OptionsModel::node ( ) const
inline

Definition at line 101 of file optionsmodel.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

void OptionsModel::Reset ( )

Definition at line 201 of file optionsmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rowCount()

int OptionsModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 226 of file optionsmodel.cpp.

◆ setData()

bool OptionsModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

Definition at line 367 of file optionsmodel.cpp.

Here is the call graph for this function:

◆ setDisplayUnit()

void OptionsModel::setDisplayUnit ( const QVariant &  value)

Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal.

Definition at line 531 of file optionsmodel.cpp.

Here is the caller graph for this function:

◆ setNode()

void OptionsModel::setNode ( interfaces::Node node)
inline

Definition at line 102 of file optionsmodel.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPruneEnabled()

void OptionsModel::SetPruneEnabled ( bool  prune,
bool  force = false 
)

Definition at line 263 of file optionsmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetPruneTargetGB()

void OptionsModel::SetPruneTargetGB ( int  prune_target_gb,
bool  force = false 
)

Definition at line 278 of file optionsmodel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRestartRequired()

void OptionsModel::setRestartRequired ( bool  fRequired)

Definition at line 542 of file optionsmodel.cpp.

Here is the caller graph for this function:

◆ showTrayIconChanged

void OptionsModel::showTrayIconChanged ( bool  )
signal
Here is the caller graph for this function:

◆ useEmbeddedMonospacedFontChanged

void OptionsModel::useEmbeddedMonospacedFontChanged ( bool  )
signal
Here is the caller graph for this function:

Member Data Documentation

◆ fCoinControlFeatures

bool OptionsModel::fCoinControlFeatures
private

Definition at line 114 of file optionsmodel.h.

◆ fMinimizeOnClose

bool OptionsModel::fMinimizeOnClose
private

Definition at line 109 of file optionsmodel.h.

◆ fMinimizeToTray

bool OptionsModel::fMinimizeToTray
private

Definition at line 108 of file optionsmodel.h.

◆ language

QString OptionsModel::language
private

Definition at line 110 of file optionsmodel.h.

◆ m_node

interfaces::Node* OptionsModel::m_node = nullptr
private

Definition at line 105 of file optionsmodel.h.

◆ m_show_tray_icon

bool OptionsModel::m_show_tray_icon
private

Definition at line 107 of file optionsmodel.h.

◆ m_use_embedded_monospaced_font

bool OptionsModel::m_use_embedded_monospaced_font
private

Definition at line 113 of file optionsmodel.h.

◆ nDisplayUnit

int OptionsModel::nDisplayUnit
private

Definition at line 111 of file optionsmodel.h.

◆ strOverriddenByCommandLine

QString OptionsModel::strOverriddenByCommandLine
private

Definition at line 116 of file optionsmodel.h.

◆ strThirdPartyTxUrls

QString OptionsModel::strThirdPartyTxUrls
private

Definition at line 112 of file optionsmodel.h.


The documentation for this class was generated from the following files: