![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
Utility functions used by the PIVX Qt UI. More...
Classes | |
| class | ToolTipToRichTextFilter |
| Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed. More... | |
Typedefs | |
| typedef QProgressBar | ProgressBar |
Functions | |
| QString | dateTimeStr (const QDateTime &date) |
| QString | dateTimeStrWithSeconds (const QDateTime &date) |
| QString | dateTimeStr (qint64 nTime) |
| QFont | bitcoinAddressFont () |
| CAmount | parseValue (const QString &amount, int displayUnit) |
| Returns 0 if the value is invalid. More... | |
| QString | formatBalance (CAmount amount, int nDisplayUnit, bool isZpiv) |
| QString | formatBalanceWithoutHtml (CAmount amount, int nDisplayUnit, bool isZpiv) |
| void | setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent) |
| void | setupAmountWidget (QLineEdit *widget, QWidget *parent) |
| void | updateWidgetTextAndCursorPosition (QLineEdit *widget, const QString &str) |
| 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... | |
| QVariant | getEntryData (QAbstractItemView *view, int column, int role) |
| 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 | bringToFront (QWidget *w) |
| bool | openFile (fs::path path, bool isTextFile) |
| bool | openDebugLogfile () |
| bool | openConfigfile () |
| bool | openMNConfigfile () |
| bool | showBackups () |
| 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... | |
| bool | isExternal (QString theme) |
| Check whether a theme is not built-in. More... | |
| QString | loadStyleSheet () |
| Load global CSS theme. 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) |
| template<typename SeparatorType > | |
| QStringList | SplitSkipEmptyParts (const QString &string, const SeparatorType &separator) |
| Splits the string into substrings wherever separator occurs, and returns the list of those strings. More... | |
Utility functions used by the PIVX Qt UI.
| typedef QProgressBar GUIUtil::ProgressBar |
| QFont GUIUtil::bitcoinAddressFont | ( | ) |
| Qt::ConnectionType GUIUtil::blockingGUIThreadConnection | ( | ) |
Get connection type to call object slot in GUI thread with invokeMethod.
The call will be blocking.
Definition at line 358 of file guiutil.cpp.
| QString GUIUtil::boostPathToQString | ( | const fs::path & | path | ) |
| void GUIUtil::bringToFront | ( | QWidget * | w | ) |
Definition at line 379 of file guiutil.cpp.
| bool GUIUtil::checkPoint | ( | const QPoint & | p, |
| const QWidget * | w | ||
| ) |
| 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.
| [in] | column | Data column to extract from the model |
| [in] | role | Data role to extract from the model |
Definition at line 266 of file guiutil.cpp.
| QString GUIUtil::dateTimeStr | ( | const QDateTime & | date | ) |
| QString GUIUtil::dateTimeStr | ( | qint64 | nTime | ) |
| QString GUIUtil::dateTimeStrWithSeconds | ( | const QDateTime & | date | ) |
| QString GUIUtil::formatBalance | ( | CAmount | amount, |
| int | nDisplayUnit, | ||
| bool | isZpiv | ||
| ) |
Definition at line 119 of file guiutil.cpp.
| QString GUIUtil::formatBalanceWithoutHtml | ( | CAmount | amount, |
| int | nDisplayUnit, | ||
| bool | isZpiv | ||
| ) |
| QString GUIUtil::formatBitcoinURI | ( | const SendCoinsRecipient & | info | ) |
Definition at line 218 of file guiutil.cpp.
| QString GUIUtil::formatDurationStr | ( | int | secs | ) |
| QString GUIUtil::formatPingTime | ( | double | dPingTime | ) |
| QString GUIUtil::formatServicesStr | ( | quint64 | mask | ) |
| QString GUIUtil::formatTimeOffset | ( | int64_t | nTimeOffset | ) |
| QVariant GUIUtil::getEntryData | ( | QAbstractItemView * | view, |
| int | column, | ||
| int | role | ||
| ) |
Return a field of the currently selected entry as a QString.
Does nothing if nothing is selected.
| [in] | column | Data column to extract from the model |
| [in] | role | Data role to extract from the model |
Definition at line 278 of file guiutil.cpp.
| QString GUIUtil::getOpenFileName | ( | QWidget * | parent, |
| const QString & | caption, | ||
| const QString & | dir, | ||
| const QString & | filter, | ||
| QString * | selectedSuffixOut | ||
| ) |
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
| [in] | parent | Parent window (or 0) |
| [in] | caption | Window caption (or empty, for default) |
| [in] | dir | Starting directory (or empty, to default to documents directory) |
| [in] | filter | Filter specification such as "Comma Separated Files (*.csv)" |
| [out] | selectedSuffixOut | Pointer 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 331 of file guiutil.cpp.
| 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.
| [in] | parent | Parent window (or 0) |
| [in] | caption | Window caption (or empty, for default) |
| [in] | dir | Starting directory (or empty, to default to documents directory) |
| [in] | filter | Filter specification such as "Comma Separated Files (*.csv)" |
| [out] | selectedSuffixOut | Pointer 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 291 of file guiutil.cpp.
| bool GUIUtil::GetStartOnSystemStartup | ( | ) |
| QString GUIUtil::HtmlEscape | ( | const QString & | str, |
| bool | fMultiLine | ||
| ) |
| QString GUIUtil::HtmlEscape | ( | const std::string & | str, |
| bool | fMultiLine | ||
| ) |
| bool GUIUtil::isDust | ( | const QString & | address, |
| const CAmount & | amount | ||
| ) |
Definition at line 243 of file guiutil.cpp.
| bool GUIUtil::isExternal | ( | QString | theme | ) |
Check whether a theme is not built-in.
Definition at line 630 of file guiutil.cpp.
| bool GUIUtil::isObscured | ( | QWidget * | w | ) |
Definition at line 374 of file guiutil.cpp.
| QString GUIUtil::loadStyleSheet | ( | ) |
Load global CSS theme.
Definition at line 639 of file guiutil.cpp.
| bool GUIUtil::openConfigfile | ( | ) |
Definition at line 418 of file guiutil.cpp.
| bool GUIUtil::openDebugLogfile | ( | ) |
Definition at line 413 of file guiutil.cpp.
| bool GUIUtil::openFile | ( | fs::path | path, |
| bool | isTextFile | ||
| ) |
Definition at line 398 of file guiutil.cpp.
| bool GUIUtil::openMNConfigfile | ( | ) |
Definition at line 423 of file guiutil.cpp.
| bool GUIUtil::parseBitcoinURI | ( | const QUrl & | uri, |
| SendCoinsRecipient * | out | ||
| ) |
Definition at line 156 of file guiutil.cpp.
| bool GUIUtil::parseBitcoinURI | ( | QString | uri, |
| SendCoinsRecipient * | out | ||
| ) |
| CAmount GUIUtil::parseValue | ( | const QString & | amount, |
| int | displayUnit | ||
| ) |
Returns 0 if the value is invalid.
Definition at line 112 of file guiutil.cpp.
| fs::path GUIUtil::qstringToBoostPath | ( | const QString & | path | ) |
| void GUIUtil::restoreWindowGeometry | ( | const QString & | strSetting, |
| const QSize & | defaultSize, | ||
| QWidget * | parent | ||
| ) |
Restore window size and position.
Definition at line 613 of file guiutil.cpp.
| void GUIUtil::saveWindowGeometry | ( | const QString & | strSetting, |
| QWidget * | parent | ||
| ) |
Save window size and position.
Definition at line 606 of file guiutil.cpp.
| void GUIUtil::setClipboard | ( | const QString & | str | ) |
| bool GUIUtil::SetStartOnSystemStartup | ( | bool | fAutoStart | ) |
| void GUIUtil::setupAddressWidget | ( | QValidatedLineEdit * | widget, |
| QWidget * | parent | ||
| ) |
Definition at line 129 of file guiutil.cpp.
| void GUIUtil::setupAmountWidget | ( | QLineEdit * | widget, |
| QWidget * | parent | ||
| ) |
| bool GUIUtil::showBackups | ( | ) |
Definition at line 428 of file guiutil.cpp.
| QStringList GUIUtil::SplitSkipEmptyParts | ( | const QString & | string, |
| const SeparatorType & | separator | ||
| ) |
Splits the string into substrings wherever separator occurs, and returns the list of those strings.
Empty strings do not appear in the result.
QString::split() signature differs in different Qt versions:
Definition at line 214 of file guiutil.h.
| void GUIUtil::updateWidgetTextAndCursorPosition | ( | QLineEdit * | widget, |
| const QString & | str | ||
| ) |