Bitcoin ABC 0.30.7
P2P Digital Currency
|
#include <qt/guiutil.h>
#include <cashaddrenc.h>
#include <chainparams.h>
#include <common/args.h>
#include <interfaces/node.h>
#include <key_io.h>
#include <logging.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <protocol.h>
#include <qt/bitcoinaddressvalidator.h>
#include <qt/bitcoinunits.h>
#include <qt/qvalidatedlineedit.h>
#include <qt/sendcoinsrecipient.h>
#include <script/script.h>
#include <script/standard.h>
#include <util/exception.h>
#include <util/fs.h>
#include <util/fs_helpers.h>
#include <util/strencodings.h>
#include <util/time.h>
#include <QAbstractItemView>
#include <QApplication>
#include <QClipboard>
#include <QDateTime>
#include <QDesktopServices>
#include <QDoubleValidator>
#include <QFileDialog>
#include <QFont>
#include <QFontDatabase>
#include <QFontMetrics>
#include <QGuiApplication>
#include <QKeyEvent>
#include <QLineEdit>
#include <QList>
#include <QMenu>
#include <QMouseEvent>
#include <QProcess>
#include <QProgressDialog>
#include <QScreen>
#include <QSettings>
#include <QShortcut>
#include <QSize>
#include <QString>
#include <QTextDocument>
#include <QThread>
#include <QUrlQuery>
#include <QtGlobal>
#include <chrono>
#include <exception>
#include <fstream>
#include <string>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | GUIUtil |
Utility functions used by the Bitcoin Qt UI. | |
Functions | |
QString | GUIUtil::dateTimeStr (const QDateTime &date) |
QString | GUIUtil::dateTimeStr (qint64 nTime) |
QFont | GUIUtil::fixedPitchFont () |
static std::string | GUIUtil::MakeAddrInvalid (std::string addr, const CChainParams ¶ms) |
std::string | GUIUtil::DummyAddress (const CChainParams ¶ms) |
QString | GUIUtil::convertToCashAddr (const CChainParams ¶ms, const QString &addr) |
void | GUIUtil::setupAddressWidget (QValidatedLineEdit *widget, QWidget *parent) |
bool | GUIUtil::parseBitcoinURI (const QString &scheme, const QUrl &uri, SendCoinsRecipient *out) |
bool | GUIUtil::parseBitcoinURI (const QString &scheme, QString uri, SendCoinsRecipient *out) |
QString | GUIUtil::formatBitcoinURI (const SendCoinsRecipient &info) |
QString | GUIUtil::formatBitcoinURI (const CChainParams ¶ms, const SendCoinsRecipient &info) |
bool | GUIUtil::isDust (interfaces::Node &node, const QString &address, const Amount amount, const CChainParams &chainParams) |
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... | |
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::checkPoint (const QPoint &p, const QWidget *w) |
bool | GUIUtil::isObscured (QWidget *w) |
void | GUIUtil::bringToFront (QWidget *w) |
void | GUIUtil::handleCloseWindowShortcut (QWidget *w) |
void | GUIUtil::openDebugLogfile () |
bool | GUIUtil::openBitcoinConf () |
QStringList | GUIUtil::splitSkipEmptyParts (const QString &s, const QString &separator) |
bool | GUIUtil::GetStartOnSystemStartup () |
bool | GUIUtil::SetStartOnSystemStartup (bool fAutoStart) |
void | GUIUtil::setClipboard (const QString &str) |
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::formatDurationStr (std::chrono::seconds dur) |
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 (std::chrono::microseconds ping_time) |
Format a CNodeStats.m_last_ping_time 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) |
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::PolishProgressDialog (QProgressDialog *dialog) |
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... | |