Bitcoin
Classes | Typedefs | Functions | Variables
GUIUtil Namespace Reference

Classes

class  ClickableLabel
 
class  ClickableProgressBar
 
class  ItemDelegate
 
class  TableViewLastColumnResizingFixer
 
class  ToolTipToRichTextFilter
 

Typedefs

typedef ClickableProgressBar ProgressBar
 

Functions

QString dateTimeStr (const QDateTime &date)
 
QString dateTimeStr (qint64 nTime)
 
QFont fixedPitchFont ()
 
static std::string DummyAddress (const CChainParams &params)
 
void setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent)
 
bool parseBitcoinURI (const QUrl &uri, SendCoinsRecipient *out)
 
bool parseBitcoinURI (QString uri, SendCoinsRecipient *out)
 
QString formatBitcoinURI (const SendCoinsRecipient &info)
 
bool isDust (interfaces::Node &node, const QString &address, const CAmount &amount)
 
QString HtmlEscape (const QString &str, bool fMultiLine)
 
QString HtmlEscape (const std::string &str, bool fMultiLine)
 
void copyEntryData (QAbstractItemView *view, int column, int role)
 
QList< QModelIndex > getEntryData (QAbstractItemView *view, int column)
 
QString getDefaultDataDirectory ()
 
QString getSaveFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
 
QString getOpenFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
 
Qt::ConnectionType blockingGUIThreadConnection ()
 
bool checkPoint (const QPoint &p, const QWidget *w)
 
bool isObscured (QWidget *w)
 
void bringToFront (QWidget *w)
 
void openDebugLogfile ()
 
bool openBitcoinConf ()
 
bool GetStartOnSystemStartup ()
 
bool SetStartOnSystemStartup (bool fAutoStart)
 
void setClipboard (const QString &str)
 
fs::path qstringToBoostPath (const QString &path)
 
QString boostPathToQString (const fs::path &path)
 
QString formatDurationStr (int secs)
 
QString formatServicesStr (quint64 mask)
 
QString formatPingTime (double dPingTime)
 
QString formatTimeOffset (int64_t nTimeOffset)
 
QString formatNiceTimeOffset (qint64 secs)
 
QString formatBytes (uint64_t bytes)
 
qreal calculateIdealFontSize (int width, const QString &text, QFont font, qreal minPointSize, qreal font_size)
 
void PolishProgressDialog (QProgressDialog *dialog)
 

Variables

static const uint8_t dummydata [] = {0xeb,0x15,0x23,0x1d,0xfc,0xeb,0x60,0x92,0x58,0x86,0xb6,0x7d,0x06,0x52,0x99,0x92,0x59,0x15,0xae,0xb1,0x72,0xc0,0x66,0x47}
 

Detailed Description

Utility functions used by the Bitcoin Qt UI.

Typedef Documentation

◆ ProgressBar

Function Documentation

◆ blockingGUIThreadConnection()

Qt::ConnectionType GUIUtil::blockingGUIThreadConnection ( )

Get connection type to call object slot in GUI thread with invokeMethod. The call will be blocking.

Returns
If called from the GUI thread, return a Qt::DirectConnection. If called from another thread, return a Qt::BlockingQueuedConnection.

◆ boostPathToQString()

QString GUIUtil::boostPathToQString ( const fs::path &  path)

◆ bringToFront()

void GUIUtil::bringToFront ( QWidget *  w)

◆ calculateIdealFontSize()

qreal GUIUtil::calculateIdealFontSize ( int  width,
const QString &  text,
QFont  font,
qreal  minPointSize,
qreal  font_size 
)

◆ checkPoint()

bool GUIUtil::checkPoint ( const QPoint &  p,
const QWidget *  w 
)

◆ copyEntryData()

void GUIUtil::copyEntryData ( QAbstractItemView *  view,
int  column,
int  role = Qt::EditRole 
)

Copy a field of the currently selected entry of a view to the clipboard. Does nothing if nothing is selected.

Parameters
[in]columnData column to extract from the model
[in]roleData role to extract from the model
See also
TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress

◆ dateTimeStr() [1/2]

QString GUIUtil::dateTimeStr ( const QDateTime &  date)

◆ dateTimeStr() [2/2]

QString GUIUtil::dateTimeStr ( qint64  nTime)

◆ DummyAddress()

static std::string GUIUtil::DummyAddress ( const CChainParams params)
static

◆ fixedPitchFont()

QFont GUIUtil::fixedPitchFont ( )

◆ formatBitcoinURI()

QString GUIUtil::formatBitcoinURI ( const SendCoinsRecipient info)

◆ formatBytes()

QString GUIUtil::formatBytes ( uint64_t  bytes)

◆ formatDurationStr()

QString GUIUtil::formatDurationStr ( int  secs)

◆ formatNiceTimeOffset()

QString GUIUtil::formatNiceTimeOffset ( qint64  secs)

◆ formatPingTime()

QString GUIUtil::formatPingTime ( double  dPingTime)

◆ formatServicesStr()

QString GUIUtil::formatServicesStr ( quint64  mask)

◆ formatTimeOffset()

QString GUIUtil::formatTimeOffset ( int64_t  nTimeOffset)

◆ getDefaultDataDirectory()

QString GUIUtil::getDefaultDataDirectory ( )

Determine default data directory for operating system.

◆ getEntryData()

QList< QModelIndex > GUIUtil::getEntryData ( QAbstractItemView *  view,
int  column 
)

Return a field of the currently selected entry as a QString. Does nothing if nothing is selected.

Parameters
[in]columnData column to extract from the model
See also
TransactionView::copyLabel, TransactionView::copyAmount, TransactionView::copyAddress

◆ getOpenFileName()

QString GUIUtil::getOpenFileName ( QWidget *  parent,
const QString &  caption,
const QString &  dir,
const QString &  filter,
QString *  selectedSuffixOut 
)

Get open filename, convenience wrapper for QFileDialog::getOpenFileName.

Parameters
[in]parentParent window (or 0)
[in]captionWindow caption (or empty, for default)
[in]dirStarting directory (or empty, to default to documents directory)
[in]filterFilter specification such as "Comma Separated Files (*.csv)"
[out]selectedSuffixOutPointer to return the suffix (file type) that was selected (or 0). Can be useful when choosing the save file format based on suffix.

◆ getSaveFileName()

QString GUIUtil::getSaveFileName ( QWidget *  parent,
const QString &  caption,
const QString &  dir,
const QString &  filter,
QString *  selectedSuffixOut 
)

Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when no suffix is provided by the user.

Parameters
[in]parentParent window (or 0)
[in]captionWindow caption (or empty, for default)
[in]dirStarting directory (or empty, to default to documents directory)
[in]filterFilter specification such as "Comma Separated Files (*.csv)"
[out]selectedSuffixOutPointer to return the suffix (file type) that was selected (or 0). Can be useful when choosing the save file format based on suffix.

◆ GetStartOnSystemStartup()

bool GUIUtil::GetStartOnSystemStartup ( )

◆ HtmlEscape() [1/2]

QString GUIUtil::HtmlEscape ( const QString &  str,
bool  fMultiLine 
)

◆ HtmlEscape() [2/2]

QString GUIUtil::HtmlEscape ( const std::string &  str,
bool  fMultiLine 
)

◆ isDust()

bool GUIUtil::isDust ( interfaces::Node node,
const QString &  address,
const CAmount amount 
)

◆ isObscured()

bool GUIUtil::isObscured ( QWidget *  w)

◆ openBitcoinConf()

bool GUIUtil::openBitcoinConf ( )

◆ openDebugLogfile()

void GUIUtil::openDebugLogfile ( )

◆ parseBitcoinURI() [1/2]

bool GUIUtil::parseBitcoinURI ( const QUrl &  uri,
SendCoinsRecipient out 
)

◆ parseBitcoinURI() [2/2]

bool GUIUtil::parseBitcoinURI ( QString  uri,
SendCoinsRecipient out 
)

◆ PolishProgressDialog()

void GUIUtil::PolishProgressDialog ( QProgressDialog *  dialog)

◆ qstringToBoostPath()

fs::path GUIUtil::qstringToBoostPath ( const QString &  path)

◆ setClipboard()

void GUIUtil::setClipboard ( const QString &  str)

◆ SetStartOnSystemStartup()

bool GUIUtil::SetStartOnSystemStartup ( bool  fAutoStart)

◆ setupAddressWidget()

void GUIUtil::setupAddressWidget ( QValidatedLineEdit widget,
QWidget *  parent 
)

Variable Documentation

◆ dummydata

const uint8_t GUIUtil::dummydata[] = {0xeb,0x15,0x23,0x1d,0xfc,0xeb,0x60,0x92,0x58,0x86,0xb6,0x7d,0x06,0x52,0x99,0x92,0x59,0x15,0xae,0xb1,0x72,0xc0,0x66,0x47}
static