Bitcoin Core  0.15.99
P2P Digital Currency
Classes | Typedefs | Functions
GUIUtil Namespace Reference

Utility functions used by the Bitcoin Qt UI. More...

Classes

class  ClickableLabel
 
class  ClickableProgressBar
 
class  TableViewLastColumnResizingFixer
 Makes a QTableView last column feel as if it was being resized from its left border. More...
 
class  ToolTipToRichTextFilter
 Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed. More...
 

Typedefs

typedef ClickableProgressBar ProgressBar
 

Functions

QString dateTimeStr (const QDateTime &date)
 
QString dateTimeStr (qint64 nTime)
 
QFont fixedPitchFont ()
 
void setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent)
 
void setupAmountWidget (QLineEdit *widget, QWidget *parent)
 
bool parseBitcoinURI (const QUrl &uri, SendCoinsRecipient *out)
 
bool parseBitcoinURI (QString uri, SendCoinsRecipient *out)
 
QString formatBitcoinURI (const SendCoinsRecipient &info)
 
bool isDust (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=Qt::EditRole)
 Copy a field of the currently selected entry of a view to the clipboard. More...
 
QList< QModelIndex > getEntryData (QAbstractItemView *view, int column)
 Return a field of the currently selected entry as a QString. More...
 
QString 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. More...
 
QString getOpenFileName (QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
 Get open filename, convenience wrapper for QFileDialog::getOpenFileName. More...
 
Qt::ConnectionType blockingGUIThreadConnection ()
 Get connection type to call object slot in GUI thread with invokeMethod. More...
 
bool checkPoint (const QPoint &p, const QWidget *w)
 
bool isObscured (QWidget *w)
 
void openDebugLogfile ()
 
bool openBitcoinConf ()
 
void SubstituteFonts (const QString &language)
 
bool GetStartOnSystemStartup ()
 
bool SetStartOnSystemStartup (bool fAutoStart)
 
void saveWindowGeometry (const QString &strSetting, QWidget *parent)
 Save window size and position. More...
 
void restoreWindowGeometry (const QString &strSetting, const QSize &defaultSizeIn, QWidget *parent)
 Restore window size and position. More...
 
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)
 

Detailed Description

Utility functions used by the Bitcoin Qt UI.

Typedef Documentation

Definition at line 244 of file guiutil.h.

Function Documentation

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.

Definition at line 382 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 902 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 394 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 277 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString GUIUtil::dateTimeStr ( const QDateTime &  date)

Definition at line 80 of file guiutil.cpp.

Here is the caller graph for this function:

QString GUIUtil::dateTimeStr ( qint64  nTime)

Definition at line 85 of file guiutil.cpp.

Here is the call graph for this function:

QFont GUIUtil::fixedPitchFont ( )

Definition at line 90 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString GUIUtil::formatBitcoinURI ( const SendCoinsRecipient info)

Definition at line 222 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

QString GUIUtil::formatDurationStr ( int  secs)

Definition at line 907 of file guiutil.cpp.

Here is the caller graph for this function:

QString GUIUtil::formatNiceTimeOffset ( qint64  secs)

Definition at line 975 of file guiutil.cpp.

Here is the caller graph for this function:

QString GUIUtil::formatPingTime ( double  dPingTime)

Definition at line 965 of file guiutil.cpp.

Here is the caller graph for this function:

QString GUIUtil::formatServicesStr ( quint64  mask)

Definition at line 927 of file guiutil.cpp.

Here is the caller graph for this function:

QString GUIUtil::formatTimeOffset ( int64_t  nTimeOffset)

Definition at line 970 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 290 of file guiutil.cpp.

Here is the caller graph for this function:

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.

Definition at line 347 of file guiutil.cpp.

Here is the caller graph for this function:

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.

Definition at line 297 of file guiutil.cpp.

Here is the caller graph for this function:

bool GUIUtil::GetStartOnSystemStartup ( )

Definition at line 860 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 258 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 272 of file guiutil.cpp.

Here is the call graph for this function:

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

Definition at line 250 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool GUIUtil::isObscured ( QWidget *  w)

Definition at line 401 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool GUIUtil::openBitcoinConf ( )

Definition at line 419 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void GUIUtil::openDebugLogfile ( )

Definition at line 410 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 147 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 208 of file guiutil.cpp.

Here is the call graph for this function:

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

Definition at line 897 of file guiutil.cpp.

Here is the caller graph for this function:

void GUIUtil::restoreWindowGeometry ( const QString &  strSetting,
const QSize &  defaultSize,
QWidget *  parent 
)

Restore window size and position.

Definition at line 872 of file guiutil.cpp.

Here is the caller graph for this function:

void GUIUtil::saveWindowGeometry ( const QString &  strSetting,
QWidget *  parent 
)

Save window size and position.

Definition at line 865 of file guiutil.cpp.

Here is the caller graph for this function:

void GUIUtil::setClipboard ( const QString &  str)

Definition at line 891 of file guiutil.cpp.

Here is the caller graph for this function:

bool GUIUtil::SetStartOnSystemStartup ( bool  fAutoStart)

Definition at line 861 of file guiutil.cpp.

Here is the caller graph for this function:

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

Definition at line 123 of file guiutil.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void GUIUtil::setupAmountWidget ( QLineEdit *  widget,
QWidget *  parent 
)

Definition at line 138 of file guiutil.cpp.

void GUIUtil::SubstituteFonts ( const QString &  language)

Definition at line 435 of file guiutil.cpp.

Here is the caller graph for this function: