Bitcoin Core  21.99.0
P2P Digital Currency
Classes | Namespaces | Typedefs | Functions
guiutil.h File Reference
#include <amount.h>
#include <fs.h>
#include <net.h>
#include <netaddress.h>
#include <QEvent>
#include <QHeaderView>
#include <QItemDelegate>
#include <QLabel>
#include <QMessageBox>
#include <QObject>
#include <QProgressBar>
#include <QString>
#include <QTableView>
Include dependency graph for guiutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  GUIUtil::ToolTipToRichTextFilter
 Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text representation if needed. More...
class  GUIUtil::LabelOutOfFocusEventFilter
 Qt event filter that intercepts QEvent::FocusOut events for QLabel objects, and resets their `textInteractionFlags' property to get rid of the visible cursor. More...
class  GUIUtil::TableViewLastColumnResizingFixer
 Makes a QTableView last column feel as if it was being resized from its left border. More...
class  GUIUtil::ClickableLabel
class  GUIUtil::ClickableProgressBar
class  GUIUtil::ItemDelegate


 Utility functions used by the Bitcoin Qt UI.


typedef ClickableProgressBar GUIUtil::ProgressBar


QString GUIUtil::dateTimeStr (const QDateTime &date)
QString GUIUtil::dateTimeStr (qint64 nTime)
QFont GUIUtil::fixedPitchFont ()
void GUIUtil::setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent)
bool GUIUtil::parseBitcoinURI (const QUrl &uri, SendCoinsRecipient *out)
bool GUIUtil::parseBitcoinURI (QString uri, SendCoinsRecipient *out)
QString GUIUtil::formatBitcoinURI (const SendCoinsRecipient &info)
bool GUIUtil::isDust (interfaces::Node &node, const QString &address, const CAmount &amount)
QString GUIUtil::HtmlEscape (const QString &str, bool fMultiLine)
QString GUIUtil::HtmlEscape (const std::string &str, bool fMultiLine)
void GUIUtil::copyEntryData (const 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 > GUIUtil::getEntryData (const QAbstractItemView *view, int column)
 Return a field of the currently selected entry as a QString. More...
bool GUIUtil::hasEntryData (const QAbstractItemView *view, int column, int role)
 Returns true if the specified field of the currently selected view entry is not empty. More...
void GUIUtil::setClipboard (const QString &str)
QString GUIUtil::getDefaultDataDirectory ()
 Determine default data directory for operating system. More...
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. More...
QString GUIUtil::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 GUIUtil::blockingGUIThreadConnection ()
 Get connection type to call object slot in GUI thread with invokeMethod. More...
bool GUIUtil::isObscured (QWidget *w)
void GUIUtil::bringToFront (QWidget *w)
void GUIUtil::handleCloseWindowShortcut (QWidget *w)
void GUIUtil::openDebugLogfile ()
bool GUIUtil::openBitcoinConf ()
bool GUIUtil::GetStartOnSystemStartup ()
bool GUIUtil::SetStartOnSystemStartup (bool fAutoStart)
fs::path GUIUtil::qstringToBoostPath (const QString &path)
 Convert QString to OS specific boost path through UTF-8. More...
QString GUIUtil::boostPathToQString (const fs::path &path)
 Convert OS specific boost path to QString through UTF-8. More...
QString GUIUtil::NetworkToQString (Network net)
 Convert enum Network to QString. More...
QString GUIUtil::ConnectionTypeToQString (ConnectionType conn_type)
 Convert enum ConnectionType to QString. More...
QString GUIUtil::formatDurationStr (int secs)
 Convert seconds into a QString with days, hours, mins, secs. More...
QString GUIUtil::formatServicesStr (quint64 mask)
 Format CNodeStats.nServices bitmask into a user-readable string. More...
QString GUIUtil::formatPingTime (int64_t ping_usec)
 Format a CNodeStats.m_ping_usec into a user-readable string or display N/A, if 0. More...
QString GUIUtil::formatTimeOffset (int64_t nTimeOffset)
 Format a CNodeCombinedStats.nTimeOffset into a user-readable string. More...
QString GUIUtil::formatNiceTimeOffset (qint64 secs)
QString GUIUtil::formatBytes (uint64_t bytes)
qreal GUIUtil::calculateIdealFontSize (int width, const QString &text, QFont font, qreal minPointSize, qreal font_size)
void GUIUtil::PolishProgressDialog (QProgressDialog *dialog)
int GUIUtil::TextWidth (const QFontMetrics &fm, const QString &text)
 Returns the distance in pixels appropriate for drawing a subsequent character after text. More...
void GUIUtil::LogQtInfo ()
 Writes to debug.log short info about the used Qt and the host system. More...
void GUIUtil::PopupMenu (QMenu *menu, const QPoint &point, QAction *at_action=nullptr)
 Call QMenu::popup() only on supported QT_QPA_PLATFORM. More...
QDateTime GUIUtil::StartOfDay (const QDate &date)
 Returns the start-moment of the day in local time. More...
bool GUIUtil::HasPixmap (const QLabel *label)
 Returns true if pixmap has been set. More...
QImage GUIUtil::GetImage (const QLabel *label)
template<typename SeparatorType >
QStringList GUIUtil::SplitSkipEmptyParts (const QString &string, const SeparatorType &separator)
 Splits the string into substrings wherever separator occurs, and returns the list of those strings. More...
template<typename Fn >
void GUIUtil::ObjectInvoke (QObject *object, Fn &&function, Qt::ConnectionType connection=Qt::QueuedConnection)
 Queue a function to run in an object's event loop. More...