Dash Core  0.12.2.1
P2P Digital Currency
GUIUtil Namespace Reference

Classes

class  ClickableLabel
 
class  ClickableProgressBar
 
class  TableViewLastColumnResizingFixer
 
class  ToolTipToRichTextFilter
 

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)
 
QList< QModelIndex > getEntryData (QAbstractItemView *view, int column)
 
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 openDebugLogfile ()
 
void openConfigfile ()
 
void openMNConfigfile ()
 
void showBackups ()
 
void SubstituteFonts (const QString &language)
 
bool GetStartOnSystemStartup ()
 
bool SetStartOnSystemStartup (bool fAutoStart)
 
void migrateQtSettings ()
 
void saveWindowGeometry (const QString &strSetting, QWidget *parent)
 
void restoreWindowGeometry (const QString &strSetting, const QSize &defaultSize, QWidget *parent)
 
QString getThemeName ()
 
QString loadStyleSheet ()
 
void setClipboard (const QString &str)
 
boost::filesystem::path qstringToBoostPath (const QString &path)
 
QString boostPathToQString (const boost::filesystem::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 Dash Qt UI.

Typedef Documentation

◆ ProgressBar

Definition at line 260 of file guiutil.h.

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.

Definition at line 386 of file guiutil.cpp.

Referenced by ThreadSafeMessageBox().

◆ boostPathToQString()

QString GUIUtil::boostPathToQString ( const boost::filesystem::path &  path)

◆ checkPoint()

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

Definition at line 398 of file guiutil.cpp.

Referenced by isObscured().

◆ 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

Definition at line 281 of file guiutil.cpp.

Referenced by TransactionView::copyAddress(), TransactionView::copyAmount(), TransactionView::copyLabel(), TransactionView::copyTxHex(), TransactionView::copyTxID(), TransactionView::copyTxPlainText(), TransactionView::eventFilter(), AddressBookPage::on_copyAddress_clicked(), and AddressBookPage::onCopyLabelAction().

◆ dateTimeStr() [1/2]

◆ dateTimeStr() [2/2]

QString GUIUtil::dateTimeStr ( qint64  nTime)

Definition at line 92 of file guiutil.cpp.

◆ fixedPitchFont()

◆ formatBitcoinURI()

QString GUIUtil::formatBitcoinURI ( const SendCoinsRecipient info)

◆ formatDurationStr()

QString GUIUtil::formatDurationStr ( int  secs)

Definition at line 966 of file guiutil.cpp.

Referenced by RPCConsole::setTrafficGraphRange(), and RPCConsole::updateNodeDetail().

◆ formatNiceTimeOffset()

QString GUIUtil::formatNiceTimeOffset ( qint64  secs)

Definition at line 1028 of file guiutil.cpp.

Referenced by BitcoinGUI::setNumBlocks(), and ModalOverlay::tipUpdate().

◆ formatPingTime()

QString GUIUtil::formatPingTime ( double  dPingTime)

Definition at line 1018 of file guiutil.cpp.

Referenced by PeerTableModel::data(), and RPCConsole::updateNodeDetail().

◆ formatServicesStr()

QString GUIUtil::formatServicesStr ( quint64  mask)

Definition at line 986 of file guiutil.cpp.

Referenced by RPCConsole::updateNodeDetail().

◆ formatTimeOffset()

QString GUIUtil::formatTimeOffset ( int64_t  nTimeOffset)

Definition at line 1023 of file guiutil.cpp.

Referenced by RPCConsole::updateNodeDetail().

◆ 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

Definition at line 294 of file guiutil.cpp.

Referenced by RPCConsole::banSelectedNode(), RPCConsole::disconnectSelectedNode(), and RPCConsole::unbanSelectedNode().

◆ 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.

Definition at line 351 of file guiutil.cpp.

Referenced by OpenURIDialog::on_selectFileButton_clicked().

◆ 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.

Definition at line 301 of file guiutil.cpp.

Referenced by WalletView::backupWallet(), TransactionView::exportClicked(), AddressBookPage::on_exportButton_clicked(), and QRImageWidget::saveImage().

◆ GetStartOnSystemStartup()

bool GUIUtil::GetStartOnSystemStartup ( )

Definition at line 858 of file guiutil.cpp.

Referenced by OptionsModel::data(), and OptionsModel::Reset().

◆ getThemeName()

◆ HtmlEscape() [1/2]

◆ HtmlEscape() [2/2]

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

Definition at line 276 of file guiutil.cpp.

◆ isDust()

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

Definition at line 253 of file guiutil.cpp.

Referenced by SendCoinsEntry::validate().

◆ isObscured()

bool GUIUtil::isObscured ( QWidget *  w)

Definition at line 405 of file guiutil.cpp.

Referenced by BitcoinGUI::showNormalIfMinimized().

◆ loadStyleSheet()

QString GUIUtil::loadStyleSheet ( )

◆ migrateQtSettings()

void GUIUtil::migrateQtSettings ( )

Modify Qt network specific settings on migration

Definition at line 863 of file guiutil.cpp.

Referenced by NetworkStyle::NetworkStyle().

◆ openConfigfile()

void GUIUtil::openConfigfile ( )

Definition at line 423 of file guiutil.cpp.

Referenced by BitcoinGUI::showConfEditor().

◆ openDebugLogfile()

void GUIUtil::openDebugLogfile ( )

Definition at line 414 of file guiutil.cpp.

Referenced by RPCConsole::on_openDebugLogfileButton_clicked().

◆ openMNConfigfile()

void GUIUtil::openMNConfigfile ( )

Definition at line 432 of file guiutil.cpp.

Referenced by BitcoinGUI::showMNConfEditor().

◆ parseBitcoinURI() [1/2]

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

◆ parseBitcoinURI() [2/2]

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

Definition at line 205 of file guiutil.cpp.

◆ qstringToBoostPath()

boost::filesystem::path GUIUtil::qstringToBoostPath ( const QString &  path)

Definition at line 955 of file guiutil.cpp.

Referenced by FreespaceChecker::check(), and Intro::pickDataDirectory().

◆ restoreWindowGeometry()

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

Restore window size and position

Definition at line 882 of file guiutil.cpp.

Referenced by BitcoinGUI::BitcoinGUI(), and RPCConsole::RPCConsole().

◆ saveWindowGeometry()

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

Save window size and position

Definition at line 875 of file guiutil.cpp.

Referenced by BitcoinGUI::~BitcoinGUI(), and RPCConsole::~RPCConsole().

◆ setClipboard()

◆ SetStartOnSystemStartup()

bool GUIUtil::SetStartOnSystemStartup ( bool  fAutoStart)

Definition at line 859 of file guiutil.cpp.

Referenced by OptionsModel::Reset(), and OptionsModel::setData().

◆ setupAddressWidget()

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

◆ setupAmountWidget()

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

Definition at line 126 of file guiutil.cpp.

◆ showBackups()

void GUIUtil::showBackups ( )

Definition at line 441 of file guiutil.cpp.

Referenced by BitcoinGUI::showBackups().

◆ SubstituteFonts()

void GUIUtil::SubstituteFonts ( const QString &  language)

Definition at line 450 of file guiutil.cpp.

Referenced by main().