Bitcoin Core 28.99.0
P2P Digital Currency
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
Intro Class Reference

Introduction screen (pre-GUI startup). More...

#include <intro.h>

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

Public Slots

void setStatus (int status, const QString &message, quint64 bytesAvailable)
 

Signals

void requestCheck ()
 

Public Member Functions

 Intro (QWidget *parent=nullptr, int64_t blockchain_size_gb=0, int64_t chain_state_size_gb=0)
 
 ~Intro ()
 
QString getDataDirectory ()
 
void setDataDirectory (const QString &dataDir)
 
int64_t getPruneMiB () const
 

Static Public Member Functions

static bool showIfNeeded (bool &did_show_intro, int64_t &prune_MiB)
 Determine data directory. More...
 

Private Slots

void on_dataDirectory_textChanged (const QString &arg1)
 
void on_ellipsisButton_clicked ()
 
void on_dataDirDefault_clicked ()
 
void on_dataDirCustom_clicked ()
 

Private Member Functions

void startThread ()
 
void checkPath (const QString &dataDir)
 
QString getPathToCheck ()
 
void UpdatePruneLabels (bool prune_checked)
 
void UpdateFreeSpaceLabel ()
 

Private Attributes

Ui::Intro * ui
 
bool m_prune_checkbox_is_default {true}
 
QThread * thread {nullptr}
 
QMutex mutex
 
bool signalled {false}
 
QString pathToCheck
 
const int64_t m_blockchain_size_gb
 
const int64_t m_chain_state_size_gb
 
int64_t m_required_space_gb {0}
 Total required space (in GB) depending on user choice (prune or not prune). More...
 
uint64_t m_bytes_available {0}
 
int64_t m_prune_target_gb
 

Friends

class FreespaceChecker
 

Detailed Description

Introduction screen (pre-GUI startup).

Allows the user to choose a data directory, in which the wallet and block chain will be stored.

Definition at line 28 of file intro.h.

Constructor & Destructor Documentation

◆ Intro()

Intro::Intro ( QWidget *  parent = nullptr,
int64_t  blockchain_size_gb = 0,
int64_t  chain_state_size_gb = 0 
)
explicit

Definition at line 122 of file intro.cpp.

Here is the call graph for this function:

◆ ~Intro()

Intro::~Intro ( )

Definition at line 167 of file intro.cpp.

Member Function Documentation

◆ checkPath()

void Intro::checkPath ( const QString &  dataDir)
private

Definition at line 353 of file intro.cpp.

Here is the caller graph for this function:

◆ getDataDirectory()

QString Intro::getDataDirectory ( )

Definition at line 175 of file intro.cpp.

Here is the caller graph for this function:

◆ getPathToCheck()

QString Intro::getPathToCheck ( )
private

Definition at line 365 of file intro.cpp.

Here is the caller graph for this function:

◆ getPruneMiB()

int64_t Intro::getPruneMiB ( ) const

Definition at line 195 of file intro.cpp.

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

◆ on_dataDirCustom_clicked

void Intro::on_dataDirCustom_clicked ( )
privateslot

Definition at line 333 of file intro.cpp.

◆ on_dataDirDefault_clicked

void Intro::on_dataDirDefault_clicked ( )
privateslot

Definition at line 328 of file intro.cpp.

Here is the call graph for this function:

◆ on_dataDirectory_textChanged

void Intro::on_dataDirectory_textChanged ( const QString &  arg1)
privateslot

Definition at line 314 of file intro.cpp.

Here is the call graph for this function:

◆ on_ellipsisButton_clicked

void Intro::on_ellipsisButton_clicked ( )
privateslot

Definition at line 321 of file intro.cpp.

◆ requestCheck

void Intro::requestCheck ( )
signal
Here is the caller graph for this function:

◆ setDataDirectory()

void Intro::setDataDirectory ( const QString &  dataDir)

Definition at line 180 of file intro.cpp.

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

◆ setStatus

void Intro::setStatus ( int  status,
const QString &  message,
quint64  bytesAvailable 
)
slot

Definition at line 271 of file intro.cpp.

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

◆ showIfNeeded()

bool Intro::showIfNeeded ( bool &  did_show_intro,
int64_t &  prune_MiB 
)
static

Determine data directory.

Let the user choose if the current one doesn't exist. Let the user configure additional preferences such as pruning.

Returns
true if a data directory was selected, false if the user cancelled the selection dialog.
Note
do NOT call global gArgs.GetDataDirNet() before calling this function, this will cause the wrong path to be cached.

Definition at line 205 of file intro.cpp.

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

◆ startThread()

void Intro::startThread ( )
private

Definition at line 339 of file intro.cpp.

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

◆ UpdateFreeSpaceLabel()

void Intro::UpdateFreeSpaceLabel ( )
private

Definition at line 299 of file intro.cpp.

Here is the caller graph for this function:

◆ UpdatePruneLabels()

void Intro::UpdatePruneLabels ( bool  prune_checked)
private

Definition at line 375 of file intro.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ FreespaceChecker

friend class FreespaceChecker
friend

Definition at line 85 of file intro.h.

Member Data Documentation

◆ m_blockchain_size_gb

const int64_t Intro::m_blockchain_size_gb
private

Definition at line 72 of file intro.h.

◆ m_bytes_available

uint64_t Intro::m_bytes_available {0}
private

Definition at line 76 of file intro.h.

◆ m_chain_state_size_gb

const int64_t Intro::m_chain_state_size_gb
private

Definition at line 73 of file intro.h.

◆ m_prune_checkbox_is_default

bool Intro::m_prune_checkbox_is_default {true}
private

Definition at line 67 of file intro.h.

◆ m_prune_target_gb

int64_t Intro::m_prune_target_gb
private

Definition at line 77 of file intro.h.

◆ m_required_space_gb

int64_t Intro::m_required_space_gb {0}
private

Total required space (in GB) depending on user choice (prune or not prune).

Definition at line 75 of file intro.h.

◆ mutex

QMutex Intro::mutex
private

Definition at line 69 of file intro.h.

◆ pathToCheck

QString Intro::pathToCheck
private

Definition at line 71 of file intro.h.

◆ signalled

bool Intro::signalled {false}
private

Definition at line 70 of file intro.h.

◆ thread

QThread* Intro::thread {nullptr}
private

Definition at line 68 of file intro.h.

◆ ui

Ui::Intro* Intro::ui
private

Definition at line 66 of file intro.h.


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