15 #include <chainparams.h> 36 #include <QAbstractButton> 37 #include <QAbstractItemView> 38 #include <QApplication> 41 #include <QDesktopServices> 43 #include <QDoubleValidator> 44 #include <QFileDialog> 46 #include <QFontDatabase> 47 #include <QFontMetrics> 48 #include <QGuiApplication> 49 #include <QJsonObject> 51 #include <QKeySequence> 52 #include <QLatin1String> 57 #include <QMouseEvent> 58 #include <QPluginLoader> 59 #include <QProgressDialog> 60 #include <QRegularExpression> 65 #include <QStandardPaths> 67 #include <QTextDocument> 79 #if defined(Q_OS_MACOS) 92 return QLocale::system().toString(date.date(), QLocale::ShortFormat) + QString(
" ") + date.toString(
"hh:mm");
97 return dateTimeStr(QDateTime::fromSecsSinceEpoch(nTime));
102 if (use_embedded_font) {
103 return {
"Roboto Mono"};
105 return QFontDatabase::systemFont(QFontDatabase::FixedFont);
109 static const uint8_t
dummydata[] = {0xeb,0x15,0x23,0x1d,0xfc,0xeb,0x60,0x92,0x58,0x86,0xb6,0x7d,0x06,0x52,0x99,0x92,0x59,0x15,0xae,0xb1,0x72,0xc0,0x66,0x47};
116 for(
int i=0; i<256; ++i) {
121 sourcedata[sourcedata.size()-1] += 1;
128 parent->setFocusProxy(widget);
133 widget->setPlaceholderText(QObject::tr(
"Enter a Bitcoin address (e.g. %1)").arg(
141 QObject::connect(
new QShortcut(shortcut, button), &QShortcut::activated, [button]() { button->animateClick(); });
147 if(!uri.isValid() || uri.scheme() != QString(
"bitcoin"))
153 if (rv.
address.endsWith(
"/")) {
158 QUrlQuery uriQuery(uri);
159 QList<QPair<QString, QString> > items = uriQuery.queryItems();
160 for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
162 bool fShouldReturnFalse =
false;
163 if (i->first.startsWith(
"req-"))
165 i->first.remove(0, 4);
166 fShouldReturnFalse =
true;
169 if (i->first ==
"label")
171 rv.
label = i->second;
172 fShouldReturnFalse =
false;
174 if (i->first ==
"message")
177 fShouldReturnFalse =
false;
179 else if (i->first ==
"amount")
181 if(!i->second.isEmpty())
187 fShouldReturnFalse =
false;
190 if (fShouldReturnFalse)
202 QUrl uriInstance(uri);
208 bool bech_32 = info.
address.startsWith(QString::fromStdString(
Params().Bech32HRP() +
"1"));
210 QString
ret = QString(
"bitcoin:%1").arg(bech_32 ? info.
address.toUpper() : info.
address);
219 if (!info.
label.isEmpty())
221 QString lbl(QUrl::toPercentEncoding(info.
label));
222 ret += QString(
"%1label=%2").arg(paramCount == 0 ?
"?" :
"&").arg(lbl);
228 QString
msg(QUrl::toPercentEncoding(info.
message));
229 ret += QString(
"%1message=%2").arg(paramCount == 0 ?
"?" :
"&").arg(
msg);
240 CTxOut txOut(amount, script);
246 QString escaped = str.toHtmlEscaped();
249 escaped = escaped.replace(
"\n",
"<br>\n");
256 return HtmlEscape(QString::fromStdString(str), fMultiLine);
261 if(!view || !view->selectionModel())
263 QModelIndexList selection = view->selectionModel()->selectedRows(column);
265 if(!selection.isEmpty())
272 QList<QModelIndex>
getEntryData(
const QAbstractItemView *view,
int column)
274 if(!view || !view->selectionModel())
275 return QList<QModelIndex>();
276 return view->selectionModel()->selectedRows(column);
282 if (selection.isEmpty())
return false;
283 return !selection.at(0).data(role).toString().isEmpty();
288 const int id = QFontDatabase::addApplicationFont(file_name);
299 QRegularExpression filter_re(QStringLiteral(
".* \\(\\*\\.(.*)[ \\)]"), QRegularExpression::InvertedGreedinessOption);
301 QRegularExpressionMatch
m = filter_re.match(filter);
303 suffix =
m.captured(1);
309 const QString &filter,
310 QString *selectedSuffixOut)
312 QString selectedFilter;
316 myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
328 QFileInfo info(result);
329 if(!result.isEmpty())
331 if(info.suffix().isEmpty() && !selectedSuffix.isEmpty())
334 if(!result.endsWith(
"."))
336 result.append(selectedSuffix);
341 if(selectedSuffixOut)
343 *selectedSuffixOut = selectedSuffix;
349 const QString &filter,
350 QString *selectedSuffixOut)
352 QString selectedFilter;
356 myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
365 if(selectedSuffixOut)
375 if(QThread::currentThread() != qApp->thread())
377 return Qt::BlockingQueuedConnection;
381 return Qt::DirectConnection;
387 QWidget *atW = QApplication::widgetAt(w->mapToGlobal(p));
388 if (!atW)
return false;
389 return atW->window() == w;
397 &&
checkPoint(QPoint(w->width() - 1, w->height() - 1), w)
398 &&
checkPoint(QPoint(w->width() / 2, w->height() / 2), w));
409 if (w->isMinimized()) {
421 QObject::connect(
new QShortcut(QKeySequence(QObject::tr(
"Ctrl+W")), w), &QShortcut::activated, w, &QWidget::close);
430 QDesktopServices::openUrl(QUrl::fromLocalFile(
PathToQString(pathDebug)));
438 std::ofstream configFile{pathConfig, std::ios_base::app};
440 if (!configFile.good())
446 bool res = QDesktopServices::openUrl(QUrl::fromLocalFile(
PathToQString(pathConfig)));
450 res = QProcess::startDetached(
"/usr/bin/open", QStringList{
"-t",
PathToQString(pathConfig)});
457 ToolTipToRichTextFilter::ToolTipToRichTextFilter(
int _size_threshold, QObject *parent) :
459 size_threshold(_size_threshold)
466 if(evt->type() == QEvent::ToolTipChange)
468 QWidget *widget =
static_cast<QWidget*
>(obj);
469 QString tooltip = widget->toolTip();
470 if(tooltip.size() >
size_threshold && !tooltip.startsWith(
"<qt") && !Qt::mightBeRichText(tooltip))
474 tooltip =
"<qt>" +
HtmlEscape(tooltip,
true) +
"</qt>";
475 widget->setToolTip(tooltip);
479 return QObject::eventFilter(obj, evt);
489 if (event->type() == QEvent::FocusOut) {
490 auto focus_out =
static_cast<QFocusEvent*
>(event);
491 if (focus_out->reason() != Qt::PopupFocusReason) {
492 auto label = qobject_cast<QLabel*>(watched);
494 auto flags = label->textInteractionFlags();
495 label->setTextInteractionFlags(Qt::NoTextInteraction);
496 label->setTextInteractionFlags(
flags);
501 return QObject::eventFilter(watched, event);
505 fs::path static StartupShortcutPath()
509 return GetSpecialFolderPath(CSIDL_STARTUP) /
"Bitcoin.lnk";
511 return GetSpecialFolderPath(CSIDL_STARTUP) /
"Bitcoin (testnet).lnk";
524 fs::remove(StartupShortcutPath());
528 CoInitialize(
nullptr);
531 IShellLinkW* psl =
nullptr;
532 HRESULT hres = CoCreateInstance(CLSID_ShellLink,
nullptr,
533 CLSCTX_INPROC_SERVER, IID_IShellLinkW,
534 reinterpret_cast<void**>(&psl));
540 GetModuleFileNameW(
nullptr, pszExePath, ARRAYSIZE(pszExePath));
543 QString strArgs =
"-min";
548 psl->SetPath(pszExePath);
549 PathRemoveFileSpecW(pszExePath);
550 psl->SetWorkingDirectory(pszExePath);
551 psl->SetShowCmd(SW_SHOWMINNOACTIVE);
552 psl->SetArguments(strArgs.toStdWString().c_str());
556 IPersistFile* ppf =
nullptr;
557 hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf));
561 hres = ppf->Save(StartupShortcutPath().wstring().c_str(), TRUE);
574 #elif defined(Q_OS_LINUX) 581 char* pszConfigHome = getenv(
"XDG_CONFIG_HOME");
582 if (pszConfigHome)
return fs::path(pszConfigHome) /
"autostart";
583 char* pszHome = getenv(
"HOME");
584 if (pszHome)
return fs::path(pszHome) /
".config" /
"autostart";
588 fs::path static GetAutostartFilePath()
592 return GetAutostartDir() /
"bitcoin.desktop";
598 std::ifstream optionFile{GetAutostartFilePath()};
599 if (!optionFile.good())
603 while (!optionFile.eof())
605 getline(optionFile, line);
606 if (line.find(
"Hidden") != std::string::npos &&
607 line.find(
"true") != std::string::npos)
618 fs::remove(GetAutostartFilePath());
622 ssize_t r = readlink(
"/proc/self/exe", pszExePath,
sizeof(pszExePath));
626 pszExePath[r] =
'\0';
630 std::ofstream optionFile{GetAutostartFilePath(),
std::ios_base::out | std::ios_base::trunc};
631 if (!optionFile.good())
635 optionFile <<
"[Desktop Entry]\n";
636 optionFile <<
"Type=Application\n";
638 optionFile <<
"Name=Bitcoin\n";
642 optionFile <<
"Terminal=false\n";
643 optionFile <<
"Hidden=false\n";
658 QClipboard* clipboard = QApplication::clipboard();
659 clipboard->setText(str, QClipboard::Clipboard);
660 if (clipboard->supportsSelection()) {
661 clipboard->setText(str, QClipboard::Selection);
672 return QString::fromStdString(path.
u8string());
680 case NET_IPV4:
return QObject::tr(
"IPv4",
"network name");
682 case NET_IPV6:
return QObject::tr(
"IPv6",
"network name");
684 case NET_ONION:
return QObject::tr(
"Onion",
"network name");
686 case NET_I2P:
return QObject::tr(
"I2P",
"network name");
688 case NET_CJDNS:
return QObject::tr(
"CJDNS",
"network name");
698 if (prepend_direction) {
702 QObject::tr(
"Inbound") :
705 QObject::tr(
"Outbound") +
" ";
726 using days = std::chrono::duration<int, std::ratio<86400>>;
727 const auto d{std::chrono::duration_cast<days>(dur)};
728 const auto h{std::chrono::duration_cast<std::chrono::hours>(dur - d)};
729 const auto m{std::chrono::duration_cast<std::chrono::minutes>(dur - d - h)};
730 const auto s{std::chrono::duration_cast<std::chrono::seconds>(dur - d - h -
m)};
731 QStringList str_list;
732 if (
auto d2{d.count()}) str_list.append(QObject::tr(
"%1 d").arg(d2));
733 if (
auto h2{h.count()}) str_list.append(QObject::tr(
"%1 h").arg(h2));
734 if (
auto m2{
m.count()}) str_list.append(QObject::tr(
"%1 m").arg(m2));
735 const auto s2{s.count()};
736 if (s2 || str_list.empty()) str_list.append(QObject::tr(
"%1 s").arg(s2));
737 return str_list.join(
" ");
742 const auto time_now{GetTime<std::chrono::seconds>()};
743 const auto age{time_now - time_connected};
744 if (age >= 24h)
return QObject::tr(
"%1 d").arg(age / 24h);
745 if (age >= 1h)
return QObject::tr(
"%1 h").arg(age / 1h);
746 if (age >= 1min)
return QObject::tr(
"%1 m").arg(age / 1min);
747 return QObject::tr(
"%1 s").arg(age / 1s);
755 strList.append(QString::fromStdString(flag));
759 return strList.join(
", ");
761 return QObject::tr(
"None");
766 return (ping_time == std::chrono::microseconds::max() || ping_time == 0us) ?
768 QObject::tr(
"%1 ms").arg(QString::number((
int)(
count_microseconds(ping_time) / 1000), 10));
773 return QObject::tr(
"%1 s").arg(QString::number((
int)nTimeOffset, 10));
779 QString timeBehindText;
780 const int HOUR_IN_SECONDS = 60*60;
781 const int DAY_IN_SECONDS = 24*60*60;
782 const int WEEK_IN_SECONDS = 7*24*60*60;
783 const int YEAR_IN_SECONDS = 31556952;
786 timeBehindText = QObject::tr(
"%n second(s)",
"",secs);
788 else if(secs < 2*HOUR_IN_SECONDS)
790 timeBehindText = QObject::tr(
"%n minute(s)",
"",secs/60);
792 else if(secs < 2*DAY_IN_SECONDS)
794 timeBehindText = QObject::tr(
"%n hour(s)",
"",secs/HOUR_IN_SECONDS);
796 else if(secs < 2*WEEK_IN_SECONDS)
798 timeBehindText = QObject::tr(
"%n day(s)",
"",secs/DAY_IN_SECONDS);
800 else if(secs < YEAR_IN_SECONDS)
802 timeBehindText = QObject::tr(
"%n week(s)",
"",secs/WEEK_IN_SECONDS);
806 qint64 years = secs / YEAR_IN_SECONDS;
807 qint64 remainder = secs % YEAR_IN_SECONDS;
808 timeBehindText = QObject::tr(
"%1 and %2").arg(QObject::tr(
"%n year(s)",
"", years)).arg(QObject::tr(
"%n week(s)",
"", remainder/WEEK_IN_SECONDS));
810 return timeBehindText;
816 return QObject::tr("%1 B").arg(bytes); 817 if (bytes < 1'000
'000) 818 return QObject::tr("%1 kB").arg(bytes / 1'000);
819 if (bytes < 1
'000'000
'000) 820 return QObject::tr("%1 MB").arg(bytes / 1'000
'000); 822 return QObject::tr("%1 GB").arg(bytes / 1'000
'000'000);
826 while(font_size >= minPointSize) {
827 font.setPointSizeF(font_size);
828 QFontMetrics fm(font);
838 : QLabel{parent}, m_platform_style{platform_style}
853 if (e->type() == QEvent::PaletteChange) {
857 QLabel::changeEvent(e);
882 if (event->type() == QEvent::KeyPress) {
883 if (static_cast<QKeyEvent*>(event)->key() == Qt::Key_Escape) {
887 return QItemDelegate::eventFilter(
object, event);
894 const int margin =
TextWidth(dialog->fontMetrics(), (
"X"));
895 dialog->resize(dialog->width() + 2 * margin, dialog->height());
901 dialog->setMinimumDuration(0);
904 int TextWidth(
const QFontMetrics& fm,
const QString& text)
906 return fm.horizontalAdvance(text);
912 const std::string qt_link{
"static"};
914 const std::string qt_link{
"dynamic"};
916 #ifdef QT_STATICPLUGIN 917 const std::string plugin_link{
"static"};
919 const std::string plugin_link{
"dynamic"};
921 LogPrintf(
"Qt %s (%s), plugin=%s (%s)\n", qVersion(), qt_link, QGuiApplication::platformName().toStdString(), plugin_link);
922 const auto static_plugins = QPluginLoader::staticPlugins();
923 if (static_plugins.empty()) {
927 for (
const QStaticPlugin& p : static_plugins) {
928 QJsonObject meta_data = p.metaData();
929 const std::string plugin_class = meta_data.take(QString(
"className")).toString().toStdString();
930 const int plugin_version = meta_data.take(QString(
"version")).toInt();
931 LogPrintf(
" %s, version %d\n", plugin_class, plugin_version);
935 LogPrintf(
"Style: %s / %s\n", QApplication::style()->objectName().toStdString(), QApplication::style()->metaObject()->className());
936 LogPrintf(
"System: %s, %s\n", QSysInfo::prettyProductName().toStdString(), QSysInfo::buildAbi().toStdString());
937 for (
const QScreen* s : QGuiApplication::screens()) {
938 LogPrintf(
"Screen: %s %dx%d, pixel ratio=%.1f\n", s->name().toStdString(), s->size().width(), s->size().height(), s->devicePixelRatio());
942 void PopupMenu(QMenu* menu,
const QPoint& point, QAction* at_action)
945 if (QApplication::platformName() ==
"minimal")
return;
946 menu->popup(point, at_action);
951 #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) 952 return date.startOfDay();
954 return QDateTime(date);
960 #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) 961 return !label->pixmap(Qt::ReturnByValue).isNull();
963 return label->pixmap() !=
nullptr;
973 #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) 974 return label->pixmap(Qt::ReturnByValue).toImage();
976 return label->pixmap()->toImage();
982 return QString(
source).replace(
984 QLatin1String(
"<a href=\"") + link + QLatin1String(
"\">") + link + QLatin1String(
"</a>"));
988 const std::exception* exception,
989 const QObject* sender,
990 const QObject* receiver)
992 std::string description = sender->metaObject()->className();
994 description += receiver->metaObject()->className();
1000 dialog->setAttribute(Qt::WA_DeleteOnClose);
1001 dialog->setWindowModality(Qt::ApplicationModal);
QString formatPingTime(std::chrono::microseconds ping_time)
Format a CNodeStats.m_last_ping_time into a user-readable string or display N/A, if 0...
QDateTime StartOfDay(const QDate &date)
Returns the start-moment of the day in local time.
AddrFetch connections are short lived connections used to solicit addresses from peers.
bool eventFilter(QObject *obj, QEvent *evt) override
void setThemedPixmap(const QString &image_filename, int width, int height)
Utility functions used by the Bitcoin Qt UI.
void LogQtInfo()
Writes to debug.log short info about the used Qt and the host system.
fs::path GetConfigFilePath() const
Return config file path (read-only)
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
Inbound connections are those initiated by a peer.
A set of addresses that represent the hash of a string or FQDN.
void mouseReleaseEvent(QMouseEvent *event) override
Dummy value to indicate the number of NET_* constants.
Feeler connections are short-lived connections made to check that a node is alive.
bool IsValidDestinationString(const std::string &str, const CChainParams ¶ms)
void PopupMenu(QMenu *menu, const QPoint &point, QAction *at_action)
Call QMenu::popup() only on supported QT_QPA_PLATFORM.
int TextWidth(const QFontMetrics &fm, const QString &text)
Returns the distance in pixels appropriate for drawing a subsequent character after text...
bool isDust(interfaces::Node &node, const QString &address, const CAmount &amount)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
QString formatBytes(uint64_t bytes)
QString formatTimeOffset(int64_t nTimeOffset)
Format a CNodeCombinedStats.nTimeOffset into a user-readable string.
bool GetStartOnSystemStartup()
std::string EncodeBase58(Span< const unsigned char > input)
Why base-58 instead of standard base-64 encoding?
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system...
QString HtmlEscape(const QString &str, bool fMultiLine)
std::vector< std::string > serviceFlagsToStr(uint64_t flags)
Convert service flags (a bitmask of NODE_*) to human readable strings.
QString HtmlEscape(const std::string &str, bool fMultiLine)
QFont fixedPitchFont(bool use_embedded_font)
static bool parse(Unit unit, const QString &value, CAmount *val_out)
Parse string to coin amount.
Line edit that can be marked as "invalid" to show input validation feedback.
void ShowModalDialogAsynchronously(QDialog *dialog)
Shows a QDialog instance asynchronously, and deletes it on close.
void PrintExceptionContinue(const std::exception *pex, std::string_view thread_name)
ChainType GetChainType() const
Returns the appropriate chain type from the program arguments.
These are the default connections that we use to connect with the network.
QString formatDurationStr(std::chrono::seconds dur)
Convert seconds into a QString with days, hours, mins, secs.
QString formatBitcoinURI(const SendCoinsRecipient &info)
void bringToFront(QWidget *w)
bool eventFilter(QObject *object, QEvent *event) override
int64_t CAmount
Amount in satoshis (Can be negative)
void mouseReleaseEvent(QMouseEvent *event) override
QString NetworkToQString(Network net)
Convert enum Network to QString.
std::string GetChainTypeString() const
Returns the appropriate chain type string from the program arguments.
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
void changeEvent(QEvent *e) override
bool isObscured(QWidget *w)
qreal calculateIdealFontSize(int width, const QString &text, QFont font, qreal minPointSize, qreal font_size)
We open manual connections to addresses that users explicitly requested via the addnode RPC or the -a...
static QString format(Unit unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=SeparatorStyle::STANDARD, bool justify=false)
Format as string.
void setClipboard(const QString &str)
bool HasPixmap(const QLabel *label)
Returns true if pixmap has been set.
void handleCloseWindowShortcut(QWidget *w)
fs::path QStringToPath(const QString &path)
Convert QString to OS specific boost path through UTF-8.
constexpr int64_t count_microseconds(std::chrono::microseconds t)
QString ConnectionTypeToQString(ConnectionType conn_type, bool prepend_direction)
Convert enum ConnectionType to QString.
bool eventFilter(QObject *watched, QEvent *event) override
bool hasEntryData(const QAbstractItemView *view, int column, int role)
Returns true if the specified field of the currently selected view entry is not empty.
void clicked(const QPoint &point)
Emitted when the label is clicked.
Base58 entry widget validator, checks for valid characters and removes some whitespace.
An output of a transaction.
static bool create_directories(const std::filesystem::path &p)
Create directory (and if necessary its parents), unless the leaf directory already exists or is a sym...
void copyEntryData(const QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
void PolishProgressDialog(QProgressDialog *dialog)
void PrintSlotException(const std::exception *exception, const QObject *sender, const QObject *receiver)
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
QImage GetImage(const QLabel *label)
QString dateTimeStr(qint64 nTime)
LabelOutOfFocusEventFilter(QObject *parent)
const CChainParams & Params()
Return the currently selected parameters.
fs::path GetDefaultDataDir()
Serialized script, used inside transaction inputs and outputs.
QString formatServicesStr(quint64 mask)
Format CNodeStats.nServices bitmask into a user-readable string.
bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
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 ...
static std::string DummyAddress(const CChainParams ¶ms)
void ForceActivation()
Force application activation on macOS.
std::string u8string() const
bool checkPoint(const QPoint &p, const QWidget *w)
std::string ChainTypeToString(ChainType chain)
void setCheckValidator(const QValidator *v)
void LoadFont(const QString &file_name)
Loads the font from the file specified by file_name, aborts if it fails.
ThemedLabel(const PlatformStyle *platform_style, QWidget *parent=nullptr)
ConnectionType
Different types of connections to a peer.
ClickableLabel(const PlatformStyle *platform_style, QWidget *parent=nullptr)
QString MakeHtmlLink(const QString &source, const QString &link)
Replaces a plain text link with an HTML tagged one.
bool IsDust(const CTxOut &txout, const CFeeRate &dustRelayFeeIn)
bool SetStartOnSystemStartup(bool fAutoStart)
void clicked(const QPoint &point)
Emitted when the progressbar is clicked.
QString formatNiceTimeOffset(qint64 secs)
QString FormatPeerAge(std::chrono::seconds time_connected)
Convert peer connection time to a QString denominated in the most relevant unit.
static bool exists(const path &p)
CTxDestination DecodeDestination(const std::string &str, std::string &error_msg, std::vector< int > *error_locations)
QString getDefaultDataDirectory()
Determine default data directory for operating system.
static path u8path(const std::string &utf8_str)
void updateThemedPixmap()
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Bitcoin address widget validator, checks for a valid bitcoin address.
void AddButtonShortcut(QAbstractButton *button, const QKeySequence &shortcut)
Connects an additional shortcut to a QAbstractButton.
Top-level interface for a bitcoin node (bitcoind process).
const PlatformStyle * m_platform_style
static const uint8_t dummydata[]
QString PathToQString(const fs::path &path)
Convert OS specific boost path to QString through UTF-8.
QString ExtractFirstSuffixFromFilter(const QString &filter)
Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...).
We use block-relay-only connections to help prevent against partition attacks.
const fs::path & GetDataDirNet() const
Get data directory path with appended network identifier.
const std::vector< unsigned char > & Base58Prefix(Base58Type type) const
QList< QModelIndex > getEntryData(const QAbstractItemView *view, int column)
Return a field of the currently selected entry as a QString.
Addresses from these networks are not publicly routable on the global Internet.