5 #ifndef BITCOIN_QT_GUIUTIL_H 6 #define BITCOIN_QT_GUIUTIL_H 12 #include <QHeaderView> 13 #include <QItemDelegate> 15 #include <QMessageBox> 17 #include <QProgressBar> 31 class QAbstractItemView;
35 class QProgressDialog;
76 QString
HtmlEscape(
const QString &str,
bool fMultiLine =
false);
77 QString
HtmlEscape(
const std::string &str,
bool fMultiLine =
false);
88 int role = Qt::EditRole);
97 QList<QModelIndex>
getEntryData(QAbstractItemView *view,
int column);
121 const QString &dir,
const QString &filter,
122 QString *selectedSuffixOut);
137 const QString &dir,
const QString &filter,
138 QString *selectedSuffixOut);
176 bool eventFilter(QObject *obj, QEvent *evt)
override;
199 int allColsMinimumWidth, QObject *parent);
200 void stretchColumnWidth(
int column);
210 void adjustTableColumnsWidth();
211 int getAvailableWidthForColumn(
int column);
212 int getColumnsWidth();
213 void connectViewHeadersSignals();
214 void disconnectViewHeadersSignals();
215 void setViewHeaderResizeMode(
int logicalIndex,
216 QHeaderView::ResizeMode resizeMode);
217 void resizeColumn(
int nColumnIndex,
int width);
220 void on_sectionResized(
int logicalIndex,
int oldSize,
int newSize);
221 void on_geometriesChanged();
253 qreal minPointSize = 4, qreal startPointSize = 14);
259 bool hasPixmap()
const;
265 void clicked(
const QPoint &point);
268 void mouseReleaseEvent(QMouseEvent *event)
override;
278 void clicked(
const QPoint &point);
281 void mouseReleaseEvent(QMouseEvent *event)
override;
292 void keyEscapePressed();
295 bool eventFilter(QObject *
object, QEvent *event);
306 int TextWidth(
const QFontMetrics &fm,
const QString &text);
317 #endif // BITCOIN_QT_GUIUTIL_H
Utility functions used by the Bitcoin Qt UI.
void LogQtInfo()
Writes to debug.log short info about the used Qt and the host system.
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.
QStringList splitSkipEmptyParts(const QString &s, const QString &separator)
int TextWidth(const QFontMetrics &fm, const QString &text)
Returns the distance in pixels appropriate for drawing a subsequent character after text...
int secondToLastColumnIndex
QString dateTimeStr(const QDateTime &date)
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)
bool GetStartOnSystemStartup()
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system...
QString HtmlEscape(const QString &str, bool fMultiLine)
Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text repre...
Line edit that can be marked as "invalid" to show input validation feedback.
QString formatBitcoinURI(const SendCoinsRecipient &info)
void bringToFront(QWidget *w)
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
bool isObscured(QWidget *w)
QString formatPingTime(int64_t ping_usec)
qreal calculateIdealFontSize(int width, const QString &text, QFont font, qreal minPointSize, qreal font_size)
QString formatDurationStr(int secs)
QString convertToCashAddr(const CChainParams ¶ms, const QString &addr)
void setClipboard(const QString &str)
int lastColumnMinimumWidth
Makes a QTableView last column feel as if it was being resized from its left border.
bool parseBitcoinURI(const QString &scheme, const QUrl &uri, SendCoinsRecipient *out)
void PolishProgressDialog(QProgressDialog *dialog)
ClickableProgressBar ProgressBar
bool isDust(interfaces::Node &node, const QString &address, const Amount amount, const CChainParams &chainParams)
int allColumnsMinimumWidth
fs::path qstringToBoostPath(const QString &path)
ConnectionType
Different types of connections to a peer.
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 ...
std::string DummyAddress(const CChainParams ¶ms)
bool SetStartOnSystemStartup(bool fAutoStart)
QString formatNiceTimeOffset(qint64 secs)
void copyEntryData(QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
QString getDefaultDataDirectory()
Determine default data directory for operating system.
QString boostPathToQString(const fs::path &path)
Top-level interface for a bitcoin node (bitcoind process).
ItemDelegate(QObject *parent)