6 #ifndef PIVX_QT_GUIUTIL_H
7 #define PIVX_QT_GUIUTIL_H
14 #include <QHeaderView>
15 #include <QMessageBox>
17 #include <QProgressBar>
20 #include <QTableWidget>
27 class QAbstractItemView;
82 QString
HtmlEscape(
const QString& str,
bool fMultiLine =
false);
83 QString
HtmlEscape(
const std::string& str,
bool fMultiLine =
false);
91 void copyEntryData(QAbstractItemView* view,
int column,
int role = Qt::EditRole);
99 QVariant
getEntryData(QAbstractItemView *view,
int column,
int role);
113 QString
getSaveFileName(QWidget* parent,
const QString& caption,
const QString& dir,
const QString& filter, QString* selectedSuffixOut);
124 QString
getOpenFileName(QWidget* parent,
const QString& caption,
const QString& dir,
const QString& filter, QString* selectedSuffixOut);
213 template <
typename SeparatorType>
216 #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
217 return string.split(separator, Qt::SkipEmptyParts);
219 return string.split(separator, QString::SkipEmptyParts);
int64_t CAmount
Amount in PIV (Can be negative)
GUIException(const std::string &message)
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text repre...
bool eventFilter(QObject *obj, QEvent *evt)
ToolTipToRichTextFilter(int size_threshold, QObject *parent=0)
Line edit that can be marked as "invalid" to show input validation feedback.
Utility functions used by the PIVX Qt UI.
fs::path qstringToBoostPath(const QString &path)
bool isObscured(QWidget *w)
QString formatBalanceWithoutHtml(CAmount amount, int nDisplayUnit, bool isZpiv)
void setupAmountWidget(QLineEdit *widget, QWidget *parent)
Qt::ConnectionType blockingGUIThreadConnection()
Get connection type to call object slot in GUI thread with invokeMethod.
void updateWidgetTextAndCursorPosition(QLineEdit *widget, const QString &str)
QString HtmlEscape(const QString &str, bool fMultiLine)
bool isExternal(QString theme)
Check whether a theme is not built-in.
QString loadStyleSheet()
Load global CSS theme.
CAmount parseValue(const QString &amount, int displayUnit)
Returns 0 if the value is invalid.
QString formatPingTime(double dPingTime)
void saveWindowGeometry(const QString &strSetting, QWidget *parent)
Save window size and position.
QString dateTimeStrWithSeconds(const QDateTime &date)
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
QFont bitcoinAddressFont()
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 ...
QString boostPathToQString(const fs::path &path)
bool SetStartOnSystemStartup(bool fAutoStart)
void bringToFront(QWidget *w)
void restoreWindowGeometry(const QString &strSetting, const QSize &defaultSize, QWidget *parent)
Restore window size and position.
QString dateTimeStr(const QDateTime &date)
QString formatDurationStr(int secs)
QVariant getEntryData(QAbstractItemView *view, int column, int role)
Return a field of the currently selected entry as a QString.
QString formatBitcoinURI(const SendCoinsRecipient &info)
QString formatTimeOffset(int64_t nTimeOffset)
QString formatServicesStr(quint64 mask)
QString formatBalance(CAmount amount, int nDisplayUnit, bool isZpiv)
bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
bool GetStartOnSystemStartup()
QStringList SplitSkipEmptyParts(const QString &string, const SeparatorType &separator)
Splits the string into substrings wherever separator occurs, and returns the list of those strings.
void copyEntryData(QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
void setClipboard(const QString &str)
bool isDust(const QString &address, const CAmount &amount)