25 #define _WIN32_WINNT 0x0501 29 #define _WIN32_IE 0x0501 30 #define WIN32_LEAN_AND_MEAN 1 39 #include <boost/scoped_array.hpp> 41 #include <QAbstractItemView> 42 #include <QApplication> 45 #include <QDesktopServices> 46 #include <QDesktopWidget> 47 #include <QDoubleValidator> 48 #include <QFileDialog> 52 #include <QTextDocument> 54 #include <QMouseEvent> 56 #if QT_VERSION < 0x050000 62 #if QT_VERSION >= 0x50200 63 #include <QFontDatabase> 66 static fs::detail::utf8_codecvt_facet utf8;
69 extern double NSAppKitVersionNumber;
70 #if !defined(NSAppKitVersionNumber10_8) 71 #define NSAppKitVersionNumber10_8 1187 73 #if !defined(NSAppKitVersionNumber10_9) 74 #define NSAppKitVersionNumber10_9 1265 82 return date.date().toString(Qt::SystemLocaleShortDate) + QString(
" ") + date.toString(
"hh:mm");
87 return dateTimeStr(QDateTime::fromTime_t((qint32)nTime));
92 #if QT_VERSION >= 0x50200 93 return QFontDatabase::systemFont(QFontDatabase::FixedFont);
95 QFont font(
"Monospace");
96 #if QT_VERSION >= 0x040800 97 font.setStyleHint(QFont::Monospace);
99 font.setStyleHint(QFont::TypeWriter);
106 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};
109 static std::string DummyAddress(
const CChainParams ¶ms)
112 sourcedata.insert(sourcedata.end(), dummydata, dummydata +
sizeof(dummydata));
113 for(
int i=0; i<256; ++i) {
114 std::string s =
EncodeBase58(sourcedata.data(), sourcedata.data() + sourcedata.size());
117 sourcedata[sourcedata.size()-1] += 1;
124 parent->setFocusProxy(widget);
127 #if QT_VERSION >= 0x040700 130 widget->setPlaceholderText(QObject::tr(
"Enter a Fabcoin address (e.g. %1)").arg(
131 QString::fromStdString(DummyAddress(
Params()))));
139 QDoubleValidator *amountValidator =
new QDoubleValidator(parent);
140 amountValidator->setDecimals(8);
141 amountValidator->setBottom(0.0);
142 widget->setValidator(amountValidator);
143 widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
150 if(!uri.isValid() || uri.scheme() != QString(
"fabcoin"))
156 if (rv.
address.endsWith(
"/")) {
161 #if QT_VERSION < 0x050000 162 QList<QPair<QString, QString> > items = uri.queryItems();
164 QUrlQuery uriQuery(uri);
165 QList<QPair<QString, QString> > items = uriQuery.queryItems();
167 for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++)
169 bool fShouldReturnFalse =
false;
170 if (i->first.startsWith(
"req-"))
172 i->first.remove(0, 4);
173 fShouldReturnFalse =
true;
176 if (i->first ==
"label")
178 rv.
label = i->second;
179 fShouldReturnFalse =
false;
181 if (i->first ==
"message")
184 fShouldReturnFalse =
false;
186 else if (i->first ==
"amount")
188 if(!i->second.isEmpty())
195 fShouldReturnFalse =
false;
198 if (fShouldReturnFalse)
214 if(uri.startsWith(
"fabcoin://", Qt::CaseInsensitive))
216 uri.replace(0, 10,
"fabcoin:");
218 QUrl uriInstance(uri);
224 QString ret = QString(
"fabcoin:%1").arg(info.
address);
233 if (!info.
label.isEmpty())
235 QString lbl(QUrl::toPercentEncoding(info.
label));
236 ret += QString(
"%1label=%2").arg(paramCount == 0 ?
"?" :
"&").arg(lbl);
242 QString msg(QUrl::toPercentEncoding(info.
message));
243 ret += QString(
"%1message=%2").arg(paramCount == 0 ?
"?" :
"&").arg(msg);
254 CTxOut txOut(amount, script);
260 #if QT_VERSION < 0x050000 261 QString
escaped = Qt::escape(str);
263 QString escaped = str.toHtmlEscaped();
267 escaped = escaped.replace(
"\n",
"<br>\n");
274 return HtmlEscape(QString::fromStdString(str), fMultiLine);
279 if(!view || !view->selectionModel())
281 QModelIndexList selection = view->selectionModel()->selectedRows(column);
283 if(!selection.isEmpty())
292 if(!view || !view->selectionModel())
294 QModelIndexList selection = view->selectionModel()->selectedIndexes();
296 if(!selection.isEmpty())
304 if(!view || !view->selectionModel())
305 return QList<QModelIndex>();
306 return view->selectionModel()->selectedRows(column);
310 const QString &filter,
311 QString *selectedSuffixOut)
313 QString selectedFilter;
317 #if QT_VERSION < 0x050000 318 myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
320 myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
331 QRegExp filter_re(
".* \\(\\*\\.(.*)[ \\)]");
332 QString selectedSuffix;
333 if(filter_re.exactMatch(selectedFilter))
335 selectedSuffix = filter_re.cap(1);
339 QFileInfo info(result);
340 if(!result.isEmpty())
342 if(info.suffix().isEmpty() && !selectedSuffix.isEmpty())
345 if(!result.endsWith(
"."))
347 result.append(selectedSuffix);
352 if(selectedSuffixOut)
354 *selectedSuffixOut = selectedSuffix;
360 const QString &filter,
361 QString *selectedSuffixOut)
363 QString selectedFilter;
367 #if QT_VERSION < 0x050000 368 myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
370 myDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
380 if(selectedSuffixOut)
383 QRegExp filter_re(
".* \\(\\*\\.(.*)[ \\)]");
384 QString selectedSuffix;
385 if(filter_re.exactMatch(selectedFilter))
387 selectedSuffix = filter_re.cap(1);
389 *selectedSuffixOut = selectedSuffix;
396 if(QThread::currentThread() != qApp->thread())
398 return Qt::BlockingQueuedConnection;
402 return Qt::DirectConnection;
408 QWidget *atW = QApplication::widgetAt(w->mapToGlobal(p));
409 if (!atW)
return false;
410 return atW->topLevelWidget() == w;
418 &&
checkPoint(QPoint(w->width() - 1, w->height() - 1), w)
419 &&
checkPoint(QPoint(w->width() / 2, w->height() / 2), w));
424 fs::path pathDebug =
GetDataDir() /
"debug.log";
427 if (fs::exists(pathDebug))
436 boost::filesystem::ofstream configFile(pathConfig, std::ios_base::app);
438 if (!configFile.good())
444 return QDesktopServices::openUrl(QUrl::fromLocalFile(
boostPathToQString(pathConfig)));
449 #if defined(Q_OS_MAC) 462 #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 463 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8)
465 if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9)
467 QFont::insertSubstitution(
".Lucida Grande UI",
"Lucida Grande");
471 if (language ==
"zh_CN" || language ==
"zh_TW" || language ==
"zh_HK")
472 QFont::insertSubstitution(
".Helvetica Neue DeskInterface",
"Heiti SC");
473 else if (language ==
"ja")
474 QFont::insertSubstitution(
".Helvetica Neue DeskInterface",
"Songti SC");
476 QFont::insertSubstitution(
".Helvetica Neue DeskInterface",
"Lucida Grande");
485 size_threshold(_size_threshold)
492 if(evt->type() == QEvent::ToolTipChange)
494 QWidget *widget =
static_cast<QWidget*
>(obj);
495 QString tooltip = widget->toolTip();
496 if(tooltip.size() >
size_threshold && !tooltip.startsWith(
"<qt") && !Qt::mightBeRichText(tooltip))
500 tooltip =
"<qt>" +
HtmlEscape(tooltip,
true) +
"</qt>";
501 widget->setToolTip(tooltip);
505 return QObject::eventFilter(obj, evt);
510 connect(tableView->horizontalHeader(), SIGNAL(sectionResized(
int,
int,
int)),
this, SLOT(on_sectionResized(
int,
int,
int)));
511 connect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()),
this, SLOT(on_geometriesChanged()));
517 disconnect(tableView->horizontalHeader(), SIGNAL(sectionResized(
int,
int,
int)),
this, SLOT(on_sectionResized(
int,
int,
int)));
518 disconnect(tableView->horizontalHeader(), SIGNAL(geometriesChanged()),
this, SLOT(on_geometriesChanged()));
525 #if QT_VERSION < 0x050000 526 tableView->horizontalHeader()->setResizeMode(logicalIndex, resizeMode);
528 tableView->horizontalHeader()->setSectionResizeMode(logicalIndex, resizeMode);
534 tableView->setColumnWidth(nColumnIndex, width);
535 tableView->horizontalHeader()->resizeSection(nColumnIndex, width);
540 int nColumnsWidthSum = 0;
541 for (
int i = 0; i < columnCount; i++)
543 nColumnsWidthSum += tableView->horizontalHeader()->sectionSize(i);
545 return nColumnsWidthSum;
550 int nResult = lastColumnMinimumWidth;
551 int nTableWidth = tableView->horizontalHeader()->width();
555 int nOtherColsWidth = getColumnsWidth() - tableView->horizontalHeader()->sectionSize(column);
556 nResult =
std::max(nResult, nTableWidth - nOtherColsWidth);
565 disconnectViewHeadersSignals();
566 resizeColumn(lastColumnIndex, getAvailableWidthForColumn(lastColumnIndex));
567 connectViewHeadersSignals();
569 int nTableWidth = tableView->horizontalHeader()->width();
570 int nColsWidth = getColumnsWidth();
571 if (nColsWidth > nTableWidth)
573 resizeColumn(secondToLastColumnIndex,getAvailableWidthForColumn(secondToLastColumnIndex));
580 disconnectViewHeadersSignals();
581 resizeColumn(column, getAvailableWidthForColumn(column));
582 connectViewHeadersSignals();
588 adjustTableColumnsWidth();
589 int remainingWidth = getAvailableWidthForColumn(logicalIndex);
590 if (newSize > remainingWidth)
592 resizeColumn(logicalIndex, remainingWidth);
600 if ((getColumnsWidth() - this->tableView->horizontalHeader()->width()) != 0)
602 disconnectViewHeadersSignals();
603 resizeColumn(secondToLastColumnIndex, getAvailableWidthForColumn(secondToLastColumnIndex));
604 connectViewHeadersSignals();
615 lastColumnMinimumWidth(lastColMinimumWidth),
616 allColumnsMinimumWidth(allColsMinimumWidth)
627 fs::path
static StartupShortcutPath()
631 return GetSpecialFolderPath(CSIDL_STARTUP) /
"Fabcoin.lnk";
633 return GetSpecialFolderPath(CSIDL_STARTUP) /
"Fabcoin (testnet).lnk";
634 return GetSpecialFolderPath(CSIDL_STARTUP) /
strprintf(
"Fabcoin (%s).lnk", chain);
640 return fs::exists(StartupShortcutPath());
646 fs::remove(StartupShortcutPath());
650 CoInitialize(
nullptr);
653 IShellLink* psl =
nullptr;
654 HRESULT hres = CoCreateInstance(CLSID_ShellLink,
nullptr,
655 CLSCTX_INPROC_SERVER, IID_IShellLink,
656 reinterpret_cast<void**>(&psl));
662 GetModuleFileName(
nullptr, pszExePath,
sizeof(pszExePath));
665 QString strArgs =
"-min";
670 boost::scoped_array<TCHAR> args(
new TCHAR[strArgs.length() + 1]);
672 strArgs.toWCharArray(args.get());
674 args[strArgs.length()] =
'\0';
678 psl->SetPath(pszExePath);
679 PathRemoveFileSpec(pszExePath);
680 psl->SetWorkingDirectory(pszExePath);
681 psl->SetShowCmd(SW_SHOWMINNOACTIVE);
683 psl->SetArguments(strArgs.toStdString().c_str());
685 psl->SetArguments(args.get());
690 IPersistFile* ppf =
nullptr;
691 hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf));
696 MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().
string().c_str(), -1, pwsz,
MAX_PATH);
698 hres = ppf->Save(pwsz, TRUE);
711 #elif defined(Q_OS_LINUX) 716 fs::path
static GetAutostartDir()
718 char* pszConfigHome = getenv(
"XDG_CONFIG_HOME");
719 if (pszConfigHome)
return fs::path(pszConfigHome) /
"autostart";
720 char* pszHome = getenv(
"HOME");
721 if (pszHome)
return fs::path(pszHome) /
".config" /
"autostart";
725 fs::path
static GetAutostartFilePath()
729 return GetAutostartDir() /
"fabcoin.desktop";
730 return GetAutostartDir() /
strprintf(
"fabcoin-%s.lnk", chain);
735 fs::ifstream optionFile(GetAutostartFilePath());
736 if (!optionFile.good())
740 while (!optionFile.eof())
742 getline(optionFile, line);
743 if (line.find(
"Hidden") != std::string::npos &&
744 line.find(
"true") != std::string::npos)
755 fs::remove(GetAutostartFilePath());
759 memset(pszExePath, 0,
sizeof(pszExePath));
760 if (readlink(
"/proc/self/exe", pszExePath,
sizeof(pszExePath)-1) == -1)
763 fs::create_directories(GetAutostartDir());
765 fs::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc);
766 if (!optionFile.good())
770 optionFile <<
"[Desktop Entry]\n";
771 optionFile <<
"Type=Application\n";
773 optionFile <<
"Name=Fabcoin\n";
775 optionFile <<
strprintf(
"Name=Fabcoin (%s)\n", chain);
777 optionFile <<
"Terminal=false\n";
778 optionFile <<
"Hidden=false\n";
785 #elif defined(Q_OS_MAC) 786 #pragma GCC diagnostic push 787 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 790 #include <CoreFoundation/CoreFoundation.h> 791 #include <CoreServices/CoreServices.h> 793 LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl);
794 LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl)
797 CFArrayRef listSnapshot = LSSharedFileListCopySnapshot(list,
nullptr);
798 for(
int i = 0; i < CFArrayGetCount(listSnapshot); i++) {
799 LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i);
800 UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
801 CFURLRef currentItemURL =
nullptr;
803 #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100 804 if(&LSSharedFileListItemCopyResolvedURL)
805 currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags,
nullptr);
806 #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100 808 LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL,
nullptr);
811 LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL,
nullptr);
814 if(currentItemURL && CFEqual(currentItemURL, findUrl)) {
816 CFRelease(currentItemURL);
820 CFRelease(currentItemURL);
828 CFURLRef fabcoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle());
829 LSSharedFileListRef loginItems = LSSharedFileListCreate(
nullptr, kLSSharedFileListSessionLoginItems,
nullptr);
830 LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, fabcoinAppUrl);
836 CFURLRef fabcoinAppUrl = CFBundleCopyBundleURL(CFBundleGetMainBundle());
837 LSSharedFileListRef loginItems = LSSharedFileListCreate(
nullptr, kLSSharedFileListSessionLoginItems,
nullptr);
838 LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, fabcoinAppUrl);
840 if(fAutoStart && !foundItem) {
842 LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst,
nullptr,
nullptr, fabcoinAppUrl,
nullptr,
nullptr);
844 else if(!fAutoStart && foundItem) {
846 LSSharedFileListItemRemove(loginItems, foundItem);
850 #pragma GCC diagnostic pop 860 QApplication::clipboard()->setText(str, QClipboard::Clipboard);
861 QApplication::clipboard()->setText(str, QClipboard::Selection);
866 return fs::path(path.toStdString(), utf8);
871 return QString::fromStdString(path.string(utf8));
877 int days = secs / 86400;
878 int hours = (secs % 86400) / 3600;
879 int mins = (secs % 3600) / 60;
880 int seconds = secs % 60;
883 strList.append(QString(QObject::tr(
"%1 d")).arg(days));
885 strList.append(QString(QObject::tr(
"%1 h")).arg(hours));
887 strList.append(QString(QObject::tr(
"%1 m")).arg(mins));
888 if (seconds || (!days && !hours && !mins))
889 strList.append(QString(QObject::tr(
"%1 s")).arg(seconds));
891 return strList.join(
" ");
899 for (
int i = 0; i < 8; i++) {
900 uint64_t check = 1 << i;
906 strList.append(
"NETWORK");
909 strList.append(
"GETUTXO");
912 strList.append(
"BLOOM");
915 strList.append(
"WITNESS");
918 strList.append(
"XTHIN");
921 strList.append(QString(
"%1[%2]").arg(
"UNKNOWN").arg(check));
927 return strList.join(
" & ");
929 return QObject::tr(
"None");
934 return (dPingTime ==
std::numeric_limits<int64_t>::max()/1e6 || dPingTime == 0) ? QObject::tr(
"N/A") : QString(QObject::tr(
"%1 ms")).arg(QString::number((
int)(dPingTime * 1000), 10));
939 return QString(QObject::tr(
"%1 s")).arg(QString::number((
int)nTimeOffset, 10));
945 QString timeBehindText;
946 const int HOUR_IN_SECONDS = 60*60;
947 const int DAY_IN_SECONDS = 24*60*60;
948 const int WEEK_IN_SECONDS = 7*24*60*60;
949 const int YEAR_IN_SECONDS = 31556952;
952 timeBehindText = QObject::tr(
"%n second(s)",
"",secs);
954 else if(secs < 2*HOUR_IN_SECONDS)
956 timeBehindText = QObject::tr(
"%n minute(s)",
"",secs/60);
958 else if(secs < 2*DAY_IN_SECONDS)
960 timeBehindText = QObject::tr(
"%n hour(s)",
"",secs/HOUR_IN_SECONDS);
962 else if(secs < 2*WEEK_IN_SECONDS)
964 timeBehindText = QObject::tr(
"%n day(s)",
"",secs/DAY_IN_SECONDS);
966 else if(secs < YEAR_IN_SECONDS)
968 timeBehindText = QObject::tr(
"%n week(s)",
"",secs/WEEK_IN_SECONDS);
972 qint64 years = secs / YEAR_IN_SECONDS;
973 qint64 remainder = secs % YEAR_IN_SECONDS;
974 timeBehindText = QObject::tr(
"%1 and %2").arg(QObject::tr(
"%n year(s)",
"", years)).arg(QObject::tr(
"%n week(s)",
"", remainder/WEEK_IN_SECONDS));
976 return timeBehindText;
981 Q_EMIT clicked(event->pos());
986 Q_EMIT clicked(event->pos());
991 QList<QToolButton *> btnList;
992 if(btn1) btnList.append(btn1);
993 if(btn2) btnList.append(btn2);
994 if(btn3) btnList.append(btn3);
995 for(
int i = 0; i < btnList.count(); i++)
997 QToolButton* btn = btnList[i];
998 btn->setIconSize(QSize(16, 16));
void SubstituteFonts(const QString &language)
void stretchColumnWidth(int column)
bool isDust(const QString &address, const CAmount &amount)
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Utility functions used by the Fabcoin Qt UI.
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
QList< QModelIndex > getEntryData(QAbstractItemView *view, int column)
Return a field of the currently selected entry as a QString.
void setupAmountWidget(QLineEdit *widget, QWidget *parent)
void setViewHeaderResizeMode(int logicalIndex, QHeaderView::ResizeMode resizeMode)
void on_geometriesChanged()
int secondToLastColumnIndex
base58-encoded Fabcoin addresses.
QString dateTimeStr(const QDateTime &date)
std::string EncodeBase58(const unsigned char *pbegin, const unsigned char *pend)
Why base-58 instead of standard base-64 encoding?
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
QString formatTimeOffset(int64_t nTimeOffset)
bool GetBoolArg(const std::string &strArg, bool fDefault)
Return boolean argument or default value.
bool GetStartOnSystemStartup()
TableViewLastColumnResizingFixer(QTableView *table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent, int columnStretch=2)
Initializes all internal variables and prepares the the resize modes of the last 2 columns of the tab...
ToolTipToRichTextFilter(int size_threshold, QObject *parent=0)
static bool parse(int unit, const QString &value, CAmount *val_out)
Parse string to coin amount.
CChainParams defines various tweakable parameters of a given instance of the Fabcoin system...
QString HtmlEscape(const QString &str, bool fMultiLine)
void connectViewHeadersSignals()
void copyEntryDataFromList(QAbstractItemView *view, int role)
Copy a field of the currently selected entry of a view to the clipboard.
Line edit that can be marked as "invalid" to show input validation feedback.
int getAvailableWidthForColumn(int column)
std::string escaped(std::string const &_s, bool _all=true)
Escapes a string into the C-string representation.
const std::vector< unsigned char > & Base58Prefix(Base58Type type) const
static const std::string MAIN
BIP70 chain name strings (main, test or regtest)
int64_t CAmount
Amount in lius (Can be negative)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
bool isObscured(QWidget *w)
bool eventFilter(QObject *obj, QEvent *evt)
bool parseFabcoinURI(const QUrl &uri, SendCoinsRecipient *out)
QString formatDurationStr(int secs)
const char *const FABCOIN_CONF_FILENAME
void setClipboard(const QString &str)
static QString format(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string.
Base58 entry widget validator, checks for valid characters and removes some whitespace.
An output of a transaction.
CScript GetScriptForDestination(const CTxDestination &dest)
QString formatPingTime(double dPingTime)
void on_sectionResized(int logicalIndex, int oldSize, int newSize)
void mouseReleaseEvent(QMouseEvent *event)
void disconnectViewHeadersSignals()
int allColumnsMinimumWidth
QString formatFabcoinURI(const SendCoinsRecipient &info)
void mouseReleaseEvent(QMouseEvent *event)
fs::path qstringToBoostPath(const QString &path)
const CChainParams & Params()
Return the currently selected parameters.
fs::path GetConfigFile(const std::string &confPath)
Serialized script, used inside transaction inputs and outputs.
QString formatServicesStr(quint64 mask)
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 ...
void adjustTableColumnsWidth()
bool checkPoint(const QPoint &p, const QWidget *w)
std::string ChainNameFromCommandLine()
Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
void setCheckValidator(const QValidator *v)
static const std::string TESTNET
bool IsDust(const CTxOut &txout, const CFeeRate &dustRelayFeeIn)
bool SetStartOnSystemStartup(bool fAutoStart)
const fs::path & GetDataDir(bool fNetSpecific)
QString formatNiceTimeOffset(qint64 secs)
dev::WithExisting max(dev::WithExisting _a, dev::WithExisting _b)
struct evm_uint160be address(struct evm_env *env)
void formatToolButtons(QToolButton *btn1, QToolButton *btn2, QToolButton *btn3)
void copyEntryData(QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
QString boostPathToQString(const fs::path &path)
Fabcoin address widget validator, checks for a valid fabcoin address.
void resizeColumn(int nColumnIndex, int width)